summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2012-03-19Merge remote-tracking branch 'spice/spice.v50' into stagingAnthony Liguori7-108/+186
* spice/spice.v50: spice: fix broken initialization hw/qxl.c: Fix compilation failures on 32 bit hosts qxl/qxl_render.c: add trace events qxl: switch qxl.c to trace-events qxl: init_pipe_signaling: exit on failure monitor: fix client_migrate_info error handling spice: set spice uuid and name
2012-03-19Merge remote-tracking branch 'bonzini/scsi-next' into stagingAnthony Liguori6-19/+54
* bonzini/scsi-next: scsi: add get_dev_path virtio-scsi: call unregister_savevm properly scsi: copy serial number into VPD page 0x83 scsi-cd: check ready condition before processing several commands get rid of CONFIG_VIRTIO_SCSI
2012-03-19Merge remote-tracking branch 'qemu-kvm/memory/urgent' into stagingAnthony Liguori1-2/+2
* qemu-kvm/memory/urgent: exec: fix guest memory access for Xen
2012-03-19xen: do not allocate RAM during INMIGRATE runstateAnthony PERARD1-0/+8
Signed-off-by: Anthony PERARD <anthony.perard@citrix.com> Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
2012-03-19xen mapcache: check if memory region has moved.Anthony PERARD3-6/+43
This patch changes the xen_map_cache behavior. Before trying to map a guest addr, mapcache will look into the list of range of address that have been moved (physmap/set_memory). There is currently one memory space like this, the vram, "moved" from were it's allocated to were the guest will look into. This help to have a succefull migration. Signed-off-by: Anthony PERARD <anthony.perard@citrix.com> Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
2012-03-19xen: record physmap changes to xenstoreStefano Stabellini1-1/+77
Write to xenstore any physmap changes so that the hypervisor can be aware of them. Read physmap changes from xenstore on boot. Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
2012-03-19Set runstate to INMIGRATE earlierStefano Stabellini1-1/+1
Set runstate to RUN_STATE_INMIGRATE as soon as we can on resume. Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Acked-by: Luiz Capitulino <lcapitulino@redhat.com>
2012-03-19Introduce "xen-save-devices-state"Stefano Stabellini4-0/+151
- add an "is_ram" flag to SaveStateEntry; - register_savevm_live sets is_ram for live_savevm devices; - introduce a "xen-save-devices-state" QAPI command that can be used to save the state of all devices, but not the RAM or the block devices of the VM. Changes in v8: - rename save-devices-state to xen-save-devices-state. Changes in v7: - rename save_devices to save-devices-state. Changes in v6: - remove the is_ram parameter from register_savevm_live and sets is_ram if the device is a live_savevm device; - introduce save_devices as a QAPI command, write a better description for it; - fix CODING_STYLE; - introduce a new doc to explain the save format used by save_devices. Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Reviewed-by: Anthony Liguori <aliguori@us.ibm.com> Acked-by: Luiz Capitulino <lcapitulino@redhat.com>
2012-03-19exec: fix guest memory access for XenAnthony PERARD1-2/+2
In cpu_physical_memory_rw, a change has been introduced and qemu_get_ram_ptr is no longuer called with the ram addr we want to access, but only with the section address. This patch fixes this. (All other call to qemu_get_ram_ptr are already called with the right address.) This patch fixes Xen guest. Signed-off-by: Anthony PERARD <anthony.perard@citrix.com> Signed-off-by: Avi Kivity <avi@redhat.com>
2012-03-19Merge remote-tracking branch 'origin/master' into stagingAnthony Liguori1-0/+11
* origin/master: tcg: fix sparc host for AREG0 free operation
2012-03-19scsi: add get_dev_pathPaolo Bonzini1-0/+18
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2012-03-19virtio-scsi: call unregister_savevm properlyPaolo Bonzini1-0/+2
This fixes a use-after-free when migrating after hot-unplug. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2012-03-19scsi: copy serial number into VPD page 0x83Paolo Bonzini1-3/+4
Currently QEMU passes the qdev device id to the guest in an ASCII-string designator in page 0x83. While this is fine, it does not match what real hardware does; usually the ASCII-string designator there hosts another copy of the serial number (there can be other designators, for example with a world-wide name). Do the same for QEMU SCSI disks. ATAPI does not support VPD pages, so it does not matter there. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2012-03-19scsi-cd: check ready condition before processing several commandsPaolo Bonzini1-13/+29
This commit is more or less obvious. What it caused is less obvious: SCSI CD drives failed to eject under Linux, though for example the "change" command worked okay. This happens because of the autoclose option in the Linux CD-ROM driver. The actual chain of events is quite complex and somehow involves udev helpers; the actual command that matters is READ TOC, though honestly it's not really clear to me how because it should always be invoked after autoclose, not before. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2012-03-19get rid of CONFIG_VIRTIO_SCSIPaolo Bonzini3-3/+1
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2012-03-19Merge remote-tracking branch 'qemu-kvm/memory/urgent' into stagingAnthony Liguori72-857/+1586
* qemu-kvm/memory/urgent: (42 commits) memory: check for watchpoints when getting code ram_addr exec: fix write tlb entry misused as iotlb Sparc: avoid AREG0 wrappers for memory access helpers Sparc: avoid AREG0 for memory access helpers TCG: add 5 arg helpers to def-helper.h softmmu templates: optionally pass CPUState to memory access functions i386: Remove REGPARM sparc64: implement PCI and ISA irqs sparc: reset CPU state on reset apb: use normal PCI device header for PBM device w64: Fix data type of next_tb and tcg_qemu_tb_exec softfloat: fix for C99 vmstate: fix varrays with uint32_t indexes Fix large memory chunks allocation with tcg_malloc. hw/pxa2xx.c: Fix handling of pxa2xx_i2c variable offset within region hw/pxa2xx_lcd.c: drop target_phys_addr_t usage in device state hw/pxa2xx_dma.c: drop target_phys_addr_t usage in device state ARM: Remove unnecessary subpage workarounds malta: Fix display for LED array malta: Use symbolic hardware addresses ...
2012-03-19Merge remote-tracking branch 'qmp/queue/qmp' into stagingAnthony Liguori17-132/+205
* qmp/queue/qmp: qapi: Convert migrate Purge migration of (almost) everything to do with monitors Error: Introduce error_copy() QError: Introduce new errors for the migration command
2012-03-19spice: fix broken initializationAlon Levy2-8/+6
Commit 1b71f7c14fab6f00c2680d4489fbee7baf796e4f moved MODULE_INIT_QOM to way before MODULE_INIT_MACHINE, thereby breaking assumptions made in spice-core.c which registered both a type initializer and a machine intializer. This fix removes the type registration, and replaces it with calling qemu_spice_init in vl.c after command line parsing (second pass) is done, and after timers are armed, required by spice server. Signed-off-by: Alon Levy <alevy@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2012-03-19hw/qxl.c: Fix compilation failures on 32 bit hostsPeter Maydell1-8/+8
Fix compilation failures on 32 bit hosts (cast from pointer to integer of different size; %ld expects 'long int' not uint64_t). Reported-by: Steve Langasek <steve.langasek@canonical.com> Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2012-03-19qxl/qxl_render.c: add trace eventsAlon Levy2-9/+11
Signed-off-by: Alon Levy <alevy@redhat.com> Reviewed-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2012-03-19qxl: switch qxl.c to trace-eventsAlon Levy3-74/+140
dprint is still used for qxl_init_common one time prints. also switched parts of spice-display.c over, mainly all the callbacks to spice server. All qxl device trace events start with the qxl device id. Signed-off-by: Alon Levy <alevy@redhat.com> Reviewed-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2012-03-19qxl: init_pipe_signaling: exit on failureAlon Levy1-10/+11
If pipe creation fails, exit, don't log and continue. Fix indentation at the same time. Signed-off-by: Alon Levy <alevy@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2012-03-19monitor: fix client_migrate_info error handlingYonit Halperin1-0/+5
Report QERR_MISSING_PARAMETER when port is missing. Otherwise QERR_UNDEFINED_ERROR will occur. rhbz #795652 Signed-off-by: Yonit Halperin <yhalperi@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2012-03-19spice: set spice uuid and nameMarc-André Lureau1-0/+6
This allows a Spice client to identify a VM Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2012-03-19qemu-ga: for w32, fix leaked handle ov.hEvent in ga_channel_write()Jeff Cody1-0/+4
In the function ga_channel_write(), the handle ov.hEvent is created by the call to CreateEvent(). However, the handle is not closed prior to the function return. This patch closes the handle before the return of the function. Kudos to Paolo Bonzini for spotting this bug. Signed-off-by: Jeff Cody <jcody@redhat.com> Acked-by: Michael Roth <mdroth@linux.vnet.ibm.com> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
2012-03-19ioapic: fix build with DEBUG_IOAPICJason Wang1-1/+1
ioapic.c:198: error: format ‘%08x’ expects type ‘unsigned int’, but argument 3 has type ‘uint64_t’ Signed-off-by: Jason Wang <jasowang@redhat.com> Reviewed-by: Andreas Färber <afaerber@suse.de> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
2012-03-19.gitignore: add qemu-bridge-helper and option rom build productsDavid Gibson1-0/+6
This adds a few previously missing generated files to .gitignore: the qemu-bridge-helper binary, and more generated versions of the linuxboot, multiboot and kvmvapic roms from pc-bios/optionrom. Signed-off-by: David Gibson <david@gibson.dropbear.id.au> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
2012-03-19cleanup obsolete typedefJoshua Housh1-1/+0
There are no users of i2c_slave. Signed-off-by: Joshua Housh <joshua.housh@calxeda.com> Signed-off-by: Mark Langsdorf <mark.langsdorf@calxeda.com> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
2012-03-19monitor: Remove unused bool field 'qapi' in mon_cmd_t structJeff Cody1-1/+0
Some minor code cleanup: the 'qapi' bool field in mon_cmd_t is unused, and can be removed. Signed-off-by: Jeff Cody <jcody@redhat.com> Acked-by: Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
2012-03-19ds1338: Add missing break statementStefan Weil1-0/+1
Without the break statement, case 5 sets month and year from the same data. This does not look correct. The missing break was reported by splint. Signed-off-by: Stefan Weil <sw@weilnetz.de> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Andreas Färber <afaerber@suse.de> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
2012-03-19vnc: Fix packed boolean struct membersStefan Weil2-3/+5
This patch fixes warnings reported by splint: For variables which are packed in a single bit, a signed data type like 'int' does not make much sense. There is no obvious reason why the two values should be packed, so I removed the packing and changed the data type to bool because both are used as boolean values. v2: Some versions of gcc complain after this modification, for example gcc (Debian 4.4.5-8) 4.4.5): ui/vnc-auth-sasl.c: In function ‘vnc_sasl_client_cleanup’: ui/vnc-auth-sasl.c:34: error: suggest parentheses around assignment used as truth value Obviously, the compiler does not like code which does bool = unsigned = bool = 0 Splitting that code in three statements works. Cc: Anthony Liguori <aliguori@us.ibm.com> Signed-off-by: Stefan Weil <sw@weilnetz.de> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
2012-03-19Remove type field in ModuleEntry as it's not usedChen Yufei1-1/+0
Signed-off-by: Chen Yufei <cyfdecyf@gmail.com> Acked-by: Andreas Färber <afaerber@suse.de> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
2012-03-19memory: check for watchpoints when getting code ram_addrAvi Kivity1-1/+2
The code to get the ram_addr from a (tlb entry, vaddr) pair checks that the resulting memory is not MMIO, but neglects to check whether the region is hidden by a watchpoint page. Add the missing check. Signed-off-by: Avi Kivity <avi@redhat.com>
2012-03-19exec: fix write tlb entry misused as iotlbAvi Kivity1-3/+8
A couple of code paths check the lower bits of CPUTLBEntry::addr_write against io_mem_ram as a way of looking for a dirty RAM page. This works by accident since the value is zero, which matches all clear bits for TLB_INVALID, TLB_MMIO, and TLB_NOTDIRTY (indicating dirty RAM). Make it work by design by checking for the proper bits. Signed-off-by: Avi Kivity <avi@redhat.com>
2012-03-18tcg: fix sparc host for AREG0 free operationBlue Swirl1-0/+11
e141ab52d2ea5d0bc6ad3b1ad32841127ca04adc didn't handle the other memory access helper case, fix. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2012-03-18Sparc: avoid AREG0 wrappers for memory access helpersBlue Swirl6-268/+93
Adjust generation of load and store templates so that the functions take a parameter for CPUState instead of relying on global env. Remove wrappers. Move remaining memory helpers to ldst_helper.c. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2012-03-18Sparc: avoid AREG0 for memory access helpersBlue Swirl6-226/+388
Make memory access helpers take a parameter for CPUState instead of relying on global env. Introduce wrappers for load and store ops. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2012-03-18TCG: add 5 arg helpers to def-helper.hBlue Swirl1-0/+26
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2012-03-18softmmu templates: optionally pass CPUState to memory access functionsBlue Swirl16-44/+576
Optionally, make memory access helpers take a parameter for CPUState instead of relying on global env. On most targets, perform simple moves to reorder registers. On i386, switch from regparm(3) calling convention to standard stack-based version. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2012-03-18i386: Remove REGPARMBlue Swirl7-104/+77
Use stack based calling convention (GCC default) for interfacing with generated code instead of register based convention (regparm(3)). Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2012-03-17sparc64: implement PCI and ISA irqsBlue Swirl5-38/+93
Generate correct trap for external interrupts. Map PCI and ISA IRQs to RIC/UltraSPARC-IIi interrupt vectors. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2012-03-17sparc: reset CPU state on resetBlue Swirl2-2/+4
Not strictly accurate for Sparc64 but avoid confusing Valgrind. Reported-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2012-03-17apb: use normal PCI device header for PBM deviceBlue Swirl1-1/+0
PBM has a normal PCI device header, fix. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2012-03-17Merge branch 'arm-devs.for-upstream' of ↵Blue Swirl11-101/+118
git://git.linaro.org/people/pmaydell/qemu-arm * 'arm-devs.for-upstream' of git://git.linaro.org/people/pmaydell/qemu-arm: hw/pxa2xx.c: Fix handling of pxa2xx_i2c variable offset within region hw/pxa2xx_lcd.c: drop target_phys_addr_t usage in device state hw/pxa2xx_dma.c: drop target_phys_addr_t usage in device state ARM: Remove unnecessary subpage workarounds hw/omap_i2c: Convert to qdev
2012-03-17w64: Fix data type of next_tb and tcg_qemu_tb_execStefan Weil4-7/+7
next_tb is the numeric value of a tcg target (= QEMU host) address. Using tcg_target_ulong instead of unsigned long shows this and makes the code portable for hosts with an unusual size of long (w64). The type cast '(long)(next_tb & ~3)' was not needed (casting unsigned long to long does not change the bits, and nor does casting long to pointer for most (= all non w64) hosts. It is removed here. Macro or function tcg_qemu_tb_exec is used to set next_tb. The function also returns next_tb. Therefore tcg_qemu_tb_exec must return a tcg_target_ulong. Signed-off-by: Stefan Weil <sw@weilnetz.de> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2012-03-17softfloat: fix for C99Avi Kivity2-4/+6
C99 appears to consider compound literals as non-constants, and complains when they are used in static initializers. Switch to ordinary initializer syntax. Signed-off-by: Avi Kivity <avi@redhat.com> Acked-by: Andreas Färber <afaerber@suse.de> Reported-by: Andreas Färber <andreas.faerber@web.de> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2012-03-17Merge branch 'target-arm.for-upstream' of ↵Blue Swirl2-25/+43
git://git.linaro.org/people/pmaydell/qemu-arm * 'target-arm.for-upstream' of git://git.linaro.org/people/pmaydell/qemu-arm: target-arm: Decode SETEND correctly in Thumb target-arm: Clear IT bits when taking exceptions in v7M target-arm: Fix typo in ARM946 cp15 c5 handling
2012-03-17Merge branch 'malta' of git://qemu.weilnetz.de/qemuBlue Swirl1-48/+36
* 'malta' of git://qemu.weilnetz.de/qemu: malta: Fix display for LED array malta: Use symbolic hardware addresses malta: Always allocate flash memory malta: Clean allocation of bios region alias
2012-03-17Merge branch 'ppc-for-upstream' of git://repo.or.cz/qemu/agrafBlue Swirl20-175/+293
* 'ppc-for-upstream' of git://repo.or.cz/qemu/agraf: PPC: Fix openpic with relative memregions pseries: Configure PCI bridge using properties PPC: KVM: Synchronize regs on CPU dump kvm: Comparison with ioctl number macros needs to be unsigned ppc: Correctly define POWERPC_INSNS2_DEFAULT pseries: Add support for level interrupts to XICS PPC: Fix large page support in TCG PPC: Add PIR register to POWER7 CPU pseries: Remove PCI device from PCI host bridge code pseries: Remove unused constant from PCI code pseries: Update SLOF firmware image PPC64: Add support for ldbrx and stdbrx instructions pseries: Don't try to munmap() a malloc()ed TCE table ppc: Add missing 'static' to spin_rw_ops PPC: 405: Fix ppc405ep initialization Bad zero comparison for sas_ss_flags on powerpc
2012-03-17vmstate: fix varrays with uint32_t indexesAmos Kong1-0/+2
VMSTATE_VARRAY_UINT32() is used in hw/ds1225y.c, and we checked VMS_VARRAY_UINT32 bit of field->flags in vmstate_load_state(), but we don't check this bit in vmstate_save_state(). Signed-off-by: Amos Kong <akong@redhat.com> Acked-by: Juan Quintela <quintela@redhat.com> Acked-by: Hervé Poussineau <hpoussin@reactos.org> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>