1. 03 3月, 2017 25 次提交
    • P
      memory: show region offset and ROM/RAM type in "info mtree -f" · 377a07aa
      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: NPaolo Bonzini <pbonzini@redhat.com>
      377a07aa
    • D
      x86: Work around SMI migration breakages · fc3a1fd7
      Dr. 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 68c6efe0, 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: NDr. David Alan Gilbert <dgilbert@redhat.com>
      Message-Id: <20170223133441.16010-1-dgilbert@redhat.com>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      fc3a1fd7
    • L
      spice-char: fix segfault in char_spice_finalize · f20e6f8c
      Li 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: NLi Qiang <liqiang6-s@360.cn>
      Message-Id: <1487665107-88004-1-git-send-email-liqiang6-s@360.cn>
      Reviewed-by: NMarc-André Lureau <marcandre.lureau@redhat.com>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      Signed-off-by: NLi Qiang <liq3ea@gmail.com>
      f20e6f8c
    • H
      vl: disable default cdrom when using explicitely scsi-hd · f6f99b48
      Hervé Poussineau 提交于
      In commit af6bf132 (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 (b443ae67).
      
      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: NHervé Poussineau <hpoussin@reactos.org>
      Message-Id: <1487623279-29930-1-git-send-email-hpoussin@reactos.org>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      f6f99b48
    • Y
      memory: Introduce DEVICE_HOST_ENDIAN for ram device · c99a29e7
      Yongji 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: NPaolo Bonzini <pbonzini@redhat.com>
      Signed-off-by: NYongji Xie <xyjxie@linux.vnet.ibm.com>
      Message-Id: <1488171164-28319-1-git-send-email-xyjxie@linux.vnet.ibm.com>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      c99a29e7
    • A
      qmp-events: fix GUEST_PANICKED description formatting · 11953be7
      Anton Nefedov 提交于
      Signed-off-by: NAnton Nefedov <anton.nefedov@virtuozzo.com>
      Signed-off-by: NDenis 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: NPaolo Bonzini <pbonzini@redhat.com>
      11953be7
    • A
      qapi: flatten GuestPanicInformation union · e8ed97a6
      Anton Nefedov 提交于
      Signed-off-by: NAnton Nefedov <anton.nefedov@virtuozzo.com>
      Signed-off-by: NDenis 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: NPaolo Bonzini <pbonzini@redhat.com>
      e8ed97a6
    • P
      vmxcap: update for September 2016 SDM · 025533f6
      Paolo Bonzini 提交于
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      025533f6
    • P
      vmxcap: port to Python 3 · c3e31eaa
      Paolo Bonzini 提交于
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      c3e31eaa
    • P
      KVM: use KVM_CAP_IMMEDIATE_EXIT · cf0f7cf9
      Paolo 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: NPaolo Bonzini <pbonzini@redhat.com>
      cf0f7cf9
    • P
      c5c6679d
    • P
      KVM: move SIG_IPI handling to kvm-all.c · 18268b60
      Paolo Bonzini 提交于
      This lets us remove a bunch of CONFIG_LINUX defines.
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      18268b60
    • P
      KVM: do not use sigtimedwait to catch SIGBUS · 2ae41db2
      Paolo 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: NPaolo Bonzini <pbonzini@redhat.com>
      2ae41db2
    • P
      KVM: remove kvm_arch_on_sigbus · 4d39892c
      Paolo 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: NPaolo Bonzini <pbonzini@redhat.com>
      4d39892c
    • P
      cpus: reorganize signal handling code · a16fc07e
      Paolo 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: NPaolo Bonzini <pbonzini@redhat.com>
      a16fc07e
    • P
      KVM: x86: cleanup SIGBUS handlers · 20e0ff59
      Paolo Bonzini 提交于
      This patch should have no semantic change.
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      20e0ff59
    • P
      cpus: remove ugly cast on sigbus_handler · d98d4072
      Paolo 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: NPaolo Bonzini <pbonzini@redhat.com>
      d98d4072
    • P
      Merge branch 'icount-update' into HEAD · 30f3dda2
      Paolo Bonzini 提交于
      Merge the original development branch due to breakage caused by the
      MTTCG merge.
      
      Conflicts:
      	cpu-exec.c
      	translate-common.c
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      30f3dda2
    • P
      dtc: Revert unintentional submodule downgrade from commit 077dd742 · 508e038a
      Peter Maydell 提交于
      Commit 077dd742 inadvertently downgraded the 'dtc' submodule,
      undoing the increment added in commit 6e85fce0. Revert this,
      returning the submodule state to where we should be.
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      508e038a
    • P
      Merge remote-tracking branch 'remotes/mst/tags/for_upstream' into staging · 9a81b792
      Peter 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: NMichael 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: NPeter Maydell <peter.maydell@linaro.org>
      9a81b792
    • P
      Merge remote-tracking branch 'remotes/cody/tags/block-pull-request' into staging · 54639aed
      Peter 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: NPeter Maydell <peter.maydell@linaro.org>
      54639aed
    • P
      Merge remote-tracking branch 'remotes/rth/tags/pull-tgt-20170302' into staging · ecb24d33
      Peter 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: NPeter Maydell <peter.maydell@linaro.org>
      ecb24d33
    • P
      Merge remote-tracking branch 'remotes/kraxel/tags/pull-audio-20170301-1' into staging · 68355048
      Peter Maydell 提交于
      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: NPeter Maydell <peter.maydell@linaro.org>
      68355048
    • P
      Merge remote-tracking branch 'remotes/kraxel/tags/pull-docs-20170301-1' into staging · b49d31a0
      Peter Maydell 提交于
      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: NPeter Maydell <peter.maydell@linaro.org>
      b49d31a0
    • P
      Merge remote-tracking branch 'remotes/dgilbert/tags/pull-migration-20170228a' into staging · 251501a3
      Peter Maydell 提交于
      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: NDr. 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: NPeter Maydell <peter.maydell@linaro.org>
      251501a3
  2. 02 3月, 2017 15 次提交