summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2010-07-30virtio-serial: Check if more max_ports specified than we can handleAmit Shah1-1/+9
Currently virtio-serial supports a maximum of 31 ports. Specifying the 'max_ports' parameter to be > 31 on the cmd line causes badness. Ensure we initialise virtio-serial only if max_ports is within the supported range. Signed-off-by: Amit Shah <amit.shah@redhat.com> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2010-07-30Merge branch 'for-anthony' of git://repo.or.cz/qemu/kevinAurelien Jarno10-12/+59
* 'for-anthony' of git://repo.or.cz/qemu/kevin: Fix -snapshot deleting images on disk change block: Use error codes from lower levels for error message block: default to 0 minimal / optiomal I/O size move 'unsafe' to end of caching modes in help virtio-blk: Create exit function to unregister savevm block migration: propagate return value when bdrv_write() returns < 0 ide/atapi: add support for GET EVENT STATUS NOTIFICATION
2010-07-30linux-user: fix build on hosts not using guest baseAurelien Jarno2-7/+9
Commit 68a1c816868b3e35a1da698af412b29e61b1948a broke qemu on hosts not using guest base. It uses reserved_va unconditionally in mmap.c. To avoid to many #ifdef #endif blocks, define RESERVED_VA as either reserved_va or 0ul, and use it instead of reserved_va, similarly to what has been done with guest_base/GUEST_BASE.
2010-07-29test: Run tests only if supported on the current hardwareRoedel, Joerg1-13/+25
Signed-off-by: Joerg Roedel <joerg.roedel@amd.com> Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
2010-07-29test: verify that the emulator honours svm interceptsAvi Kivity1-0/+37
Signed-off-by: Avi Kivity <avi@redhat.com> Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
2010-07-29test: ensure svm tests are executed with interrupts disabled by defaultAvi Kivity1-0/+1
Signed-off-by: Avi Kivity <avi@redhat.com> Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
2010-07-29test: add cli() and sti() instruction accessorsAvi Kivity1-0/+10
Signed-off-by: Avi Kivity <avi@redhat.com> Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
2010-07-29test: add pause() instruction accessorAvi Kivity1-0/+5
Signed-off-by: Avi Kivity <avi@redhat.com> Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
2010-07-29test: add intercepted and unintercepted cr3 read tests for svmAvi Kivity1-1/+25
Signed-off-by: Avi Kivity <avi@redhat.com> Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
2010-07-29test: add scratch word for use by svm testsAvi Kivity1-0/+1
Signed-off-by: Avi Kivity <avi@redhat.com> Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
2010-07-29test: add svm testsAvi Kivity3-0/+183
Signed-off-by: Avi Kivity <avi@redhat.com> Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
2010-07-29test: add msr definitions headerAvi Kivity1-0/+406
Signed-off-by: Avi Kivity <avi@redhat.com> Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
2010-07-29test: add svm definitions headerAvi Kivity1-0/+328
Signed-off-by: Avi Kivity <avi@redhat.com> Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
2010-07-29test: make use of new processor.h headerAvi Kivity4-67/+14
Signed-off-by: Avi Kivity <avi@redhat.com> Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
2010-07-29test: add processor register access functionsAvi Kivity1-0/+246
Signed-off-by: Avi Kivity <avi@redhat.com> Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
2010-07-29linux-user: Protect against allocation failure in load_symbols.Richard Henderson1-0/+10
Cc: malc <av1474@comtv.ru> Signed-off-by: Richard Henderson <rth@twiddle.net> Signed-off-by: malc <av1474@comtv.ru>
2010-07-29test: add type boolAvi Kivity1-0/+4
Signed-off-by: Avi Kivity <avi@redhat.com> Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
2010-07-29test: move memset() to libcflatAvi Kivity5-26/+14
Signed-off-by: Avi Kivity <avi@redhat.com> Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
2010-07-29test: move ARRAY_SIZE() to libcflat.hAvi Kivity2-2/+2
Signed-off-by: Avi Kivity <avi@redhat.com> Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
2010-07-29test: Add emulator test for iret instructionMohammed Gamal1-0/+79
This adds a unit test for real mode emulation of the iret instruction Signed-off-by: Mohammed Gamal <m.gamal005@gmail.com> Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
2010-07-29cris: Correct settls1 testcase.Edgar E. Iglesias1-2/+8
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
2010-07-29cris: Correct ADDO and ADDOQ testcases.Edgar E. Iglesias2-3/+3
Verified on real HW. Signed-off-by: Edgar E. Iglesias <edgar@axis.com>
2010-07-29linux-user: Re-use load_elf_image for the main binary.Richard Henderson1-277/+103
This requires moving the PT_INTERP extraction and GUEST_BASE handling into load_elf_image. Key this off a non-null pointer argument to receive the interpreter name. Signed-off-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
2010-07-29linux-user: Extract load_elf_image from load_elf_interp.Richard Henderson1-174/+167
Moving toward a single copy of the elf binary loading code. Fill in the details of the loaded image into a struct image_info. Adjust create_elf_tables to read from such structures instead of from a collection of passed arguments. Don't return error values from load_elf_interp; always exit(-1) with a message to stderr. Collect elf_interpreter handling in load_elf_binary to a common spot. Signed-off-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
2010-07-29linux-user: Remove partial support for a.out interpreters.Richard Henderson1-70/+9
At the bottom of the a.out support was the unimplemented load_aout_interp function. There were other portions of the support that didn't look right; when I went to look in the Linux kernel for clarification, I found that the support for such interpreters has been removed from binfmt_elf. There doesn't seem to be any reason to keep this broken support in qemu. Signed-off-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
2010-07-29linux-user: Put the stack guard page at the top.Richard Henderson1-14/+17
There are no supported stack-grows-up targets. We were putting the guard page at the highest address, i.e. the bottom of the stack. Use the maximum of host and guest page size for the guard size. Signed-off-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
2010-07-29linux-user: Improve consistency checking in elf headers.Richard Henderson1-24/+33
Validate more fields of the elf header. Extract those checks into two common functions to be used in both load_elf_interp and load_elf_binary. Signed-off-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
2010-07-29linux-user: Load symbols from the interpreter.Richard Henderson1-88/+101
First, adjust load_symbols to accept a load_bias parameter. At the same time, read the entire section header table in one go, use pread instead f lseek+read for the symbol and string tables, and properly free allocated structures on error exit paths. Second, adjust load_elf_interp to compute load_bias. This requires finding out the built-in load addresses. Which allows us to honor a pre-linked interpreter image when possible, and eliminate the hard-coded INTERP_MAP_SIZE value. Signed-off-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
2010-07-29linux-user: Clean up byte-swapping in elfload.c.Richard Henderson1-71/+48
Remove ifdefs from code by defining empty inline functions when byte swapping isn't needed. Push loops over swapping arrays of structures into the swapping functions. Signed-off-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
2010-07-29linux-user: Define ELF_DATA generically.Richard Henderson1-24/+6
The only consideration on this value is the target endianness. The existing defines were incorrect for alpha and sh4eb. Signed-off-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
2010-07-29linux-user: Reduce lseek+reads while loading elf files.Richard Henderson3-71/+57
Define BPRM_BUF_SIZE to 1k and read that amount initially. If the data we want from the binary is in this buffer, use it instead of reading from the file again. Signed-off-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
2010-07-29linux-user: Reindent elfload.c.Richard Henderson1-510/+518
Signed-off-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
2010-07-29Add more DT_* and AT_* constants to qemu's copy of elf.h.Richard Henderson2-9/+44
Moving some PPC AT_* constants from elfload.c at the same time. Signed-off-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
2010-07-29linux-user: Handle filesz < memsz for any PT_LOAD segment.Richard Henderson1-97/+55
I caught padzero not properly initializing the .bss segment on a statically linked Alpha program. Rather than a minimal patch, replace the gross code with a single mmap+memset. Share more code between load_elf_interp and load_elf_binary. Legally, an ELF program need not have just a single .bss; and PT_LOAD segment can have memsz > filesz. Signed-off-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
2010-07-28Update version for 0.13.xAnthony Liguori1-1/+1
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-07-27test: emulator: test LOCK NEG and LOCK NOTAvi Kivity1-3/+18
Signed-off-by: Avi Kivity <avi@redhat.com> Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
2010-07-27test: realmode: fix pusha test stackAvi Kivity1-1/+6
pusha needs some stack space, or it will fault. The supplied value of 7 is too small. Provide a real stack for pusha. Signed-off-by: Avi Kivity <avi@redhat.com> Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
2010-07-27test: realmode: initialize all bits of espAvi Kivity1-1/+1
Initializing just sp can leave the high bits of esp uninitialized. Signed-off-by: Avi Kivity <avi@redhat.com> Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
2010-07-27test: realmode: fix pusha testAvi Kivity1-3/+2
'pop esp' destroys the stack, avoid it Signed-off-by: Avi Kivity <avi@redhat.com> Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
2010-07-27test: access: add test case to trigger the bug which cause hugepage mapping ↵Xiao Guangrong1-0/+46
corrupt The test case can trigger the bug that fixed by commit e09e90a5 in the kvm tree to avoid regression Signed-off-by: Xiao Guangrong <xiaoguangrong@cn.fujitsu.com> Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
2010-07-27test: access: separate pool from ac_test_t structXiao Guangrong1-30/+41
Separate pool from the ac_test_t struct, later we will use multiple ac_test_t units, those units should allocate pte from the same pool to avoid mapping to the same pte Signed-off-by: Xiao Guangrong <xiaoguangrong@cn.fujitsu.com> Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
2010-07-27test: access: separate expect status updates from ac_test_setup_pte() functionXiao Guangrong1-62/+69
Separate expect status updates operation, later we can just modify the access way(i,e the AC_ACCESS_* flags) Signed-off-by: Xiao Guangrong <xiaoguangrong@cn.fujitsu.com> Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
2010-07-27device-assignment: Use PCI I/O port sysfs resource file when availableAlex Williamson2-86/+116
When supported by the host kernel, we can use read/write on the PCI sysfs resource file for I/O port regions. This allows us to avoid raw in/out commands and works with deprivileged guests via libvirt. Signed-off-by: Alex Williamson <alex.williamson@redhat.com> Acked-by: Chris Wright <chrisw@redhat.com> Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
2010-07-27Fix mingw32 buildBlue Swirl1-9/+9
Fix mingw32 build errors like /src/qemu/ui/vnc-enc-tight.c: In function 'tight_detect_smooth_image24': /src/qemu/ui/vnc-enc-tight.c:119: error: 'uint' undeclared (first use in this function) Replace 'uint' with proper 'unsigned int'. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-07-27Initialize a variable in all casesBlue Swirl1-0/+2
Fix a warning with some GCCs: /src/qemu/ui/vnc-enc-tight.c: In function `send_sub_rect_nojpeg': /src/qemu/ui/vnc-enc-tight.c:1458: warning: `ret' might be used uninitialized in this function Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-07-27Fix uint8_t comparisons with negative valuesBlue Swirl2-5/+4
Fix the following warnings: /src/qemu/hw/ide/core.c: In function `ide_drive_pio_post_load': /src/qemu/hw/ide/core.c:2767: warning: comparison is always false due to limited range of data type /src/qemu/ui/vnc-enc-tight.c: In function `tight_detect_smooth_image': /src/qemu/ui/vnc-enc-tight.c:284: warning: comparison is always true due to limited range of data type /src/qemu/ui/vnc-enc-tight.c:297: warning: comparison is always true due to limited range of data type /src/qemu/ui/vnc-enc-tight.c: In function `tight_encode_indexed_rect16': /src/qemu/ui/vnc-enc-tight.c:456: warning: comparison is always false due to limited range of data type /src/qemu/ui/vnc-enc-tight.c: In function `tight_encode_indexed_rect32': /src/qemu/ui/vnc-enc-tight.c:457: warning: comparison is always false due to limited range of data type Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-07-27Update version for 0.13.0-rc0Anthony Liguori1-1/+1
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-07-26vnc: better default values for VNC optionsCorentin Chary1-7/+7
vnc_jpeg and vnc_png are now "auto" by default, this means that if the dependencies are installed (libjpeg or libpng), then they will be enabled. vnc_thread is disabled by default. It should be enabled by default as soon as it's stable enougth. Signed-off-by: Corentin Chary <corentincj@iksaif.net> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-07-26vnc: tight: split send_sub_rectCorentin Chary1-25/+55
Split send_sub_rect in send_sub_rect_jpeg and send_sub_rect_nojpeg to remove all these #ifdef CONFIG_JPEG. Signed-off-by: Corentin Chary <corentincj@iksaif.net> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-07-26vnc: tight: fix rgb_prepare_rowCorentin Chary1-5/+10
rgb_prepare_row bpp depends on the server display surface, not the client. Signed-off-by: Corentin Chary <corentincj@iksaif.net> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>