summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* cpu_loop_exit: avoid using AREG0Blue Swirl2011-06-2616-56/+57
| | | | | | | Make cpu_loop_exit() take a parameter for CPUState instead of relying on global env. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* Sparc32: dummy implementation of MXCC MMU breakpoint registersBlue Swirl2011-06-263-3/+53
| | | | | | | Add dummy registers for SuperSPARC MXCC MMU counter breakpoints, save and load all MXCC registers. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* Fix fallouts from Linux header inclusionJan Kiszka2011-06-264-18/+40
| | | | | | | | | | | | | | | 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>
* coreaudio: Fix OSStatus format specifierAndreas Färber2011-06-231-1/+1
| | | | | | | | | | | OSStatus type is defined as SInt32. That's signed int on __LP64__ and signed long otherwise. Since it is an explicit 32-bit-width type, cast to corresponsing POSIX type and use PRId32 format specifier. This avoids a warning on ppc64. Cc: malc <av1474@comtv.ru> Signed-off-by: Andreas Faerber <andreas.faerber@web.de> Signed-off-by: malc <av1474@comtv.ru>
* coreaudio: Avoid formatting UInt32 typeAndreas Färber2011-06-231-2/+2
| | | | | | | | | | | | | coreaudioVoiceOut's audioDevicePropertyBufferFrameSize is defined as UInt32 and is being used by reference for AudioDevice{Get,Set}Property(). UInt32 is unsigned int on __LP64__ but unsigned long otherwise. Cast to POSIX type and use PRIu32 format specifier to hide the details. This avoids a warning on ppc64. Cc: malc <av1474@comtv.ru> Signed-off-by: Andreas Faerber <andreas.faerber@web.de> Signed-off-by: malc <av1474@comtv.ru>
* net: Warn about "-net nic" options which were ignoredPeter Maydell2011-06-223-1/+18
| | | | | | | | | | | 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>
* net: Don't warn about the default network setupPeter Maydell2011-06-221-0/+12
| | | | | | | | | | | | | Don't warn about the default network setup that you get if no command line -net options are specified. There are two cases that we would otherwise complain about: (1) board doesn't support a NIC but the implicit "-net nic" requested one (2) CONFIG_SLIRP not set, so the implicit "-net nic" sets up a nic that isn't connected to anything Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* Revert "net: Improve the warnings for dubious command line option combinations"Peter Maydell2011-06-221-31/+0
| | | | | | | | | | This reverts commit f68b9d672b90dedc79aeb9b44607f484dbe46a6b. That attempt at diagnosing unused -net nic options failed to account for NICs created via -device; back it out cleanly in preparation for implementing in a different manner. 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 'qmp/for-anthony' into stagingAnthony Liguori2011-06-226-9/+15
|\
| * Reset system before loadvmJan Kiszka2011-06-161-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In case we load the vmstate during incoming migration, we start from a clean, default machine state as we went through system reset before. But if we load from a snapshot, the machine can be in any state. That can cause troubles if loading an older image which does not carry all state information the executing QEMU requires. Hardly any device takes care of this scenario. However, fixing this is trivial. We just need to issue a system reset during loadvm as well. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
| * Allow silent system resetsJan Kiszka2011-06-163-6/+11
| | | | | | | | | | | | | | | | | | This allows qemu_system_reset to be issued silently for internal purposes, ie. without sending out a monitor event. Convert the system reset after startup to the silent mode. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
| * error framework: Fix compilation for w32/w64Stefan Weil2011-06-162-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The declaration of function error_set() should use macro GCC_FMT_ATTR instead of gcc's format printf attribute. For w32/w64, both declarations are different and GCC_FMT_ATTR is needed. Compilation for w64 even failed with the original code because mingw64 defines a macro for printf. GCC_FMT_ATTR requires qemu-common.h, so add it in error.c (it's also included by error_int.h but too late). Remove assert.h which is included by qemu-common.h. Cc: Luiz Capitulino <lcapitulino@redhat.com> Cc: Anthony Liguori <aliguori@us.ibm.com> Signed-off-by: Stefan Weil <weil@mail.berlios.de> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
* | Merge remote-tracking branch 'qemu-kvm/uq/master' into stagingAnthony Liguori2011-06-2229-327/+2675
|\ \
| * | kvm: fix FPU state subsectionMarcelo Tosatti2011-06-211-3/+3
| | | | | | | | | | | | | | | | | | There is no need to specify version on the subsection fields. Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
| * | KVM: Fix XSAVE feature bit enumerationAndre Przywara2011-06-201-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When iterating through the XSAVE feature enumeration CPUID leaf (0xD) we should not stop at the first zero EAX, but instead keep scanning since there are gaps in the enumeration (ECX=1 for instance). This fixes the proper usage of AVX in KVM guests. Signed-off-by: Andre Przywara <andre.przywara@amd.com> Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
| * | Remove unneeded kvm.h from cpu-exec.cJan Kiszka2011-06-201-1/+0
| | | | | | | | | | | | | | | | | | | | | This was obsoleted by 6792a57bf1. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
| * | kvm: x86: Pass KVMState to kvm_arch_get_supported_cpuidJan Kiszka2011-06-203-24/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | kvm_arch_get_supported_cpuid checks for global cpuid restrictions, it does not require any CPUState reference. Changing its interface allows to call it before any VCPU is initialized. CC: Eduardo Habkost <ehabkost@redhat.com> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
| * | kvm: Clean up stubsJan Kiszka2011-06-201-17/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | No one references kvm_check_extension, kvm_has_vcpu_events, and kvm_has_robust_singlestep outside KVM code. kvm_update_guest_debug is never called, thus has no job besides returning an error. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
| * | kvm: ppc: Drop KVM_CAP build dependenciesJan Kiszka2011-06-201-14/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | No longer needed with accompanied kernel headers. CC: Alexander Graf <agraf@suse.de> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Reviewed-by: Alexander Graf <agraf@suse.de> Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
| * | kvm: x86: Drop KVM_CAP build dependenciesJan Kiszka2011-06-201-64/+3
| | | | | | | | | | | | | | | | | | | | | No longer needed with accompanied kernel headers. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
| * | kvm: Drop KVM_CAP build dependenciesJan Kiszka2011-06-201-8/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | No longer needed with accompanied kernel headers. We are only left with build dependencies that are controlled by kvm arch headers. CC: Alexander Graf <agraf@suse.de> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
| * | kvm: Drop useless zero-initializationsJan Kiszka2011-06-201-5/+0
| | | | | | | | | | | | | | | | | | | | | Backing KVMState is alreay zero-initialized. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
| * | kvm: ppc: Drop CONFIG_KVM_PPC_PVRJan Kiszka2011-06-202-10/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | Required header support is now unconditionally available. CC: Alexander Graf <agraf@suse.de> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Reviewed-by: Alexander Graf <agraf@suse.de> Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
| * | kvm: Drop CONFIG_KVM_PARAJan Kiszka2011-06-203-35/+1
| | | | | | | | | | | | | | | | | | | | | 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>
| * | Switch build system to accompanied kernel headersJan Kiszka2011-06-204-145/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This helps reducing our build-time checks for feature support in the available Linux kernel headers. And it helps users that do not have sufficiently recent headers installed on their build machine. Consequently, the patch removes and build-time checks for kvm and vhost in configure, the --kerneldir switch, and KVM_CFLAGS. Kernel headers are supposed to be provided by QEMU only. s390 needs some extra love as it carries redefinitions from kernel headers. CC: Alexander Graf <agraf@suse.de> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
| * | Import kernel headersJan Kiszka2011-06-2013-0/+2520
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These kernel headers and the COPYING file were automatically imported from current Linux git, cb0a02ecf9 (post 3.0-rc2). Licensing: asm-powerpc GPLv2 asm-s390 GPLv2 asm-x86 Linux top-level license (GPLv2 with exception) linux/kvm*: Linux top-level license (GPLv2 with exception) linux/vhost: Linux top-level license (GPLv2 with exception) linux/virtio*: 3-clause BSB CC: Alexander Graf <agraf@suse.de> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
| * | Add kernel header update scriptJan Kiszka2011-06-202-0/+57
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This helper pulls the required kernel headers for KVM and vhost into a specified directory. The update is triggered via scripts/update-linux-headers.sh LINUX_PATH and will place the output under linux-headers/linux and linux-headers/asm-*. It also imports the COPYING to care for headers without an explicit license. CC: Alexander Graf <agraf@suse.de> CC: Christoph Hellwig <hch@lst.de> CC: Peter Maydell <peter.maydell@linaro.org> CC: Andreas Färber <andreas.faerber@web.de> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
| * | kvm: x86: Save/restore FPU OP, IP and DPJan Kiszka2011-06-193-5/+42
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | These FPU states are properly maintained by KVM but not yet by TCG. So far we unconditionally set them to 0 in the guest which may cause state corruptions, though not with modern guests. To avoid breaking backward migration, use a conditional subsection that is only written if any of the three fields is non-zero. The guest's FNINIT clears them frequently, and cleared IA32_MISC_ENABLE MSR[2] reduces the probability of non-zero values further so that this subsection is not expected to restrict migration in any common scenario. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Avi Kivity <avi@redhat.com>
* | Merge remote-tracking branch 'mst/for_anthony' into stagingAnthony Liguori2011-06-2256-441/+2741
|\ \ | | | | | | | | | | | | 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>
| * | alpha: remove unused variableMichael S. Tsirkin2011-06-161-1/+6
| | | | | | | | | | | | | | | Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Acked-by: Richard Henderson <rth@twiddle.net>
| * | alpha/translate: remve unused variablesMichael S. Tsirkin2011-06-161-2/+1
| | | | | | | | | | | | | | | Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Acked-by: Richard Henderson <rth@twiddle.net>
| * | get_maintainer: update to match qemu treeMichael S. Tsirkin2011-06-161-22/+12
| | | | | | | | | | | | Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
| * | get_maintainer.pl: copy utility from LinuxMichael S. Tsirkin2011-06-151-0/+2159
| | | | | | | | | | | | | | | | | | | | | | | | Our MAINTAINERS file format matches Linux so get the utility to parse it from there. Updated as of linux 3.0-rc3 Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
| * | 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-15283-8726/+22825
| |\ \ | | | | | | | | | | | | | | | | 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>
OpenPOWER on IntegriCloud