summaryrefslogtreecommitdiff
path: root/hw
AgeCommit message (Collapse)AuthorFilesLines
2013-12-03xen_disk: mark ioreq as mapped before unmapping in error caseMatthew Daley1-0/+1
Commit 4472beae modified the semantics of ioreq_{un,}map so that they are idempotent if called when they're not needed (ie., twice in a row). However, it neglected to handle the case where batch mapping is not being used (the default), and one of the grants fails to map. In this case, ioreq_unmap will be called to unwind and unmap any mappings already performed, but ioreq_unmap simply returns due to the aforementioned change (the ioreq has not already been marked as mapped). The frontend user can therefore force xen_disk to leak grant mappings, a per-domain limited resource. Fix by marking the ioreq as mapped before calling ioreq_unmap in this situation. Signed-off-by: Matthew Daley <mattjd@gmail.com> Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> (cherry picked from commit a76f48e53382e6f039db6278443e3ce437653302) Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
2013-10-04scsi: Allocate SCSITargetReq r->buf dynamicallyAsias He1-11/+33
BZ: https://bugzilla.redhat.com/show_bug.cgi?id=1007330 Brew: https://brewweb.devel.redhat.com/taskinfo?taskID=6282465 This is the backport of the following commit. The patch is not sent public since it is a embargoed bug. r->buf is hardcoded to 2056 which is (256 + 1) * 8, allowing 256 luns at most. If more than 256 luns are specified by user, we have buffer overflow in scsi_target_emulate_report_luns. To fix, we allocate the buffer dynamically. Signed-off-by: Asias He <asias@redhat.com> Signed-off-by: Asias He <asias@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> *s/&r->buf/r->buf/ due to type change Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
2013-10-01qemu: Adjust qemu wakeupLiu, Jinsong1-1/+2
Currently Xen hvm s3 has a bug coming from the difference between qemu-traditioanl and qemu-xen. For qemu-traditional, the way to resume from hvm s3 is via 'xl trigger' command. However, for qemu-xen, the way to resume from hvm s3 inherited from standard qemu, i.e. via QMP, and it doesn't work under Xen. The root cause is, for qemu-xen, 'xl trigger' command didn't reset devices, while QMP didn't unpause hvm domain though they did qemu system reset. We have two qemu patches and one xl patch to fix Xen hvm s3 bug. This patch is the qemu patch 1. It adjusts qemu wakeup so that Xen s3 resume logic (which will be implemented at qemu patch 2) will be notified after qemu system reset. Signed-off-by: Liu Jinsong <jinsong.liu@intel.com> Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Anthony PERARD <anthony.perard@citrix.com> (cherry picked from commit 4bc78a877252d772b983810a7d2c0be00e9be70e) Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
2013-09-30piix4: disable io on resetMichael S. Tsirkin1-0/+1
io base register at 0x40 is cleared on reset, but io is not disabled until some other event happens to call pm_io_space_update. Invoke pm_io_space_update directly to make this consistent. Cc: qemu-stable@nongnu.org Signed-off-by: Michael S. Tsirkin <mst@redhat.com> (cherry picked from commit c046e8c4a26c902ca1b4f5bdf668a2da6bc75f54) Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
2013-09-25xhci: emulate intr endpoint intervals correctlyGerd Hoffmann1-7/+37
Respect the interval for interrupt endpoints, so we don't finish transfers as fast as possible but at the rate configured by the guest. Fixes guest deadlocks triggered by interrupt storms. Cc: Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> (cherry picked from commit 4d7a81c06f5f17e019a2d3a18300500bd64f6f40) Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
2013-09-24virtio-blk: do not relay a previous driver's WCE configuration to the currentPaolo Bonzini1-2/+22
The following sequence happens: - the SeaBIOS virtio-blk driver does not support the WCE feature, which causes QEMU to disable writeback caching - the Linux virtio-blk driver resets the device, finds WCE is available but writeback caching is disabled; tells block layer to not send cache flush commands - the Linux virtio-blk driver sets the DRIVER_OK bit, which causes writeback caching to be re-enabled, but the Linux virtio-blk driver does not know of this side effect and cache flushes remain disabled The bug is at the third step. If the guest does know about CONFIG_WCE, QEMU should ignore the WCE feature's state. The guest will control the cache mode solely using configuration space. This change makes Linux do flushes correctly, but Linux will keep SeaBIOS's writethrough mode. Hence, whenever the guest is reset, the cache mode of the disk should be reset to whatever was specified in the "-drive" option. With this change, the Linux virtio-blk driver finds that writeback caching is enabled, and tells the block layer to send cache flush commands appropriately. Reported-by: Rusty Russell <rusty@au1.ibm.com Cc: qemu-stable@nongnu.org Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> (cherry picked from commit ef5bc96268ceec64769617dc53b0ac3a20ff351c) Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
2013-09-24kvmvapic: Clear also physical ROM address when entering INACTIVE stateJan Kiszka1-0/+2
To avoid misinterpreting INACTIVE after migration as old qemu-kvm's STANDBY, also clear rom_state_paddr when going back to this state. CC: qemu-stable@nongnu.org Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> (cherry picked from commit 4357930b8a7d2fcff2d8121ec518117428a781e7) Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
2013-09-24kvmvapic: Enter inactive state on hardware resetJan Kiszka1-3/+1
ROM layout may change after reset of devices are hotplugged, so we have to pick up the physical address again when the ROM is initialized. This is best achieved by resetting the state to INACTIVE. CC: qemu-stable@nongnu.org Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> (cherry picked from commit c056bc3f3464cfae1c94b7dd633d3ec13b13b655) Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
2013-09-24kvmvapic: Catch invalid ROM sizeJan Kiszka1-2/+9
If not caught early, a zero-length ROM will cause a NULL-pointer access later on in patch_hypercalls when allocating a zero-length ROM copy and trying to read from it. CC: qemu-stable@nongnu.org Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> (cherry picked from commit 18e5eec4db96a00907eb588a2b803401637c7f67) Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
2013-09-24pcnet-pci: mark I/O and MMIO as LITTLE_ENDIANAurelien Jarno1-2/+2
Now that the memory subsystem is propagating the endianness correctly, the pcnet-pci device should have its I/O ports and MMIO memory marked as LITTLE_ENDIAN, as PCI devices are little endian. This makes the pcnet-pci NIC to work again on big endian MIPS Malta (default NIC). Cc: qemu-stable@nongnu.org Signed-off-by: Aurelien Jarno <aurelien@aurel32.net> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> (cherry picked from commit a26405b350c0d31d5ef53f3b459aeb6eaaf50db0) Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
2013-09-24pc_q35: Initialize Xen.Anthony PERARD1-0/+5
Signed-off-by: Anthony PERARD <anthony.perard@citrix.com> Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Acked-by: Michael S. Tsirkin <mst@redhat.com> (cherry picked from commit 254c12825f93f405658ca3366cd34f8a8ad23511) Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
2013-09-24pc: Initializing ram_memory under Xen.Anthony PERARD1-1/+1
Signed-off-by: Anthony PERARD <anthony.perard@citrix.com> Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Acked-by: Michael S. Tsirkin <mst@redhat.com> CC: qemu-stable@nongnu.org (cherry picked from commit 04d7bad8a4fb23e6d9af9d06ce3ddc28a251d94d) Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
2013-09-24qxl: fix local rendererGerd Hoffmann1-5/+10
The local spice renderer assumes the primary surface is located at the start of the "ram" bar. This used to be a requirement in qxl hardware revision 1. In revision 2+ this is relaxed. Nevertheless guest drivers continued to use the traditional location, for historical and backward compatibility reasons. The qxl kms driver doesn't though as it depends on qxl revision 4+ anyway. Result is that local rendering is hosed for recent linux guests, you'll get pixel garbage with non-spice ui (gtk, sdl, vnc) and when doing screendumps. Fix that by doing a proper mapping of the guest-specified memory location. https://bugzilla.redhat.com/show_bug.cgi?id=948717 Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> (cherry picked from commit c58c7b959b93b864a27fd6b3646ee1465ab8832b) Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
2013-09-24ehci: save device pointer in EHCIStateGerd Hoffmann2-4/+4
We'll need a pointer to the actual pci/sysbus device, stick a pointer to it into the EHCIState struct. https://bugzilla.redhat.com/show_bug.cgi?id=1005495 Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> (cherry picked from commit adbecc89731cf3e0ae656d50ea9fa58c589c4bdc) Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
2013-09-24ne2000: mark I/O as LITTLE_ENDIANAurelien Jarno1-1/+1
Now that the memory subsystem is propagating the endianness correctly, the ne2000 device should have its I/O ports marked as LITTLE_ENDIAN, as PCI devices are little endian. This makes the ne2000 NIC to work again on PowerPC. Cc: qemu-stable@nongnu.org Cc: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> (cherry picked from commit 45d883dcf208160e2db308d1b368beb74f37dc7e) Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
2013-09-24usb: parallelize usb3 streamsGerd Hoffmann1-3/+4
usb3 bulk endpoints with streams are implicitly pipelined now, so the requests will actually be processed in parallel. Also allow them to complete out-of-order. Fixes stalls in the uas driver. Cc: qemu-stable@nongnu.org Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> (cherry picked from commit c96c41ed0d38d68a6c8b6f84751afebafeae31be) Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
2013-09-24xhci: reset port when disabling slotGerd Hoffmann1-0/+1
Cc: qemu-stable@nongnu.org Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> (cherry picked from commit 5c67dd7b4884979a2613a4702ac1ab68b0e6a16e) Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
2013-09-24virtio_pci: fix level interrupts with irqfdMichael S. Tsirkin1-2/+1
commit 62c96360ae7f2c7a8b029277fbb7cb082fdef7fd virtio-pci: fix level interrupts only helps systems without irqfd: on systems with irqfd support we passed in flag requesting irqfd even when msix is disabled. As a result, for level interrupts we didn't install an fd handler so unmasking an fd had no effect. Fix this up. Cc: qemu-stable@nongnu.org Signed-off-by: Michael S. Tsirkin <mst@redhat.com> (cherry picked from commit 23fe2b3f9e7df8da53ac1bc32c6875254911d7f4) Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
2013-09-24adlib: sort offsets in portio registrationHervé Poussineau1-1/+1
This fixes the following assert when -device adlib is used: ioport.c:240: portio_list_add: Assertion `pio->offset >= off_last' failed. Signed-off-by: Hervé Poussineau <hpoussin@reactos.org> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru> (cherry picked from commit 2b21fb57af305f17841d79e7e2e02ad1aec3f5ca) Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
2013-09-24Revert "usb-hub: report status changes only once"Gerd Hoffmann1-5/+1
This reverts commit a309ee6e0a256f690760abfba44fceaa52a7c2f3. This isn't in line with the usb specification and adds regressions, win7 fails to drive the usb hub for example. Was added because it "solved" the issue of hubs interacting badly with the xhci host controller. Now with the root cause being fixed in xhci (commit <FIXME>) we can revert this one. Cc: qemu-stable@nongnu.org Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> (cherry picked from commit bdebd6ee81f4d849aa8541c289203e3992450db0) Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
2013-09-24xhci: fix endpoint interval calculationGerd Hoffmann1-1/+1
Cc: qemu-stable@nongnu.org Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> (cherry picked from commit ca7162782a293f525633e5816470498dd86a51cf) Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
2013-09-24virtio: virtqueue_get_avail_bytes: fix desc_pa when loop over the indirect ↵yinyin1-1/+1
descriptor table virtqueue_get_avail_bytes: when found a indirect desc, we need loop over it. /* loop over the indirect descriptor table */ indirect = 1; max = vring_desc_len(desc_pa, i) / sizeof(VRingDesc); num_bufs = i = 0; desc_pa = vring_desc_addr(desc_pa, i); But, It init i to 0, then use i to update desc_pa. so we will always get: desc_pa = vring_desc_addr(desc_pa, 0); the last two line should swap. Cc: qemu-stable@nongnu.org Signed-off-by: Yin Yin <yin.yin@cs2c.com.cn> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com> (cherry picked from commit 1ae2757c6c4525c9b42f408c86818f843bad7418) Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
2013-09-24pseries: Fix stalls on hypervisor virtual consoleAnton Blanchard1-0/+2
A number of users are reporting stalls when using the pseries hypervisor virtual console. A simple test case is to paste 15 or 17 characters at a time into the console. Pasting 15 characters at a time works fine but pasting 17 characters hangs for a random amount of time. Other activity (network, qemu monitor etc) unblocks it. If qemu-char tries to send more than 16 characters at once, vty_can_receive returns false. At this point we have to wait for the guest to consume that output. Everything is good so far. The problem occurs when the the guest does consume the output. We need to signal back to the qemu-char layer that we are ready for more input. Without this we block until something else kicks us (eg network activity). Signed-off-by: Anton Blanchard <anton@samba.org> Signed-off-by: Alexander Graf <agraf@suse.de> (cherry picked from commit 7770b6f78a2d655e03852a5de238f5926c92be6a) Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
2013-09-24pc: fix regression for 64 bit PCI memoryMichael S. Tsirkin2-6/+11
commit 398489018183d613306ab022653552247d93919f pc: limit 64 bit hole to 2G by default introduced a way for management to control the window allocated to the 64 bit PCI hole. This is useful, but existing management tools do not know how to set this property. As a result, e.g. specifying a large ivshmem device with size > 4G is broken by default. For example this configuration no longer works: -device ivshmem,size=4294967296,chardev=cfoo -chardev socket,path=/tmp/sock,id=cfoo,server,nowait Fix this by detecting that hole size was not specified and defaulting to the backwards-compatible value of 1 << 62. Cc: qemu-stable@nongnu.org Cc: Igor Mammedov <imammedo@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com> (cherry picked from commit 1466cef32dd5e7ef3c6477e96d85d92302ad02e3) Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
2013-09-24scsi: Fix scsi_bus_legacy_add_drive() scsi-generic with serialMarkus Armbruster1-1/+1
scsi_bus_legacy_add_drive() creates either a scsi-disk or a scsi-generic device. It sets property "serial" to argument serial unless null. Crashes with scsi-generic, because it doesn't have such the property. Only usb_msd_initfn_storage() passes non-null serial. Reproducer: $ qemu-system-x86_64 -nodefaults -display none -S -usb \ -drive if=none,file=/dev/sg1,id=usb-drv0 \ -device usb-storage,id=usb-msd0,drive=usb-drv0,serial=123 qemu-system-x86_64: -device usb-storage,id=usb-msd0,drive=usb-drv0,serial=123: Property '.serial' not found Aborted (core dumped) Fix by handling exactly like "removable": set the property only when it exists. Cc: qemu-stable@nongnu.org Reviewed-by: Andreas Färber <afaerber@suse.de> Signed-off-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> (cherry picked from commit c24e7517ee4a98e90eee5f0f07708a1fa12326b3) Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
2013-09-24usb/dev-hid: Modified usb-tablet category from Misc to InputMarcel Apfelbaum1-1/+1
usb-tablet device was wrongly assigned to Misc category Reported-by: Markus Armbruster <armbru@redhat.com> Cc: qemu-stable@nongnu.org Signed-off-by: Marcel Apfelbaum <marcel.a@redhat.com> Reviewed-by: Andreas Färber <afaerber@suse.de> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> (cherry picked from commit 31efd2e883018b4c079ad082105bc161fbb3fef8) Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
2013-08-14mips_malta: do not raise exceptions when accessing invalid memoryAurelien Jarno1-0/+6
Since commit c658b94f6e8c206c59d02aa6fbac285b86b53d2c, MIPS raises exceptions when accessing invalid memory. This is not the correct behaviour for MIPS Malta Core LV, as the GT-64120A system controller just ignore undecoded access. This feature is used by the Linux kernel to probe for some devices. Emulate the correct behaviour in QEMU by adding an empty slot covering the entire memory space decoded by the GT-64120A. Tested-by: Stefan Weil <sw@weilnetz.de> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2013-08-13pvpanic: fix bad mergeAnthony Liguori2-2/+2
Context matching caused the 'has_pvpanic = true' to be applied to the 1.6 machine type instead of the 1.5 machine type. Reported-by: Markus Armbruster <armbru@redhat.com> Reported-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-08-12Merge remote-tracking branch 'afaerber/tags/qom-cpu-for-anthony' into stagingAnthony Liguori2-0/+2
QOM CPUState refactorings * Fix X86CPU Westmere CPUID for pc-*-1.4 and older * afaerber/tags/qom-cpu-for-anthony: pc: Remove PCLMULQDQ from Westmere on pc-*-1.4 and older Conflicts: hw/i386/pc_piix.c hw/i386/pc_q35.c Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-08-12pc: drop external DSDT loadingAnthony Liguori1-1/+0
This breaks migration and is unneeded with modern SeaBIOS. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> Message-id: 1376316104-11269-1-git-send-email-aliguori@us.ibm.com
2013-08-12hw/misc: make pvpanic known to userMarcel Apfelbaum1-15/+10
This patch is based on Hu Tao's: http://lists.nongnu.org/archive/html/qemu-devel/2013-08/msg00125.html The pvpanic device may be enabled now with "-device pvpanic" from command line. Signed-off-by: Marcel Apfelbaum <marcel.a@redhat.com> Reviewed-by: Hu Tao <hutao@cn.fujitsu.com> Message-id: 1376233843-19410-3-git-send-email-marcel.a@redhat.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-08-12hw/misc: don't create pvpanic device by defaultMarcel Apfelbaum2-8/+8
This patch is based on Hu Tao's: http://lists.nongnu.org/archive/html/qemu-devel/2013-08/msg00124.html No need to hard-code pvpanic as part of the machine. It can be added with "-device pvpanic" from command line (The next patch). Anyway, for backport compatibility it is still part of 1.5 machine. Signed-off-by: Marcel Apfelbaum <marcel.a@redhat.com> Reviewed-by: Hu Tao <hutao@cn.fujitsu.com> Message-id: 1376233843-19410-2-git-send-email-marcel.a@redhat.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-08-12pc: Remove PCLMULQDQ from Westmere on pc-*-1.4 and olderEduardo Habkost2-0/+2
Commit 41cb383f42d0cb51d8e3e25e3ecebc954dd4196f made a guest-visible change by adding the PCLMULQDQ bit to Westmere without adding compatibility code to keep the ABI for older machine-types. Fix it by adding the missing compat code. Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-08-12pc_sysfw: do not make it a device anymorePaolo Bonzini6-56/+7
Move the code to hw/i386, the sole remaining property is available as !pci_enabled. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-id: 1376069702-22330-4-git-send-email-aliguori@us.ibm.com Rebased. Signed-off-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-08-12pc_sysfw: remove the rom_only propertyPaolo Bonzini2-66/+7
With the new semantics of pc_sysfw (no -pflash implies "old-style" ROM setup, -pflash implies "new-style" ROM setup), there is no need anymore for a compat property. Old machines simply will never use -pflash, and thus will always use old-style setup. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Message-id: 1376069702-22330-3-git-send-email-aliguori@us.ibm.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-08-12sysfw: remove read-only pc_sysfw_flash_vs_rom_bug_compatiblePaolo Bonzini1-25/+1
The variable is not written anymore. This cleans up after 9e1c2ec (which accidentally left variable pc_sysfw_flash_vs_rom_bug_compatible behind, value always zero), and buries dead code from commit dafb82e (which resurrected the pc_sysfw code for pc_sysfw_flash_vs_rom_bug_compatible by mistake). Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Message-id: 1376069702-22330-2-git-send-email-aliguori@us.ibm.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-08-12Merge remote-tracking branch 'mst/tags/for_anthony' into stagingAnthony Liguori6-4/+22
pci,virtio fixes for 1.6 This includes some last-minute bugfixes for 1.6. All very small patches that also look very safe to me. Signed-off-by: Michael S. Tsirkin <mst@redhat.com> # gpg: Signature made Mon 12 Aug 2013 04:28:57 AM CDT using RSA key ID D28D5469 # gpg: Can't check signature: public key not found # By Michael S. Tsirkin (2) and others # Via Michael S. Tsirkin * mst/tags/for_anthony: vhost: clear signalled_used_valid on vhost stop virtio: clear signalled_used_valid when switching from dataplane i82801b11: Fix i82801b11 PCI host bridge config space pc: disable pci-info for 1.6 Message-id: 1376308831-19978-1-git-send-email-mst@redhat.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-08-12Merge remote-tracking branch 'pmaydell/tags/pull-arm-devs-20130812' into stagingAnthony Liguori2-3/+12
arm-devs queue # gpg: Signature made Mon 12 Aug 2013 05:58:14 AM CDT using RSA key ID 14360CDE # gpg: Can't check signature: public key not found # By Peter Maydell # Via Peter Maydell * pmaydell/tags/pull-arm-devs-20130812: hw/virtio/virtio-mmio: Make QueueNumMax read 0 for unavailable queues hw/virtio/virtio: Don't allow guests to add/remove queues Message-id: 1376305261-29561-1-git-send-email-peter.maydell@linaro.org Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-08-12Merge remote-tracking branch 'kraxel/usb.87' into stagingAnthony Liguori1-2/+11
# By Gerd Hoffmann # Via Gerd Hoffmann * kraxel/usb.87: xhci: implement warm port reset Message-id: 1375961495-20970-1-git-send-email-kraxel@redhat.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-08-12hw/virtio/virtio-mmio: Make QueueNumMax read 0 for unavailable queuesPeter Maydell1-0/+3
The virtio-mmio spec says that QueueNumMax must read zero for queues which are unavailable; implement this, rather than always returning VIRTQUEUE_MAX_SIZE. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Message-id: 1374853288-9912-3-git-send-email-peter.maydell@linaro.org Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
2013-08-12vhost: clear signalled_used_valid on vhost stopMichael S. Tsirkin1-0/+1
When vhost device stops, its implementation synchronizes kernel state back to virtio.c so we can continue emulating the device in userspace. This patch ensures that virtio.c's signalled_used_valid flag is reset so that userspace does not suppress guest notifications due to stale signalled_used values. Cc: qemu-stable@nongnu.org Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2013-08-12virtio: clear signalled_used_valid when switching from dataplaneStefan Hajnoczi2-0/+6
When the dataplane thread stops, its vring.c implementation synchronizes vring state back to virtio.c so we can continue emulating the virtio device. This patch ensures that virtio.c's signalled_used_valid flag is reset so that we do not suppress guest notifications due to stale signalled_used values. Suggested-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2013-08-12i82801b11: Fix i82801b11 PCI host bridge config spaceGerd Hoffmann1-0/+1
pci_bridge_write_config() was not being used. Cc: qemu-stable@nongnu.org Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Andreas Färber <afaerber@suse.de> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2013-08-12pc: disable pci-info for 1.6Michael S. Tsirkin2-4/+14
The BIOS that we ship in 1.6 does not use pci info from host (yet). Several issues turned up (e.g. around winXP boot crashes). So it's safest to disable that interface for 1.6 machine types for now, leave it on for 1.7 as we have enough time to fix issues if any. Reviewed-by: Richard Henderson <rth@twiddle.net> Reviewed-by: Andreas Färber <afaerber@suse.de> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2013-08-09hw/virtio/virtio: Don't allow guests to add/remove queuesPeter Maydell1-3/+9
A queue size of 0 is used to indicate a nonexistent queue, so don't allow the guest to flip a queue between zero-size and non-zero-size. Don't permit setting of negative queue sizes either. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Message-id: 1374853288-9912-2-git-send-email-peter.maydell@linaro.org Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
2013-08-08mips: revert commit b332d24a8e1290954029814d09156b06ede358e2Aurelien Jarno4-9/+14
Now that this code path is not triggered anymore during the tests, revert commit b332d24a8e1290954029814d09156b06ede358e2. Booting a MIPS target without kernel nor bios doesn't really make sense. At the same time replace fprintf(stderr, ...) by error_report(). Reviewed-by: Andreas Färber <afaerber@suse.de> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2013-08-08xhci: implement warm port resetGerd Hoffmann1-2/+11
Without this patch windows can't do port resets for usb3 devices. https://bugzilla.redhat.com/show_bug.cgi?id=949514 Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2013-08-07fw_cfg: the I/O port variant expects little-endianPaolo Bonzini1-1/+1
The I/O port variant of fw_cfg is used by sparc64, which is a big-endian machine. Firmware swaps bytes before sending them to fw_cfg, so we need to unswap them in the device. This is only used on sparc64 and on (little-endian) x86, so it does not affect any other target. 32-bit Sparc and PPC all use memory-mapped fw_cfg. Reported-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com> Tested-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> Message-id: 1375014954-31916-2-git-send-email-pbonzini@redhat.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-08-07Bugfix for loading multiboot kernelsMartijn van den Broek1-4/+3
This patch fixes a bug in rom_copy introduced by commit d60fa42e8bae39440f997ebfe8fe328269a57d16. rom_copy failed to load roms with a "datasize" of 0. As a result, multiboot kernels were not loaded correctly when they contain a segment with a "file size" of 0. https://bugs.launchpad.net/qemu/+bug/1208944 Signed-off-by: Martijn van den Broek <martijn.vdbrk@gmail.com> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Message-id: CAG1x_oET1u3TMPu3r_zzd3ZXsTWQLiaM0zAc+RkHFCwvJjGOvg@mail.gmail.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-08-06target-i386: Fix X86CPU error handlingAndreas Färber1-7/+6
Error **errp argument is not for emitting warnings, it means an error has occurred and the caller should not make any assumptions about the state of other return values (unless otherwise documented). Therefore cpu_x86_create() must unref the new X86CPU itself, and pc_new_cpu() must check for an Error rather than NULL return value. While at it, clean up a superfluous NULL check. Reported-by: Jan Kiszka <jan.kiszka@siemens.com> Cc: qemu-stable@nongnu.org Cc: Igor Mammedov <imammedo@redhat.com> Signed-off-by: Andreas Färber <afaerber@suse.de>