summaryrefslogtreecommitdiffstats
path: root/hw
Commit message (Collapse)AuthorAgeFilesLines
* Fix fallouts from Linux header inclusionJan Kiszka2011-06-261-0/+10
| | | | | | | | | | | | | | | This is an all-in-one fix for the smaller and bigger mistakes of the build system changes for accompanied Linux headers: - only enable KVM and vhost on Linux hosts - fix powerpc asm header symlink - do not use Linux headers on non-Linux hosts - fix kvmclock for !CONFIG_KVM - fix s390 build on non-Linux hosts Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Tested-by: Andreas Färber <andreas.faerber@web.de> Tested-by: Stefan Weil <weil@mail.berlios.de> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* net: Warn about "-net nic" options which were ignoredPeter Maydell2011-06-221-0/+1
| | | | | | | | | | | Diagnose the case where the user asked for a NIC via "-net nic" but the board didn't instantiate that NIC (for example where the user asked for two NICs but the board only supports one). Note that this diagnostic doesn't apply to NICs created through -device, because those are always instantiated. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* Optimize screendumpAvi Kivity2011-06-221-3/+10
| | | | | | | | | | | | | When running kvm-autotest, fputc() is often the second highest (sometimes #1) function showing up in a profile. This is due to fputc() locking the file for every byte written. Optimize by buffering a line's worth of pixels and writing that out in a single call. Reviewed-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> Signed-off-by: Avi Kivity <avi@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* Merge remote-tracking branch 'qemu-kvm/uq/master' into stagingAnthony Liguori2011-06-221-9/+0
|\
| * kvm: Drop CONFIG_KVM_PARAJan Kiszka2011-06-201-9/+0
| | | | | | | | | | | | | | The kvm_para.h header is now always available. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
* | Merge remote-tracking branch 'mst/for_anthony' into stagingAnthony Liguori2011-06-2253-432/+552
|\ \ | | | | | | | | | | | | Conflicts: hw/usb-uhci.c
| * | wdt: remove unused variablesMichael S. Tsirkin2011-06-161-3/+0
| | | | | | | | | | | | | | | Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Acked-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
| * | usb-ehci: move device/vendor/class id to qdevMichael S. Tsirkin2011-06-151-5/+4
| | | | | | | | | | | | Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
| * | ppce500: move device/vendor/class id to qdevMichael S. Tsirkin2011-06-151-10/+3
| | | | | | | | | | | | Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
| * | pci: don't call qdev pci init methodIsaku Yamahata2011-06-151-4/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | As pci id initialization is moved to common layer, some initialization function can be empty. So don't call init method if NULL. Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
| * | Merge remote-tracking branch 'origin/master' into pciMichael S. Tsirkin2011-06-15105-3048/+5163
| |\ \ | | | | | | | | | | | | | | | | Conflicts: hw/virtio-pci.c
| * | | print meaningful error message in case of --disable-vhost-netMichael Tokarev2011-06-141-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When qemu gets compiled without support of vhost-net, any attempt to use it fails with a very clear error message: qemu-system-x86_64: -netdev ...,vhost=on: vhost-net requested but could not be initialized there's absolutely no reason given _why_ it coult not be initialized, and even strace'ing the process in question does not reveal any errors. So print a message telling what's going on. Signed-off-by: Michael Tokarev <mjt@tls.msk.ru> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
| * | | virtio: compat event idx supportMichael S. Tsirkin2011-06-141-0/+48
| | | | | | | | | | | | | | | | | | | | | | | | Disable event index for compat machine types. Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
| * | | virtio: event index supportMichael S. Tsirkin2011-06-123-10/+97
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Add support for event_idx feature, and utilize it to reduce the number of interrupts and exits for the guest. Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
| * | | msix: Use replace local defines with pci_regs versionsJan Kiszka2011-06-121-25/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This also cleans up an open-coded 64-bit message address readout. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
| * | | pci: Update pci_regs headerJan Kiszka2011-06-122-7/+62
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Pulls in latest version from kernel 3.0-rc2. Some changes around AER now require local defines as QEMU accesses the error source identification register via sub-words. CC: Isaku Yamahata <yamahata@valinux.co.jp> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
| * | | msi: Fix copy&paste mistake in msi_uninitJan Kiszka2011-06-121-1/+1
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
| * | | virtio: correctly initialize vm_runningJason Wang2011-06-121-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Current vm_running was not explicitly initialized and its value was changed by vm state notifier, this may confuse the virtio device being hotplugged such as virtio-net with vhost backend as it may think the vm was not running. Solve this by initialize this value explicitly in virtio_common_init(). Signed-off-by: Jason Wang <jasowang@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
| * | | virtio: guard against negative vq notifiesStefan Hajnoczi2011-06-123-5/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The virtio_queue_notify() function checks that the virtqueue number is less than the maximum number of virtqueues. A signed comparison is used but the virtqueue number could be negative if a buggy or malicious guest is run. This results in memory accesses outside of the virtqueue array. It is risky doing input validation in common code instead of at the guest<->host boundary. Note that virtio_queue_set_addr(), virtio_queue_get_addr(), virtio_queue_get_num(), and many other virtio functions do *not* validate the virtqueue number argument. Instead of fixing the comparison in virtio_queue_notify(), move the comparison to the virtio bindings (just like VIRTIO_PCI_QUEUE_SEL) where we have a uint32_t value and can avoid ever calling into common virtio code if the virtqueue number is invalid. Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
| * | | virtio-pci.c: convert to PCIDEviceInfo to initialize idsIsaku Yamahata2011-06-121-38/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | use PCIDeviceInfo to initialize ids. Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
| * | | hw/xio3130_upstream.c: convert to PCIDeviceInfo to initialize idsIsaku Yamahata2011-06-121-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | use PCIDeviceInfo to initialize ids. Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
| * | | hw/xio3130_downstream.c: convert to PCIDeviceInfo to initialize idsIsaku Yamahata2011-06-121-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | use PCIDeviceInfo to initialize ids. Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
| * | | hw/wdt_i6300esb.c: convert to PCIDeviceInfo to initialize idsIsaku Yamahata2011-06-121-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | use PCIDeviceInfo to initialize ids. Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
| * | | hw/vt82c686.c: convert to PCIDeviceInfo to initialize idsIsaku Yamahata2011-06-121-19/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | use PCIDeviceInfo to initialize ids. Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
| * | | hw/vga-pci.c: convert to PCIDeviceInfo to initialize idsIsaku Yamahata2011-06-121-6/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | use PCIDeviceInfo to initialize ids. Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
| * | | hw/versatile_pci.c: convert to PCIDeviceInfo to initialize idsIsaku Yamahata2011-06-121-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | use PCIDeviceInfo to initialize ids. Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
| * | | hw/usb-ohci.c: convert to PCIDeviceInfo to initialize idsIsaku Yamahata2011-06-121-4/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | use PCIDeviceInfo to initialize ids. Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
| * | | hw/unin_pci.c: convert to PCIDeviceInfo to initialize idsIsaku Yamahata2011-06-121-17/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | use PCIDeviceInfo to initialize ids. Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
| * | | hw/sun4u.c: convert to PCIDeviceInfo to initialize idsIsaku Yamahata2011-06-121-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | use PCIDeviceInfo to initialize ids. Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
| * | | hw/sh_pci.c: convert to PCIDeviceInfo to initialize idsIsaku Yamahata2011-06-121-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | use PCIDeviceInfo to initialize ids. Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
| * | | hw/rtl8139.c: convert to PCIDeviceInfo to initialize idsIsaku Yamahata2011-06-121-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | use PCIDeviceInfo to initialize ids. Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
| * | | hw/qxl.c: convert to PCIDeviceInfo to initialize idsIsaku Yamahata2011-06-121-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | use PCIDeviceInfo to initialize ids. Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
| * | | hw/piix_pci.c: convert to PCIDeviceInfo to initialize idsIsaku Yamahata2011-06-121-12/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | use PCIDeviceInfo to initialize ids. Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
| * | | hw/piix4.c: convert to PCIDeviceInfo to initialize idsIsaku Yamahata2011-06-121-7/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | use PCIDeviceInfo to initialize ids. Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
| * | | hw/pcnet-pci.c: convert to PCIDeviceInfo to initialize idsIsaku Yamahata2011-06-121-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | use PCIDeviceInfo to initialize ids. Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
| * | | hw/ne2000.c: convert to PCIDeviceInfo to initialize idsIsaku Yamahata2011-06-121-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | use PCIDeviceInfo to initialize ids. Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
| * | | hw/lsi53c895a.c: convert to PCIDeviceInfo to initialize idsIsaku Yamahata2011-06-121-9/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | use PCIDeviceInfo to initialize ids. Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
| * | | hw/ivshmem.c: convert to PCIDeviceInfo to initialize idsIsaku Yamahata2011-06-121-5/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | use PCIDeviceInfo to initialize ids. Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
| * | | hw/ioh3420.c: convert to PCIDeviceInfo to initialize idsIsaku Yamahata2011-06-121-4/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | use PCIDeviceInfo to initialize ids. Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
| * | | hw/intel-hda.c: convert to PCIDeviceInfo to initialize idsIsaku Yamahata2011-06-121-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | use PCIDeviceInfo to initialize ids. Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
| * | | hw/ide/via.c: convert to PCIDeviceInfo to initialize idsIsaku Yamahata2011-06-121-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | use PCIDeviceInfo to initialize ids. Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
| * | | hw/ide/ich.c: convert to PCIDeviceInfo to initialize idsIsaku Yamahata2011-06-121-5/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | use PCIDeviceInfo to initialize ids. Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
| * | | hw/ide/cmd646.c: convert to PCIDeviceInfo to initialize idsIsaku Yamahata2011-06-121-6/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | use PCIDeviceInfo to initialize ids. Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
| * | | hw/gt64xxx.c: convert to PCIDeviceInfo to initialize idsIsaku Yamahata2011-06-121-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | use PCIDeviceInfo to initialize ids. Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
| * | | hw/grackle_pci.c: convert to PCIDeviceInfo to initialize idsIsaku Yamahata2011-06-121-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | use PCIDeviceInfo to initialize ids. Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
| * | | hw/es1370.c: convert to PCIDeviceInfo to initialize idsIsaku Yamahata2011-06-121-13/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | use PCIDeviceInfo to initialize ids. Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
| * | | hw/e1000.c: convert to PCIDeviceInfo to initialize idsIsaku Yamahata2011-06-121-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | use PCIDeviceInfo to initialize ids. Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
| * | | hw/cirrus_vga.c: convert to PCIDeviceInfo to initialize idsIsaku Yamahata2011-06-121-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | use PCIDeviceInfo to initialize ids. Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
| * | | hw/bonito.c: convert to PCIDeviceInfo to initialize idsIsaku Yamahata2011-06-121-4/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | use PCIDeviceInfo to initialize ids. Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
| * | | hw/acpi_piix4.c: convert to PCIDeviceInfo to initialize idsIsaku Yamahata2011-06-121-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | use PCIDeviceInfo to initialize ids. Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
OpenPOWER on IntegriCloud