summary refs log tree commit diff stats
Commit message (Collapse)AuthorAgeFilesLines
...
* configure: fix detection for xattr.h on modern distributionsAvi Kivity2011-11-097-7/+45
| | | | | | | | | | | Modern distributions place xattr.h in /usr/include/sys, and fold libattr.so into libc. They also don't have an ENOATTR. Make configure detect this, and add a qemu-xattr.h file that directs the #include to the right place. Signed-off-by: Avi Kivity <avi@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* Clean up assertion in get_boot_devices_list()Markus Armbruster2011-11-091-1/+1
| | | | | | | | g_strdup() can't fail, remove assertion. Assert its argument can't be null, because that's not obvious (add_boot_device_path() ensures it). Signed-off-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* Replace WriteFileEx with WriteFile in qemu_create_pidfileFabien Chouteau2011-11-091-3/+4
| | | | | | | | | | | | The function that writes pidfile for win32 uses WriteFileEx which is an asynchronous IO function. The arguments given to WriteFileEx are allocated on the stack and one of them is "in out". When the IO operation is actually executed the calling function has already returned, so the arguments are no longer allocated or allocated to another frame. Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Fabien Chouteau <chouteau@adacore.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* win32: remove broken timersPaolo Bonzini2011-11-091-3/+1
| | | | | | | | The non-dynticks timer variations are broken, so they can be removed. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* virtex: Remove memset of clk_setupEdgar E. Iglesias2011-11-081-1/+0
| | | | | | clk_setup is now a function. Fixes a segfault. Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
* Update version for v1.0-rc1Anthony Liguori2011-11-071-1/+1
| | | | Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* console: Fix rendering of VGA underlineMarkus Armbruster2011-11-071-3/+3
| | | | | | | | | | | | | | | | | vga_putcharxy()'s underline code sets font_data to 0xffff instead of 0xff. vga_putcharxy() then reads dmask16[0xffff >> 4] and dmask4[0xffff >> 6]. In practice, these out-of-bounds subscripts "only" put a few crap bits into the display surface. For 32 bit pixels, there's no array access. font_data's extra bits go straight into the display surface. Broken when commit 6d6f7c28 implemented underline. Spotted by Coverity. Signed-off-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* qemu_timedate_diff() shouldn't modify its argument.Gleb Natapov2011-11-071-2/+5
| | | | | | | | | | The caller of qemu_timedate_diff() does not expect that tm it passes to the function will be modified, but mktime() is destructive and modifies its argument. Pass a copy of tm to it and set tm_isdst so that mktime() will not rely on it since its value may be outdated. Signed-off-by: Gleb Natapov <gleb@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* reenable vm_clock when resuming all vcpusWen Congyang2011-11-071-0/+1
| | | | | | | | | | | We disable vm_clock when pausing all vcpus, but we forget to reenable it when resuming all vcpus. It will cause that the guest can not be rebooted. Tested-by: Zhi Yong Wu <zwu.kernel@gmai.com> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Wen Congyang <wency@cn.fujitsu.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* qxl: fix vga port initialization.Gerd Hoffmann2011-11-071-5/+17
| | | | | | | | | | | | | | | | Commit 0a039dc70096b768d3810afa50ba1d214768aaf4 broke vga modes for qxl-vga by loosing vga_ioport_read windup. qxl needs to hook into vga port writes only and used to realize that by letting vga_init() do the work for both reads and writes, then overwrite the write function. That little detail was missed while doing the conversion ... This patch fixes it. It also switch qxl vga ioport registration to portio lists while being at it. Cc: Hans de Goede <hdegoede@redhat.com> Acked-by: Alon Levy <alevy@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* ac97: don't override the pci subsystem idGerd Hoffmann2011-11-072-5/+27
| | | | | | | | | | | | | This patch removes the code lines which set the subsystem id for the emulated ac97 card to 8086:0000. Due to the device id being zero the subsystem id isn't vaild anyway. With the patch applied the sound card gets the default qemu subsystem id (1af4:1100) instead. [ v2: old & broken id is maintained for -M pc-$oldqemuversion ] Cc: Takashi Iwai <tiwai@suse.de> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* pc: add 1.0 machine typeGerd Hoffmann2011-11-071-3/+11
| | | | | | | | This patch adds a pc-1.0 machine type. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* disable automatic loading of sgabios when -nographicPaolo Bonzini2011-11-071-9/+0
| | | | | | | | | sgabios hasn't gotten a lot of coverage since it was not shipped. For 1.0, let's disable the automatic loading of the option ROM in -nographic mode. We can put it back for 1.1. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* add sgabios blob and submodulePaolo Bonzini2011-11-075-1/+10
| | | | | | | | The rom was not added together with the sgabios device and is not installed. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* Merge remote-tracking branch 'kwolf/for-anthony' into stagingAnthony Liguori2011-11-074-88/+138
|\
| * vvfat: reorganize computation of disk geometryPaolo Bonzini2011-11-041-16/+24
| | | | | | | | | | | | | | | | | | | | | | First determine FAT12/16/32, then compute geometry from that for both FDD and HDD. For 1.44MB floppies, and 2.88MB floppies using FAT16, change to 1 sector/cluster. The default remains 2.88MB with FAT12 and 2 sectors/cluster. Both DOS and mkdosfs by default format a 2.88MB floppy as FAT12. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
| * vvfat: do not hardcode sector counts in error messagePaolo Bonzini2011-11-041-5/+2
| | | | | | | | | | Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
| * vvfat: unify and correct computation of sector countPaolo Bonzini2011-11-041-3/+3
| | | | | | | | | | | | | | | | | | | | The sector count is stored in the partition and hence must not include the sectors before its start. At the same time, remove the useless special casing for 1.44 MB floppies. This fixes fsck on VVFAT hard disks, which otherwise tries to seek past the end of the disk. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
| * vvfat: need to use first_sectors_number to distinguish fdd/hddPaolo Bonzini2011-11-041-2/+2
| | | | | | | | | | | | | | | | This is consistent with what "real" floppies have, so file(1) now actually recognizes the VVFAT image as a 1.44 MB floppy. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
| * vvfat: do not fail if the disk has spare sectorsPaolo Bonzini2011-11-041-2/+2
| | | | | | | | | | | | | | | | | | If the number of "faked sectors" + the number of sectors that are part of a cluster does not sum up to the total number of sectors, qemu-img convert fails. Read these spare sectors as all zeros. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
| * vvfat: fix out of bounds array_get usagePaolo Bonzini2011-11-041-0/+1
| | | | | | | | | | | | | | | | | | | | | | When reading the address of the first free entry, you cannot use array_get without first marking all entries as occupied. This is visible if you change the sectors per cluster on a floppy from 2 to 1. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
| * block/cloop: Use g_free instead of freeDong Xu Wang2011-11-041-3/+3
| | | | | | | | | | | | | | | | | | | | Fix mismatching allocation and deallocation: g_free should be used to pair with g_malloc. Reviewed-by: Andreas Färber <afaerber@suse.de> Reviewed_by: Ray Wang <raywang@linux.vnet.ibm.com> Signed-off-by: Dong Xu Wang <wdongxu@linux.vnet.ibm.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
| * block/cloop: Fix coding styleDong Xu Wang2011-11-041-52/+63
| | | | | | | | | | | | | | | | | | Fix coding style in block/cloop.c. Reviewed-by: Andreas Färber <afaerber@suse.de> Reviewed_by: Ray Wang <raywang@linux.vnet.ibm.com> Signed-off-by: Dong Xu Wang <wdongxu@linux.vnet.ibm.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
| * dma: Avoid reentrancy in DMA transfer handlersKevin Wolf2011-11-041-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With the conversion of the block layer to coroutines, bdrv_read/write have changed to run a nested event loop that calls qemu_bh_poll. Consequently a scheduled BH can be called while a DMA transfer handler runs and this means that DMA_run becomes reentrant. Devices haven't been designed to cope with that, so instead of running a nested transfer handler just wait for the next invocation of the BH from the main loop. This fixes some problems with the floppy device. Signed-off-by: Kevin Wolf <kwolf@redhat.com>
| * qemu-io: Fix multiwrite_f error handlingKevin Wolf2011-11-041-3/+6
| | | | | | | | | | | | | | Without this fix, some qiovs can be leaked if an error occurs. Also a semicolon at the end of the command line would make the code walk beyond the end of argv. Signed-off-by: Kevin Wolf <kwolf@redhat.com>
| * qemu-io: Handle create_iovec errorsKevin Wolf2011-11-041-4/+24
| | | | | | | | | | | | | | Callers of create_iovec() didn't check for failure and continued with uninitialised data in error cases. This patch adds checks to each call. Signed-off-by: Kevin Wolf <kwolf@redhat.com>
* | Merge remote-tracking branch 'stefanha/trivial-patches' into stagingAnthony Liguori2011-11-073-96/+92
|\ \
| * | xen-platform: Fix IO port read/write functionsAnthony PERARD2011-11-071-9/+9
| | | | | | | | | | | | | | | | | | | | | Somehow, the read/write functions handle an offset that does not exist anymore. Signed-off-by: Anthony PERARD <anthony.perard@citrix.com> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
| * | readline: Fix buffer overrun on re-add to historyMarkus Armbruster2011-11-071-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | readline_hist_add() moves the history entry to the end of history. It uses memmove() to move rs->history[idx + 1..] to rs->history[idx..]. However, its size argument is off by two array elements, so it writes one element beyond rs->history[], and reads two. On my system, this clobbers rs->hist_entry and the hole right after it. Since the function assigns to rs->hist_entry in time, the bug has no ill effects for me. Spotted by Coverity. Signed-off-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
| * | cmd: Fix potential memory leakPavel Borzenkov2011-11-071-2/+7
| | | | | | | | | | | | | | | Signed-off-by: Pavel Borzenkov <pavel.borzenkov@gmail.com> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
| * | cmd: Fix potential NULL pointer dereferencePavel Borzenkov2011-11-071-8/+3
| | | | | | | | | | | | | | | Signed-off-by: Pavel Borzenkov <pavel.borzenkov@gmail.com> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
| * | cmd: Fix coding style in cmd.cPavel Borzenkov2011-11-071-86/+82
| |/ | | | | | | | | | | | | Before the next patches, fix coding style of the affected functions. Signed-off-by: Pavel Borzenkov <pavel.borzenkov@gmail.com> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
* / arm_gic: handle banked enable bits for per-cpu interruptsRabin Vincent2011-11-061-15/+20
|/ | | | | | | | | | | | | | The first enable set/clear register (which controls the PPIs and SGIs) is supposed to be banked for each processor. Currently it is just handled globally and this prevents recent SMP Linux kernels from booting, because CPU0 stops receiving localtimer interrupts when CPU1 disables them locally. To fix this, allow the enable bits to be enabled per-cpu. For SPIs, always enable/disable ALL_CPU_MASK. Signed-off-by: Rabin Vincent <rabin@rab.in> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
* Merge branch 'xtensa' of git://jcmvbkbc.spb.ru/dumb/qemu-xtensaBlue Swirl2011-11-026-18/+135
|\ | | | | | | | | | | | | | | | | | | * 'xtensa' of git://jcmvbkbc.spb.ru/dumb/qemu-xtensa: xtensa_lx60: fix build date code and change memory region names xtensa_lx60: pass kernel arguments from -append xtensa_lx60: add FLASH support target-xtensa: raise an exception for invalid and reserved opcodes target-xtensa: handle cache options in the overlay tool target-xtensa: mask out undefined bits of WINDOWSTART SR
| * xtensa_lx60: fix build date code and change memory region namesMax Filippov2011-11-021-4/+4
| | | | | | | | | | | | | | Fix date code to uses MMDDYYYY notation. Change memory region names to reflect specification that defines them. Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
| * xtensa_lx60: pass kernel arguments from -appendMax Filippov2011-11-022-4/+45
| | | | | | | | | | | | | | Create boot parameters in the end of SRAM region, insert kernel arguments specified in -append there. Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
| * xtensa_lx60: add FLASH supportMax Filippov2011-11-023-8/+73
| | | | | | | | | | | | | | | | | | | | | | LX60 carry 4 Mbyte FLASH and 128 Kbyte SRAM, LX200 carry 16 Mbyte FLASH and 32 Mbyte SRAM. Either of these memories may be mapped to the system ROM region. Select boot from FLASH if -kernel option is not specified, otherwise boot from SRAM. Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
| * target-xtensa: raise an exception for invalid and reserved opcodesMax Filippov2011-11-021-1/+6
| | | | | | | | | | | | | | | | This includes opcodes from disabled features and those marked reserved in the ISA. Also end TB on opcodes that definitely generate an exception: illegal instructions, syscall and privileged instructions. Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
| * target-xtensa: handle cache options in the overlay toolMax Filippov2011-11-021-0/+6
| | | | | | | | | | | | | | Cache options must be enabled for the cores that have cache to avoid illegal instruction exceptions. Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
| * target-xtensa: mask out undefined bits of WINDOWSTART SRMax Filippov2011-11-021-1/+1
| | | | | | | | | | | | | | According to ISA, table 5-156, bits 32:NAREG/4 of the WINDOWSTART SR must be zero. Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
* | Merge branch 'tci' of git://qemu.weilnetz.de/qemuBlue Swirl2011-11-0214-12/+2545
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | * 'tci' of git://qemu.weilnetz.de/qemu: tcg: Add tcg interpreter to configure / make tcg: Add tci disassembler tcg: Add interpreter for bytecode tcg: Add bytecode generator for tcg interpreter tcg: Make ARRAY_SIZE(tcg_op_defs) globally available tcg: TCG targets may define tcg_qemu_tb_exec
| * | tcg: Add tcg interpreter to configure / makeStefan Weil2011-10-312-2/+36
| | | | | | | | | | | | Signed-off-by: Stefan Weil <sw@weilnetz.de>
| * | tcg: Add tci disassemblerStefan Weil2011-10-313-1/+63
| | | | | | | | | | | | Signed-off-by: Stefan Weil <sw@weilnetz.de>
| * | tcg: Add interpreter for bytecodeStefan Weil2011-10-311-0/+1208
| | | | | | | | | | | | Signed-off-by: Stefan Weil <sw@weilnetz.de>
| * | tcg: Add bytecode generator for tcg interpreterStefan Weil2011-10-315-3/+1227
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Unlike other tcg target code generators, this one does not generate machine code for some cpu. It generates machine independent bytecode which is interpreted later. This allows running QEMU on any host. Interpreted bytecode is slower than direct execution of generated machine code. Signed-off-by: Stefan Weil <sw@weilnetz.de>
| * | tcg: Make ARRAY_SIZE(tcg_op_defs) globally availableStefan Weil2011-10-312-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | tcg_op_defs was already a global array. The tci disassembler also needs ARRAY_SIZE(tcg_op_defs), so add a new global constant with this value. Signed-off-by: Stefan Weil <sw@weilnetz.de>
| * | tcg: TCG targets may define tcg_qemu_tb_execStefan Weil2011-10-312-5/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Targets may use a non standard definition of tcg_tb_exec by defining this macro in their tcg_target.h. This is used here by ppc. It will be used by the TCG interpreter, too. Cc: malc <av1474@comtv.ru> Signed-off-by: Stefan Weil <sw@weilnetz.de>
* | | Merge remote-tracking branch 'aneesh/for-upstream-8' into stagingAnthony Liguori2011-11-021-99/+4
|\ \ \
| * | | hw/9pfs: use g_vasprintf() instead of rolling our ownStefan Hajnoczi2011-11-021-99/+4
| | |/ | |/| | | | | | | | | | | | | | | | | | | | | | Markus Armbruster <armbru@redhat.com> sent fixes for va_list vararg issues in v9fs_string_alloc_printf(). It turns out the function duplicates g_vasprintf() and can therefore be eliminated entirely. Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
* | | Merge remote-tracking branch 'qemu-kvm-tmp/memory/int128' into stagingAnthony Liguori2011-11-023-81/+231
|\ \ \