summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2017-03-04nios2: avoid anonymous unions in designated initializers.Paolo Bonzini
These cause compilation failures on CentOS 6 or other operating systems with older GCCs. Cc: Richard Henderson <rth@twiddle.net> Cc: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2017-03-04hppa: avoid anonymous unions in designated initializers.Paolo Bonzini
These cause compilation failures on CentOS 6 or other operating systems with older GCCs. Cc: Richard Henderson <rth@twiddle.net> Cc: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Richard Henderson <rth@twiddle.net> Message-id: 1488558530-21016-1-git-send-email-pbonzini@redhat.com Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2017-03-03Merge remote-tracking branch 'remotes/bonzini/tags/for-upstream' into stagingPeter Maydell
* kernel header update (requested by David and Vijay) * GuestPanicInformation fixups (Anton) * record/replay icount fixes (Pavel) * cpu-exec cleanup, unification of icount_decr with tcg_exit_req (me) * KVM_CAP_IMMEDIATE_EXIT support (me) * vmxcap update (me) * iscsi locking fix (me) * VFIO ram device fix (Yongji) * scsi-hd vs. default CD-ROM (Hervé) * SMI migration fix (Dave) * spice-char segfault (Li Qiang) * improved "info mtree -f" (me) # gpg: Signature made Fri 03 Mar 2017 15:43:04 GMT # gpg: using RSA key 0xBFFBD25F78C7AE83 # gpg: Good signature from "Paolo Bonzini <bonzini@gnu.org>" # gpg: aka "Paolo Bonzini <pbonzini@redhat.com>" # Primary key fingerprint: 46F5 9FBD 57D6 12E7 BFD4 E2F7 7E15 100C CD36 69B1 # Subkey fingerprint: F133 3857 4B66 2389 866C 7682 BFFB D25F 78C7 AE83 * remotes/bonzini/tags/for-upstream: (21 commits) iscsi: fix missing unlock memory: show region offset and ROM/RAM type in "info mtree -f" x86: Work around SMI migration breakages spice-char: fix segfault in char_spice_finalize vl: disable default cdrom when using explicitely scsi-hd memory: Introduce DEVICE_HOST_ENDIAN for ram device qmp-events: fix GUEST_PANICKED description formatting qapi: flatten GuestPanicInformation union vmxcap: update for September 2016 SDM vmxcap: port to Python 3 KVM: use KVM_CAP_IMMEDIATE_EXIT kvm: use atomic_read/atomic_set to access cpu->exit_request KVM: move SIG_IPI handling to kvm-all.c KVM: do not use sigtimedwait to catch SIGBUS KVM: remove kvm_arch_on_sigbus cpus: reorganize signal handling code KVM: x86: cleanup SIGBUS handlers cpus: remove ugly cast on sigbus_handler cpu-exec: remove unnecessary check of cpu->exit_request replay: check icount in cpu exec loop ... Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2017-03-03iscsi: fix missing unlockPaolo Bonzini
Reported by Coverity. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2017-03-03memory: show region offset and ROM/RAM type in "info mtree -f"Paolo Bonzini
"info mtree -f" output is currently hard to use for large RAM regions, because there is no hint as to what part of the region is being mapped. Add the offset if it is nonzero. Secondly, FlatView has a readonly field, that can override the MemoryRegion in the presence of aliases. Take it into account. Together, with this patch this: address-space (flat view): KVM-SMRAM 0000000000000000-00000000000bffff (prio 0, ram): pc.ram 00000000000c0000-00000000000c9fff (prio 0, ram): pc.ram 00000000000ca000-00000000000ccfff (prio 0, ram): pc.ram 00000000000cd000-00000000000ebfff (prio 0, ram): pc.ram 00000000000ec000-00000000000effff (prio 0, ram): pc.ram 00000000000f0000-00000000000fffff (prio 0, ram): pc.ram 0000000000100000-00000000bfffffff (prio 0, ram): pc.ram 00000000fd000000-00000000fdffffff (prio 1, ram): vga.vram 00000000febc0000-00000000febdffff (prio 1, i/o): e1000-mmio 00000000febf0400-00000000febf041f (prio 0, i/o): vga ioports remapped 00000000febf0500-00000000febf0515 (prio 0, i/o): bochs dispi interface 00000000febf0600-00000000febf0607 (prio 0, i/o): qemu extended regs 00000000fec00000-00000000fec00fff (prio 0, i/o): kvm-ioapic 00000000fed00000-00000000fed003ff (prio 0, i/o): hpet 00000000fee00000-00000000feefffff (prio 4096, i/o): kvm-apic-msi 00000000fffc0000-00000000ffffffff (prio 0, rom): pc.bios 0000000100000000-000000013fffffff (prio 0, ram): pc.ram becomes this: address-space (flat view): KVM-SMRAM 0000000000000000-00000000000bffff (prio 0, ram): pc.ram 00000000000c0000-00000000000c9fff (prio 0, rom): pc.ram @00000000000c0000 00000000000ca000-00000000000ccfff (prio 0, ram): pc.ram @00000000000ca000 00000000000cd000-00000000000ebfff (prio 0, rom): pc.ram @00000000000cd000 00000000000ec000-00000000000effff (prio 0, ram): pc.ram @00000000000ec000 00000000000f0000-00000000000fffff (prio 0, rom): pc.ram @00000000000f0000 0000000000100000-00000000bfffffff (prio 0, ram): pc.ram @0000000000100000 00000000fd000000-00000000fdffffff (prio 1, ram): vga.vram 00000000febc0000-00000000febdffff (prio 1, i/o): e1000-mmio 00000000febf0400-00000000febf041f (prio 0, i/o): vga ioports remapped 00000000febf0500-00000000febf0515 (prio 0, i/o): bochs dispi interface 00000000febf0600-00000000febf0607 (prio 0, i/o): qemu extended regs 00000000fec00000-00000000fec00fff (prio 0, i/o): kvm-ioapic 00000000fed00000-00000000fed003ff (prio 0, i/o): hpet 00000000fee00000-00000000feefffff (prio 4096, i/o): kvm-apic-msi 00000000fffc0000-00000000ffffffff (prio 0, rom): pc.bios 0000000100000000-000000013fffffff (prio 0, ram): pc.ram @00000000c0000000 This should make it easier to understand what's going on. Cc: Peter Xu <peterx@redhat.com> Cc: "William Tambe" <tambewilliam@gmail.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2017-03-03x86: Work around SMI migration breakagesDr. David Alan Gilbert
Migration from a 2.3.0 qemu results in a reboot on the receiving QEMU due to a disagreement about SM (System management) interrupts. 2.3.0 didn't have much SMI support, but it did set CPU_INTERRUPT_SMI and this gets into the migration stream, but on 2.3.0 it never got delivered. ~2.4.0 SMI interrupt support was added but was broken - so that when a 2.3.0 stream was received it cleared the CPU_INTERRUPT_SMI but never actually caused an interrupt. The SMI delivery was recently fixed by 68c6efe07a, but the effect now is that an incoming 2.3.0 stream takes the interrupt it had flagged but it's bios can't actually handle it(I think partly due to the original interrupt not being taken during boot?). The consequence is a triple(?) fault and a reboot. Tested from: 2.3.1 -M 2.3.0 2.7.0 -M 2.3.0 2.8.0 -M 2.3.0 2.8.0 -M 2.8.0 This corresponds to RH bugzilla entry 1420679. Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Message-Id: <20170223133441.16010-1-dgilbert@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2017-03-03spice-char: fix segfault in char_spice_finalizeLi Qiang
In 'qemu_chr_open_spice_vmc' if the 'psubtype' is NULL, it will call 'char_spice_finalize'. But as the SpiceChardev is not inserted in the 'spice_chars' list, the 'QLIST_REMOVE' will cause a segfault. Add a detect to avoid it. Signed-off-by: Li Qiang <liqiang6-s@360.cn> Message-Id: <1487665107-88004-1-git-send-email-liqiang6-s@360.cn> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Li Qiang <liq3ea@gmail.com>
2017-03-03vl: disable default cdrom when using explicitely scsi-hdHervé Poussineau
In commit af6bf1328ef90fae617857c02697e0174b84d596 (May 2011), ide-hd, ide-cd and scsi-cd have been added to disable default cdrom, "or else you can't put one on secondary master without -nodefaults". Make it the same for scsi-hd, so you can put one on scsi-id 2 without using -nodefaults. scsi-hd has probably been forgotten, as it has been added in the preceding commit (b443ae67130d32ad06b06fc9aa6d04d05ccd93ce). Affected users are the ones using a machine with SCSI devices and start QEMU with -device scsi-hd but without -device scsi-cd or -cdrom In that case, the default cdrom device will disappear instead of being empty. Signed-off-by: Hervé Poussineau <hpoussin@reactos.org> Message-Id: <1487623279-29930-1-git-send-email-hpoussin@reactos.org> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2017-03-03memory: Introduce DEVICE_HOST_ENDIAN for ram deviceYongji Xie
At the moment ram device's memory regions are DEVICE_NATIVE_ENDIAN. It's incorrect. This memory region is backed by a MMIO area in host, so the uint64_t data that MemoryRegionOps read from/write to this area should be host-endian rather than target-endian. Hence, current code does not work when target and host endianness are different which is the most common case on PPC64. To fix it, this introduces DEVICE_HOST_ENDIAN for the ram device. This has been tested on PPC64 BE/LE host/guest in all possible combinations including TCG. Suggested-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Yongji Xie <xyjxie@linux.vnet.ibm.com> Message-Id: <1488171164-28319-1-git-send-email-xyjxie@linux.vnet.ibm.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2017-03-03qmp-events: fix GUEST_PANICKED description formattingAnton Nefedov
Signed-off-by: Anton Nefedov <anton.nefedov@virtuozzo.com> Signed-off-by: Denis V. Lunev <den@openvz.org> CC: Paolo Bonzini <pbonzini@redhat.com> CC: Eric Blake <eblake@redhat.com> Message-Id: <1487614915-18710-4-git-send-email-den@openvz.org> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2017-03-03qapi: flatten GuestPanicInformation unionAnton Nefedov
Signed-off-by: Anton Nefedov <anton.nefedov@virtuozzo.com> Signed-off-by: Denis V. Lunev <den@openvz.org> CC: Paolo Bonzini <pbonzini@redhat.com> CC: Eric Blake <eblake@redhat.com> Message-Id: <1487614915-18710-3-git-send-email-den@openvz.org> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2017-03-03vmxcap: update for September 2016 SDMPaolo Bonzini
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2017-03-03vmxcap: port to Python 3Paolo Bonzini
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2017-03-03KVM: use KVM_CAP_IMMEDIATE_EXITPaolo Bonzini
The purpose of the KVM_SET_SIGNAL_MASK API is to let userspace "kick" a VCPU out of KVM_RUN through a POSIX signal. A signal is attached to a dummy signal handler; by blocking the signal outside KVM_RUN and unblocking it inside, this possible race is closed: VCPU thread service thread -------------------------------------------------------------- check flag set flag raise signal (signal handler does nothing) KVM_RUN However, one issue with KVM_SET_SIGNAL_MASK is that it has to take tsk->sighand->siglock on every KVM_RUN. This lock is often on a remote NUMA node, because it is on the node of a thread's creator. Taking this lock can be very expensive if there are many userspace exits (as is the case for SMP Windows VMs without Hyper-V reference time counter). KVM_CAP_IMMEDIATE_EXIT provides an alternative, where the flag is placed directly in kvm_run so that KVM can see it: VCPU thread service thread -------------------------------------------------------------- raise signal signal handler set run->immediate_exit KVM_RUN check run->immediate_exit The previous patches changed QEMU so that the only blocked signal is SIG_IPI, so we can now stop using KVM_SET_SIGNAL_MASK and sigtimedwait if KVM_CAP_IMMEDIATE_EXIT is available. On a 14-VCPU guest, an "inl" operation goes down from 30k to 6k on an unlocked (no BQL) MemoryRegion, or from 30k to 15k if the BQL is involved. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2017-03-03kvm: use atomic_read/atomic_set to access cpu->exit_requestPaolo Bonzini
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2017-03-03KVM: move SIG_IPI handling to kvm-all.cPaolo Bonzini
This lets us remove a bunch of CONFIG_LINUX defines. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2017-03-03KVM: do not use sigtimedwait to catch SIGBUSPaolo Bonzini
Call kvm_on_sigbus_vcpu asynchronously from the VCPU thread. Information for the SIGBUS can be stored in thread-local variables and processed later in kvm_cpu_exec. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2017-03-03KVM: remove kvm_arch_on_sigbusPaolo Bonzini
Build it on kvm_arch_on_sigbus_vcpu instead. They do the same for "action optional" SIGBUSes, and the main thread should never get "action required" SIGBUSes because it blocks the signal. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2017-03-03cpus: reorganize signal handling codePaolo Bonzini
Move the KVM "eat signals" code under CONFIG_LINUX, in preparation for moving it to kvm-all.c; reraise non-MCE SIGBUS immediately, without passing it to KVM. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2017-03-03KVM: x86: cleanup SIGBUS handlersPaolo Bonzini
This patch should have no semantic change. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2017-03-03cpus: remove ugly cast on sigbus_handlerPaolo Bonzini
The cast is there because sigbus_handler is invoked via sigfd_handler. But it feels just wrong to use struct qemu_signalfd_siginfo in the prototype of a function that is passed to sigaction. Instead, do a simple-minded conversion of qemu_signalfd_siginfo to siginfo_t. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2017-03-03Merge branch 'icount-update' into HEADPaolo Bonzini
Merge the original development branch due to breakage caused by the MTTCG merge. Conflicts: cpu-exec.c translate-common.c Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2017-03-03Merge remote-tracking branch 'remotes/ehabkost/tags/numa-pull-request' into ↵Peter Maydell
staging NUMA documentation update # gpg: Signature made Fri 03 Mar 2017 13:11:25 GMT # gpg: using RSA key 0x2807936F984DC5A6 # gpg: Good signature from "Eduardo Habkost <ehabkost@redhat.com>" # Primary key fingerprint: 5A32 2FD5 ABC4 D3DB ACCF D1AA 2807 936F 984D C5A6 * remotes/ehabkost/tags/numa-pull-request: qemu-options: Rewrite -numa documentation Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2017-03-03Merge remote-tracking branch ↵Peter Maydell
'remotes/dgibson/tags/submodule-update-20170303' into staging submodule updates (SLOF & dtc) 2017-03-03 This set of patches updates the SLOF and dtc submodules for qemu-2.9. The SLOF update could have gone in my ppc pull request earlier today, but I forgot it. It should be safe to apply in either order with that set though. The dtc (and libfdt) update brings us up to dtc 1.4.3 which includes some things that will be useful in future. # gpg: Signature made Fri 03 Mar 2017 06:29:31 GMT # gpg: using RSA key 0x6C38CACA20D9B392 # gpg: Good signature from "David Gibson <david@gibson.dropbear.id.au>" # gpg: aka "David Gibson (Red Hat) <dgibson@redhat.com>" # gpg: aka "David Gibson (ozlabs.org) <dgibson@ozlabs.org>" # gpg: aka "David Gibson (kernel.org) <dwg@kernel.org>" # Primary key fingerprint: 75F4 6586 AE61 A66C C44E 87DC 6C38 CACA 20D9 B392 * remotes/dgibson/tags/submodule-update-20170303: Update dtc submodule to v1.4.3 pseries: Update SLOF firmware image Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2017-03-03qemu-options: Rewrite -numa documentationEduardo Habkost
Rewrite the -numa documentation to clarify what exactly it does. Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> Message-Id: <20170123180632.28942-3-ehabkost@redhat.com> Reviewed-by: Igor Mammedov <imammedo@redhat.com> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
2017-03-03Merge remote-tracking branch 'remotes/berrange/tags/pull-qio-2017-02-27-2' ↵Peter Maydell
into staging Merge qio 2017/02/27 v2 # gpg: Signature made Thu 02 Mar 2017 16:09:27 GMT # gpg: using RSA key 0xBE86EBB415104FDF # gpg: Good signature from "Daniel P. Berrange <dan@berrange.com>" # gpg: aka "Daniel P. Berrange <berrange@redhat.com>" # Primary key fingerprint: DAF3 A6FD B26B 6291 2D0E 8E3F BE86 EBB4 1510 4FDF * remotes/berrange/tags/pull-qio-2017-02-27-2: io: fully parse & validate HTTP headers for websocket protocol handshake tests: fix leaks in test-io-channel-command io: fix decoding when multiple websockets frames arrive at once Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2017-03-03dtc: Revert unintentional submodule downgrade from commit 077dd74239a99Peter Maydell
Commit 077dd74239a99 inadvertently downgraded the 'dtc' submodule, undoing the increment added in commit 6e85fce0225f. Revert this, returning the submodule state to where we should be. Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2017-03-03Merge remote-tracking branch 'remotes/mst/tags/for_upstream' into stagingPeter Maydell
virtio, pc: fixes, features virtio support for region caches broke a bunch of stuff - fixing most of it though it's not ideal. Still pondering the right way to fix it. New: VM gen ID and hotplug for PXB. Signed-off-by: Michael S. Tsirkin <mst@redhat.com> # gpg: Signature made Thu 02 Mar 2017 06:19:17 GMT # gpg: using RSA key 0x281F0DB8D28D5469 # gpg: Good signature from "Michael S. Tsirkin <mst@kernel.org>" # gpg: aka "Michael S. Tsirkin <mst@redhat.com>" # Primary key fingerprint: 0270 606B 6F3C DF3D 0B17 0970 C350 3912 AFBE 8E67 # Subkey fingerprint: 5D09 FD08 71C8 F85B 94CA 8A0D 281F 0DB8 D28D 5469 * remotes/mst/tags/for_upstream: hw/pxb-pcie: fix PCI Express hotplug support tests/acpi: update DSDT after last patch acpi: simplify _OSC virtio: unbreak virtio-pci with IOMMU after caching ring translations virtio: add missing region cache init in virtio_load() virtio: invalidate memory in vring_set_avail_event() virtio: guard vring access when setting notification virtio: check for vring setup in virtio_queue_empty MAINTAINERS: Add VM Generation ID entries tests: Move reusable ACPI code into a utility file qmp/hmp: add query-vm-generation-id and 'info vm-generation-id' commands ACPI: Add Virtual Machine Generation ID support ACPI: Add vmgenid blob storage to the build tables docs: VM Generation ID device description linker-loader: Add new 'write pointer' command Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2017-03-03Update dtc submodule to v1.4.3David Gibson
Since the last submodule update (which was v1.4.2) dtc and libfdt have gained some features which would be useful in qemu. There's now a v1.4.3 upstream release, so update our submodule to point to it. Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2017-03-03pseries: Update SLOF firmware imageAlexey Kardashevskiy
Various fixes in this update, the full list is: > qemu-bootlist: Take the "-boot strict=off" setting properly into account > virtio-scsi: initialize vring avail queue buffers > virtio: Remove global variables in block and 9p driver > Remove superfluous checkpoints in tree.fs > Provide "write" function in the disk-label package > virtio: Implement block write support > scsi: Add SCSI block write support > deblocker: Add a 'write' function > virtio-scsi: Fix descriptor order for SCSI WRITE commands > board-qemu: Add a possibility to use hvterm input instead of USB keyboard > Do not try to use virtio-gpu in VGA mode > virtio: Fix stack comment of virtio-blk-read > envvar: Do not read default values for /options from the NVRAM anymore > envvar: Set properties in /options during "(set-defaults)" Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2017-03-02Merge remote-tracking branch 'remotes/cody/tags/block-pull-request' into stagingPeter Maydell
# gpg: Signature made Thu 02 Mar 2017 03:42:59 GMT # gpg: using RSA key 0xBDBE7B27C0DE3057 # gpg: Good signature from "Jeffrey Cody <jcody@redhat.com>" # gpg: aka "Jeffrey Cody <jeff@codyprime.org>" # gpg: aka "Jeffrey Cody <codyprime@gmail.com>" # Primary key fingerprint: 9957 4B4D 3474 90E7 9D98 D624 BDBE 7B27 C0DE 3057 * remotes/cody/tags/block-pull-request: block/rbd: add support for 'mon_host', 'auth_supported' via QAPI block/rbd: add blockdev-add support block/rbd: parse all options via bdrv_parse_filename block/rbd: add all the currently supported runtime_opts block/rbd: don't copy strings in qemu_rbd_next_tok() Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2017-03-02Merge remote-tracking branch 'remotes/rth/tags/pull-tgt-20170302' into stagingPeter Maydell
Queued sparc patch # gpg: Signature made Wed 01 Mar 2017 19:53:21 GMT # gpg: using RSA key 0xAD1270CC4DD0279B # gpg: Good signature from "Richard Henderson <rth7680@gmail.com>" # gpg: aka "Richard Henderson <rth@redhat.com>" # gpg: aka "Richard Henderson <rth@twiddle.net>" # Primary key fingerprint: 9CB1 8DDA F8E8 49AD 2AFC 16A4 AD12 70CC 4DD0 279B * remotes/rth/tags/pull-tgt-20170302: target/sparc: Restore ldstub of odd asis Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2017-03-02Merge remote-tracking branch 'remotes/kraxel/tags/pull-audio-20170301-1' ↵Peter Maydell
into staging audio: replay support, sdl2 fix. # gpg: Signature made Wed 01 Mar 2017 15:38:09 GMT # gpg: using RSA key 0x4CB6D8EED3E87138 # gpg: Good signature from "Gerd Hoffmann (work) <kraxel@redhat.com>" # gpg: aka "Gerd Hoffmann <gerd@kraxel.org>" # gpg: aka "Gerd Hoffmann (private) <kraxel@gmail.com>" # Primary key fingerprint: A032 8CFF B93A 17A7 9901 FE7D 4CB6 D8EE D3E8 7138 * remotes/kraxel/tags/pull-audio-20170301-1: audio/sdlaudio: Allow audio playback with SDL2 audio: make audio poll timer deterministic replay: add record/replay for audio passthrough Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2017-03-02Merge remote-tracking branch 'remotes/kraxel/tags/pull-docs-20170301-1' into ↵Peter Maydell
staging docs: update sample configuration files # gpg: Signature made Wed 01 Mar 2017 13:43:34 GMT # gpg: using RSA key 0x4CB6D8EED3E87138 # gpg: Good signature from "Gerd Hoffmann (work) <kraxel@redhat.com>" # gpg: aka "Gerd Hoffmann <gerd@kraxel.org>" # gpg: aka "Gerd Hoffmann (private) <kraxel@gmail.com>" # Primary key fingerprint: A032 8CFF B93A 17A7 9901 FE7D 4CB6 D8EE D3E8 7138 * remotes/kraxel/tags/pull-docs-20170301-1: mach-virt: Provide sample configuration files q35: Improve sample configuration files Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2017-03-02Merge remote-tracking branch ↵Peter Maydell
'remotes/dgilbert/tags/pull-migration-20170228a' into staging Migration pull Note: The 'postcopy: Update userfaultfd.h header' is part of Paolo's header update and will disappear if applied after it. Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com> # gpg: Signature made Tue 28 Feb 2017 12:38:34 GMT # gpg: using RSA key 0x0516331EBC5BFDE7 # gpg: Good signature from "Dr. David Alan Gilbert (RH2) <dgilbert@redhat.com>" # gpg: WARNING: This key is not certified with a trusted signature! # gpg: There is no indication that the signature belongs to the owner. # Primary key fingerprint: 45F5 C71B 4A0C B7FB 977A 9FA9 0516 331E BC5B FDE7 * remotes/dgilbert/tags/pull-migration-20170228a: (27 commits) postcopy: Add extra check for COPY function postcopy: Add doc about hugepages and postcopy postcopy: Check for userfault+hugepage feature postcopy: Update userfaultfd.h header postcopy: Allow hugepages postcopy: Send whole huge pages postcopy: Mask fault addresses to huge page boundary postcopy: Load huge pages in one go postcopy: Use temporary for placing zero huge pages postcopy: Plumb pagesize down into place helpers postcopy: Record largest page size postcopy: enhance ram_block_discard_range for hugepages exec: ram_block_discard_range postcopy: Chunk discards for hugepages postcopy: Transmit and compare individual page sizes postcopy: Transmit ram size summary word migration: fix use-after-free of to_dst_file migration: Update docs to discourage version bumps migration: fix id leak regression migrate: Introduce a 'dc->vmsd' check to avoid segfault for --only-migratable ... Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2017-03-02Merge remote-tracking branch 'remotes/elmarco/tags/leak-pull-request' into ↵Peter Maydell
staging # gpg: Signature made Wed 01 Mar 2017 09:02:53 GMT # gpg: using RSA key 0xDAE8E10975969CE5 # gpg: Good signature from "Marc-André Lureau <marcandre.lureau@redhat.com>" # gpg: aka "Marc-André Lureau <marcandre.lureau@gmail.com>" # gpg: WARNING: This key is not certified with sufficiently trusted signatures! # gpg: It is not certain that the signature belongs to the owner. # Primary key fingerprint: 87A9 BD93 3F87 C606 D276 F62D DAE8 E109 7596 9CE5 * remotes/elmarco/tags/leak-pull-request: (28 commits) tests: fix virtio-blk-test leaks tests: add specialized device_find function tests: fix usb-test leaks tests: allows to run single test in usb-hcd-ehci-test usb: release the created buses bus: do not unref hotplug handler tests: fix virtio-9p-test leaks tests: fix virtio-scsi-test leak tests: fix e1000e leaks tests: fix i440fx-test leaks tests: fix e1000-test leak tests: fix tco-test leaks tests: fix eepro100-test leak pc: pcihp: avoid adding ACPI_PCIHP_PROP_BSEL twice tests: fix ipmi-bt-test leak tests: fix ipmi-kcs-test leak tests: fix bios-tables-test leak tests: fix hd-geo-test leaks tests: fix ide-test leaks tests: fix vhost-user-test leaks ... Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2017-03-02Merge remote-tracking branch 'remotes/dgibson/tags/ppc-for-2.9-20170301' ↵Peter Maydell
into staging ppc patch queue for 2017-03-01 I was hoping to get this pull request squeezed in before the soft freeze, but I ran into some difficulties during testing. Everything here was at least posted before the soft freeze, so I'm hoping we can still merge it for 2.9. The biggest things here are: * Cleanups to handling of hashed page tables, that will make adding support for the POWER9 MMU easier * Cleanups to the XICS interrupt controller that will make implementing the powernv machine easier * TCG implementation of extended overflow and carry handling for POWER9 It also includes: * Increasing the CPU limit for pseries to 1024 vCPUs * Generating proper OF node names in qemu (making hotplug and coldplug logic closer together) # gpg: Signature made Wed 01 Mar 2017 04:43:06 GMT # gpg: using RSA key 0x6C38CACA20D9B392 # gpg: Good signature from "David Gibson <david@gibson.dropbear.id.au>" # gpg: aka "David Gibson (Red Hat) <dgibson@redhat.com>" # gpg: aka "David Gibson (ozlabs.org) <dgibson@ozlabs.org>" # gpg: aka "David Gibson (kernel.org) <dwg@kernel.org>" # Primary key fingerprint: 75F4 6586 AE61 A66C C44E 87DC 6C38 CACA 20D9 B392 * remotes/dgibson/tags/ppc-for-2.9-20170301: (50 commits) Add PowerPC 32-bit guest memory dump support ppc/xics: rename 'ICPState *' variables to 'icp' ppc/xics: move InterruptStatsProvider to the sPAPR machine ppc/xics: move ics-simple post_load under the machine ppc/xics: remove the XICSState classes ppc/xics: export the XICS init routines ppc/xics: move the ICP array under the sPAPR machine ppc/xics: register the reset handler of ICP objects ppc/xics: simplify spapr_dt_xics() interface ppc/xics: use the QOM interface to grab an ICP ppc/xics: move the cpu_setup() handler under the ICPState class ppc/xics: simplify the cpu_setup() handler ppc/xics: move kernel_xics_fd out of KVMXICSState ppc/xics: extend the QOM interface to handle ICPs ppc/xics: remove the XICS list of ICS ppc/xics: register the reset handler of ICS objects ppc/xics: remove xics_find_source() ppc/xics: use the QOM interface to resend irqs ppc/xics: use the QOM interface to get irqs ppc/xics: use the QOM interface under the sPAPR machine ... Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2017-03-02Merge remote-tracking branch 'remotes/mcayland/tags/qemu-openbios-signed' ↵Peter Maydell
into staging Update OpenBIOS images # gpg: Signature made Tue 28 Feb 2017 22:09:11 GMT # gpg: using RSA key 0x5BC2C56FAE0F321F # gpg: Good signature from "Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>" # Primary key fingerprint: CC62 1AB9 8E82 200D 915C C9C4 5BC2 C56F AE0F 321F * remotes/mcayland/tags/qemu-openbios-signed: Update OpenBIOS images to 0cd97cc built from submodule. Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2017-03-02Merge remote-tracking branch 'remotes/ehabkost/tags/x86-pull-request' into ↵Peter Maydell
staging x86 queue, 2017-02-27 "-cpu max" and query-cpu-model-expansion support for x86. This should be the last x86 pull request before 2.9 soft freeze. # gpg: Signature made Mon 27 Feb 2017 16:24:15 GMT # gpg: using RSA key 0x2807936F984DC5A6 # gpg: Good signature from "Eduardo Habkost <ehabkost@redhat.com>" # Primary key fingerprint: 5A32 2FD5 ABC4 D3DB ACCF D1AA 2807 936F 984D C5A6 * remotes/ehabkost/tags/x86-pull-request: i386: Improve query-cpu-model-expansion full mode i386: Implement query-cpu-model-expansion QMP command i386: Define static "base" CPU model i386: Don't set CPUClass::cpu_def on "max" model i386: Make "max" model not use any host CPUID info on TCG i386: Create "max" CPU model qapi-schema: Comment about full expansion of non-migration-safe models i386: Reorganize and document CPUID initialization steps i386: Rename X86CPU::host_features to X86CPU::max_features i386: Add ordering field to CPUClass i386: Unset cannot_destroy_with_object_finalize_yet on "host" model Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2017-03-02Merge remote-tracking branch 'remotes/kraxel/tags/pull-seabios-20170228-1' ↵Peter Maydell
into staging seabios: update to 1.10.2 release # gpg: Signature made Tue 28 Feb 2017 08:57:57 GMT # gpg: using RSA key 0x4CB6D8EED3E87138 # gpg: Good signature from "Gerd Hoffmann (work) <kraxel@redhat.com>" # gpg: aka "Gerd Hoffmann <gerd@kraxel.org>" # gpg: aka "Gerd Hoffmann (private) <kraxel@gmail.com>" # Primary key fingerprint: A032 8CFF B93A 17A7 9901 FE7D 4CB6 D8EE D3E8 7138 * remotes/kraxel/tags/pull-seabios-20170228-1: seabios: update to 1.10.2 release Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2017-03-02Merge remote-tracking branch 'remotes/rth/tags/pull-tcg-20170301' into stagingPeter Maydell
Queued TCG patch # gpg: Signature made Tue 28 Feb 2017 21:30:32 GMT # gpg: using RSA key 0xAD1270CC4DD0279B # gpg: Good signature from "Richard Henderson <rth7680@gmail.com>" # gpg: aka "Richard Henderson <rth@redhat.com>" # gpg: aka "Richard Henderson <rth@twiddle.net>" # Primary key fingerprint: 9CB1 8DDA F8E8 49AD 2AFC 16A4 AD12 70CC 4DD0 279B * remotes/rth/tags/pull-tcg-20170301: aarch64: Change ext type to TCGType to fix warnings Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2017-03-02hw/pxb-pcie: fix PCI Express hotplug supportMarcel Apfelbaum
Add the missing osc method for pxb-pcie devices as APCI spec recommends, see 6.2.9.1 OSC Implementation Example for PCI Host Bridge Devices, ACPI 3.0a: It is recommended that a machine with multiple host bridge devices should report the same capabilities for all host bridges, and also negotiate control of the features described in the Control Field in the same way for all host bridges. Reviewed-by: Igor Mammedov <imammedo@redhat.com> Signed-off-by: Marcel Apfelbaum <marcel@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2017-03-02tests/acpi: update DSDT after last patchMichael S. Tsirkin
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2017-03-02acpi: simplify _OSCMichael S. Tsirkin
Our _OSC method has a bunch of unused code loading data into external CTRL and SUPP fields which are then never used. Drop this in favor of a single local variable. Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Reviewed-by: Igor Mammedov <imammedo@redhat.com>
2017-03-02virtio: unbreak virtio-pci with IOMMU after caching ring translationsJason Wang
Commit c611c76417f5 ("virtio: add MemoryListener to cache ring translations") registers a memory listener to dma_as. This may not work when IOMMU is enabled: dma_as(bus_master_as) were initialized in pcibus_machine_done() after virtio_realize(). This will cause a segfault. Fixing this by using pci_device_iommu_address_space() instead to make sure address space were initialized at this time. With this fix, IOMMU device were required to be initialized before any virtio-pci devices. Fixes: c611c76417f5 ("virtio: add MemoryListener to cache ring translations") Cc: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Jason Wang <jasowang@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2017-03-02virtio: add missing region cache init in virtio_load()Stefan Hajnoczi
Commit 97cd965c070152bc626c7507df9fb356bbe1cd81 ("virtio: use VRingMemoryRegionCaches for avail and used rings") switched to a memory region cache to avoid repeated map/unmap operations. The virtio_load() process is a little tricky because vring addresses are serialized in two separate places. VIRTIO 1.0 devices serialize desc and then a subsection with used and avail. Legacy devices only serialize desc. Live migration of VIRTIO 1.0 devices fails on the destination host with: VQ 0 size 0x80 < last_avail_idx 0x12f8 - used_idx 0x0 Failed to load virtio-blk:virtio error while loading state for instance 0x0 of device '0000:00:04.0/virtio-blk' This happens because the memory region cache is only initialized after desc is loaded and not after the used and avail subsection is loaded. If the guest chose memory addresses that don't match the legacy ring layout then the wrong guest memory location is accessed. Wait until all ring addresses are known before trying to initialize the region cache. Also clarify the incomplete comment about VIRTIO-1 ring address subsection. Cc: Dr. David Alan Gilbert <dgilbert@redhat.com> Cc: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Reviewed-by: Cornelia Huck <cornelia.huck@de.ibm.com> Tested-by: Eric Auger <eric.auger@redhat.com>
2017-03-02virtio: invalidate memory in vring_set_avail_event()Stefan Hajnoczi
Remember to invalidate the avail event field so the memory pages are marked dirty. Cc: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Tested-by: Eric Auger <eric.auger@redhat.com>
2017-03-02virtio: guard vring access when setting notificationCornelia Huck
Switching to vring caches exposed an existing bug in virtio_queue_set_notification(): We can't access vring structures if they have not been set up yet. This may happen, for example, for virtio-blk devices with multiple queues: The code will try to switch notifiers for every queue, but the guest may have only set up a subset of them. Fix this by guarding access to the vring memory by checking for vring.desc. The first aio poll will iron out any remaining inconsistencies for later-configured queues (buggy legacy drivers). Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2017-03-02virtio: check for vring setup in virtio_queue_emptyPaolo Bonzini
If the vring has not been set up, there is nothing in the virtqueue. virtio_queue_host_notifier_aio_poll calls virtio_queue_empty even in this case; we have to filter it out just like virtio_queue_notify_aio_vq. Reported-by: Gerd Hoffmann <kraxel@redhat.com> Tested-by: Alex Williamson <alex.williamson@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Tested-by: Laszlo Ersek <lersek@redhat.com> Tested-by: Cornelia Huck <cornelia.huck@de.ibm.com>
2017-03-02MAINTAINERS: Add VM Generation ID entriesBen Warren
Signed-off-by: Ben Warren <ben@skyportsystems.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Reviewed-by: Igor Mammedov <imammedo@redhat.com>