1. 19 10月, 2015 1 次提交
    • P
      kvm: Pass PCI device pointer to MSI routing functions · dc9f06ca
      Pavel Fedin 提交于
      In-kernel ITS emulation on ARM64 will require to supply requester IDs.
      These IDs can now be retrieved from the device pointer using new
      pci_requester_id() function.
      
      This patch adds pci_dev pointer to KVM GSI routing functions and makes
      callers passing it.
      
      x86 architecture does not use requester IDs, but hw/i386/kvm/pci-assign.c
      also made passing PCI device pointer instead of NULL for consistency with
      the rest of the code.
      Signed-off-by: NPavel Fedin <p.fedin@samsung.com>
      Message-Id: <ce081423ba2394a4efc30f30708fca07656bc500.1444916432.git.p.fedin@samsung.com>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      dc9f06ca
  2. 09 10月, 2015 2 次提交
    • M
      qdev: Protect device-list-properties against broken devices · 4c315c27
      Markus Armbruster 提交于
      Several devices don't survive object_unref(object_new(T)): they crash
      or hang during cleanup, or they leave dangling pointers behind.
      
      This breaks at least device-list-properties, because
      qmp_device_list_properties() needs to create a device to find its
      properties.  Broken in commit f4eb32b5 "qmp: show QOM properties in
      device-list-properties", v2.1.  Example reproducer:
      
          $ qemu-system-aarch64 -nodefaults -display none -machine none -S -qmp stdio
          {"QMP": {"version": {"qemu": {"micro": 50, "minor": 4, "major": 2}, "package": ""}, "capabilities": []}}
          { "execute": "qmp_capabilities" }
          {"return": {}}
          { "execute": "device-list-properties", "arguments": { "typename": "pxa2xx-pcmcia" } }
          qemu-system-aarch64: /home/armbru/work/qemu/memory.c:1307: memory_region_finalize: Assertion `((&mr->subregions)->tqh_first == ((void *)0))' failed.
          Aborted (core dumped)
          [Exit 134 (SIGABRT)]
      
      Unfortunately, I can't fix the problems in these devices right now.
      Instead, add DeviceClass member cannot_destroy_with_object_finalize_yet
      to mark them:
      
      * Hang during cleanup (didn't debug, so I can't say why):
        "realview_pci", "versatile_pci".
      
      * Dangling pointer in cpus: most CPUs, plus "allwinner-a10", "digic",
        "fsl,imx25", "fsl,imx31", "xlnx,zynqmp", because they create such
        CPUs
      
      * Assert kvm_enabled(): "host-x86_64-cpu", host-i386-cpu",
        "host-powerpc64-cpu", "host-embedded-powerpc-cpu",
        "host-powerpc-cpu" (the powerpc ones can't currently reach the
        assertion, because the CPUs are only registered when KVM is enabled,
        but the assertion is arguably in the wrong place all the same)
      
      Make qmp_device_list_properties() fail cleanly when the device is so
      marked.  This improves device-list-properties from "crashes, hangs or
      leaves dangling pointers behind" to "fails".  Not a complete fix, just
      a better-than-nothing work-around.  In the above reproducer,
      device-list-properties now fails with "Can't list properties of device
      'pxa2xx-pcmcia'".
      
      This also protects -device FOO,help, which uses the same machinery
      since commit ef523587 "qdev-monitor: include QOM properties in -device
      FOO, help output", v2.2.  Example reproducer:
      
          $ qemu-system-aarch64 -machine none -device pxa2xx-pcmcia,help
      
      Before:
      
          qemu-system-aarch64: .../memory.c:1307: memory_region_finalize: Assertion `((&mr->subregions)->tqh_first == ((void *)0))' failed.
      
      After:
      
          Can't list properties of device 'pxa2xx-pcmcia'
      
      Cc: "Andreas Färber" <afaerber@suse.de>
      Cc: "Edgar E. Iglesias" <edgar.iglesias@gmail.com>
      Cc: Alexander Graf <agraf@suse.de>
      Cc: Anthony Green <green@moxielogic.com>
      Cc: Aurelien Jarno <aurelien@aurel32.net>
      Cc: Bastian Koppelmann <kbastian@mail.uni-paderborn.de>
      Cc: Blue Swirl <blauwirbel@gmail.com>
      Cc: Eduardo Habkost <ehabkost@redhat.com>
      Cc: Guan Xuetao <gxt@mprc.pku.edu.cn>
      Cc: Jia Liu <proljc@gmail.com>
      Cc: Leon Alrae <leon.alrae@imgtec.com>
      Cc: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
      Cc: Max Filippov <jcmvbkbc@gmail.com>
      Cc: Michael Walle <michael@walle.cc>
      Cc: Paolo Bonzini <pbonzini@redhat.com>
      Cc: Peter Maydell <peter.maydell@linaro.org>
      Cc: Richard Henderson <rth@twiddle.net>
      Cc: qemu-ppc@nongnu.org
      Cc: qemu-stable@nongnu.org
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      Reviewed-by: NEduardo Habkost <ehabkost@redhat.com>
      Message-Id: <1443689999-12182-10-git-send-email-armbru@redhat.com>
      4c315c27
    • S
      target-ppc: Remove unnecessary variable · f9b8e7f6
      Shraddha Barke 提交于
      Compress lines and remove the variable.
      Signed-off-by: NShraddha Barke <shraddha.6596@gmail.com>
      Signed-off-by: NMichael Tokarev <mjt@tls.msk.ru>
      f9b8e7f6
  3. 23 9月, 2015 2 次提交
    • T
      ppc/spapr: Implement H_RANDOM hypercall in QEMU · 4d9392be
      Thomas Huth 提交于
      The PAPR interface defines a hypercall to pass high-quality
      hardware generated random numbers to guests. Recent kernels can
      already provide this hypercall to the guest if the right hardware
      random number generator is available. But in case the user wants
      to use another source like EGD, or QEMU is running with an older
      kernel, we should also have this call in QEMU, so that guests that
      do not support virtio-rng yet can get good random numbers, too.
      
      This patch now adds a new pseudo-device to QEMU that either
      directly provides this hypercall to the guest or is able to
      enable the in-kernel hypercall if available. The in-kernel
      hypercall can be enabled with the use-kvm property, e.g.:
      
       qemu-system-ppc64 -device spapr-rng,use-kvm=true
      
      For handling the hypercall in QEMU instead, a "RngBackend" is
      required since the hypercall should provide "good" random data
      instead of pseudo-random (like from a "simple" library function
      like rand() or g_random_int()). Since there are multiple RngBackends
      available, the user must select an appropriate back-end via the
      "rng" property of the device, e.g.:
      
       qemu-system-ppc64 -object rng-random,filename=/dev/hwrng,id=gid0 \
                         -device spapr-rng,rng=gid0 ...
      
      See http://wiki.qemu-project.org/Features-Done/VirtIORNG for
      other example of specifying RngBackends.
      Signed-off-by: NThomas Huth <thuth@redhat.com>
      Signed-off-by: NDavid Gibson <david@gibson.dropbear.id.au>
      4d9392be
    • A
      spapr: Enable in-kernel H_SET_MODE handling · ef9971dd
      Alexey Kardashevskiy 提交于
      For setting debug watchpoints, sPAPR guests use H_SET_MODE hypercall.
      The existing QEMU H_SET_MODE handler does not support this but
      the KVM handler in HV KVM does. However it is not enabled.
      
      This enables the in-kernel H_SET_MODE handler which handles:
      - Completed Instruction Address Breakpoint Register
      - Watch point 0 registers.
      
      The rest is still handled in QEMU.
      Reported-by: NAnton Blanchard <anton@samba.org>
      Signed-off-by: NAlexey Kardashevskiy <aik@ozlabs.ru>
      Reviewed-by: NDavid Gibson <david@gibson.dropbear.id.au>
      Signed-off-by: NDavid Gibson <david@gibson.dropbear.id.au>
      ef9971dd
  4. 07 7月, 2015 1 次提交
    • M
      target-ppc: fix hugepage support when using memory-backend-file · 2d103aae
      Michael Roth 提交于
      Current PPC code relies on -mem-path being used in order for
      hugepage support to be detected. With the introduction of
      MemoryBackendFile we can now handle this via:
        -object memory-file-backend,mem-path=...,id=hugemem0 \
        -numa node,id=mem0,memdev=hugemem0
      
      Management tools like libvirt treat the 2 approaches as
      interchangeable in some cases, which can lead to user-visible
      regressions even for previously supported guest configurations.
      
      Fix these by also iterating through any configured memory
      backends that may be backed by hugepages.
      
      Since the old code assumed hugepages always backed the entirety
      of guest memory, play it safe an pick the minimum across the
      max pages sizes for all backends, even ones that aren't backed
      by hugepages.
      Signed-off-by: NMichael Roth <mdroth@linux.vnet.ibm.com>
      Reviewed-by: NDavid Gibson <david@gibson.dropbear.id.au>
      Signed-off-by: NAlexander Graf <agraf@suse.de>
      2d103aae
  5. 01 7月, 2015 1 次提交
    • J
      kvm: First step to push iothread lock out of inner run loop · 4b8523ee
      Jan Kiszka 提交于
      This opens the path to get rid of the iothread lock on vmexits in KVM
      mode. On x86, the in-kernel irqchips has to be used because we otherwise
      need to synchronize APIC and other per-cpu state accesses that could be
      changed concurrently.
      
      Regarding pre/post-run callbacks, s390x and ARM should be fine without
      specific locking as the callbacks are empty. MIPS and POWER require
      locking for the pre-run callback.
      
      For the handle_exit callback, it is non-empty in x86, POWER and s390.
      Some POWER cases could do without the locking, but it is left in
      place for now.
      Signed-off-by: NJan Kiszka <jan.kiszka@siemens.com>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      Message-Id: <1434646046-27150-7-git-send-email-pbonzini@redhat.com>
      4b8523ee
  6. 04 6月, 2015 1 次提交
    • D
      pseries: Enable in-kernel H_LOGICAL_CI_{LOAD, STORE} implementations · 026bfd89
      David Gibson 提交于
      qemu currently implements the hypercalls H_LOGICAL_CI_LOAD and
      H_LOGICAL_CI_STORE as PAPR extensions.  These are used by the SLOF firmware
      for IO, because performing cache inhibited MMIO accesses with the MMU off
      (real mode) is very awkward on POWER.
      
      This approach breaks when SLOF needs to access IO devices implemented
      within KVM instead of in qemu.  The simplest example would be virtio-blk
      using an iothread, because the iothread / dataplane mechanism relies on
      an in-kernel implementation of the virtio queue notification MMIO.
      
      To fix this, an in-kernel implementation of these hypercalls has been made,
      (kernel commit 99342cf "kvmppc: Implement H_LOGICAL_CI_{LOAD,STORE} in KVM"
      however, the hypercalls still need to be enabled from qemu.  This performs
      the necessary calls to do so.
      
      It would be nice to provide some warning if we encounter a problematic
      device with a kernel which doesn't support the new calls.  Unfortunately,
      I can't see a way to detect this case which won't either warn in far too
      many cases that will probably work, or which is horribly invasive.
      Signed-off-by: NDavid Gibson <david@gibson.dropbear.id.au>
      Reviewed-by: NThomas Huth <thuth@redhat.com>
      Signed-off-by: NAlexander Graf <agraf@suse.de>
      026bfd89
  7. 02 6月, 2015 1 次提交
  8. 30 4月, 2015 1 次提交
  9. 12 3月, 2015 1 次提交
  10. 12 1月, 2015 1 次提交
  11. 07 1月, 2015 1 次提交
  12. 05 11月, 2014 1 次提交
  13. 08 9月, 2014 6 次提交
    • A
      PPC: KVM: Use vm check_extension for pv hcall · 6fd33a75
      Alexander Graf 提交于
      To find out whether we support the KVM hypercall interface we need to ask KVM
      on the VM level rather than the global KVM level, because Book3S HV KVM does
      not support it and we play conservative when both HV and PR are loaded.
      
      So instead, use the VM helper that falls back to global KVM enumeration. That
      should cover all cases.
      Signed-off-by: NAlexander Graf <agraf@suse.de>
      6fd33a75
    • B
      ppc: Add hw breakpoint watchpoint support · 88365d17
      Bharat Bhushan 提交于
      This patch adds hardware breakpoint and hardware watchpoint support
      for ppc.
      
      On BOOKE architecture we cannot share debug resources between QEMU
      and guest because:
          When QEMU is using debug resources then debug exception must
          be always enabled. To achieve this we set MSR_DE and also set
          MSRP_DEP so guest cannot change MSR_DE.
      
          When emulating debug resource for guest we want guest
          to control MSR_DE (enable/disable debug interrupt on need).
      
          So above mentioned two configuration cannot be supported
          at the same time. So the result is that we cannot share
          debug resources between QEMU and Guest on BOOKE architecture.
      
      In the current design QEMU gets priority over guest,
      this means that if QEMU is using debug resources then guest
      cannot use them and if guest is using debug resource then
      qemu can overwrite them.
      
      When QEMU is not able to handle debug exception then we inject program
      exception to guest. Yes program exception NOT debug exception and the
      reason is:
       1) QEMU and guest not sharing debug resources
       2) For software breakpoint QEMU uses a ehpriv-1 instruction;
      
       So there cannot be any reason that we are in qemu with exit reason
       KVM_EXIT_DEBUG  for guest set debug exception, only possibility is
       guest executed ehpriv-1 privilege instruction and that's why we are
       injecting program exception.
      Signed-off-by: NBharat Bhushan <Bharat.Bhushan@freescale.com>
      Signed-off-by: NAlexander Graf <agraf@suse.de>
      88365d17
    • B
      ppc: Add software breakpoint support · 8a0548f9
      Bharat Bhushan 提交于
      This patch allow insert/remove software breakpoint.
      
      When QEMU is not able to handle debug exception then we inject
      program exception to guest because for software breakpoint QEMU
      uses a ehpriv-1 instruction;
      So there cannot be any reason that we are in qemu with exit reason
      KVM_EXIT_DEBUG  for guest set debug exception, only possibility is
      guest executed ehpriv-1 privilege instruction and that's why we are
      injecting program exception.
      Signed-off-by: NBharat Bhushan <Bharat.Bhushan@freescale.com>
      [agraf: make deflect comment booke/book3s agnostic]
      Signed-off-by: NAlexander Graf <agraf@suse.de>
      8a0548f9
    • B
      ppc: synchronize excp_vectors for injecting exception · c371c2e3
      Bharat Bhushan 提交于
      This patch synchronizes env->excp_vectors[] with env->iovr[].
      This is required for using the existing interrupt injection mechanism
      for kvm.
      Signed-off-by: NBharat Bhushan <Bharat.Bhushan@freescale.com>
      Signed-off-by: NAlexander Graf <agraf@suse.de>
      c371c2e3
    • B
      ppc: debug stub: Get trap instruction opcode from KVM · 3c902d44
      Bharat Bhushan 提交于
      Get trap instruction opcode from KVM and this opcode will
      be used for setting software breakpoint in following patch
      Signed-off-by: NBharat Bhushan <Bharat.Bhushan@freescale.com>
      Signed-off-by: NAlexander Graf <agraf@suse.de>
      3c902d44
    • N
      spapr: add uuid/host details to device tree · ef951443
      Nikunj A Dadhania 提交于
      Useful for identifying the guest/host uniquely within the
      guest. Adding following properties to the guest root node.
      
      vm,uuid - uuid of the guest
      host-model - Host model number
      host-serial - Host machine serial number
      hypervisor type - Tells its "kvm"
      Signed-off-by: NNikunj A Dadhania <nikunj@linux.vnet.ibm.com>
      Signed-off-by: NAlexander Graf <agraf@suse.de>
      ef951443
  14. 15 7月, 2014 1 次提交
    • A
      spapr: Move RMA memory region registration code · 658fa66b
      Alexey Kardashevskiy 提交于
      PPC970 does not support VRMA (virtual RMA) so real memory required
      for SLOF to execute must be allocated by the KVM_ALLOCATE_RMA ioctl.
      Later this memory is used as a part of the guest RAM area.
      The RMA allocating code also registers a memory region for this piece
      of RAM.
      
      We are going to simplify memory regions layout: RMA memory region
      will be a subregion in the RAM memory region, both starting from zero.
      This way we will not have to take care of start address alignment for
      the piece of RAM next to the RMA.
      
      This moves memory region business closer to the RAM memory region
      creation/allocation code.
      
      As this is a mechanical patch, no change in behaviour is expected.
      Signed-off-by: NAlexey Kardashevskiy <aik@ozlabs.ru>
      [agraf: fix compilation on non-kvm systems]
      Signed-off-by: NAlexander Graf <agraf@suse.de>
      658fa66b
  15. 27 6月, 2014 1 次提交
    • A
      spapr_iommu: Make in-kernel TCE table optional · 9bb62a07
      Alexey Kardashevskiy 提交于
      POWER KVM supports an KVM_CAP_SPAPR_TCE capability which allows allocating
      TCE tables in the host kernel memory and handle H_PUT_TCE requests
      targeted to specific LIOBN (logical bus number) right in the host without
      switching to QEMU. At the moment this is used for emulated devices only
      and the handler only puts TCE to the table. If the in-kernel H_PUT_TCE
      handler finds a LIOBN and corresponding table, it will put a TCE to
      the table and complete hypercall execution. The user space will not be
      notified.
      
      Upcoming VFIO support is going to use the same sPAPRTCETable device class
      so KVM_CAP_SPAPR_TCE is going to be used as well. That means that TCE
      tables for VFIO are going to be allocated in the host as well.
      However VFIO operates with real IOMMU tables and simple copying of
      a TCE to the real hardware TCE table will not work as guest physical
      to host physical address translation is requited.
      
      So until the host kernel gets VFIO support for H_PUT_TCE, we better not
      to register VFIO's TCE in the host.
      
      This adds a place holder for KVM_CAP_SPAPR_TCE_VFIO capability. It is not
      in upstream yet and being discussed so now it is always false which means
      that in-kernel VFIO acceleration is not supported.
      
      This adds a bool @vfio_accel flag to the sPAPRTCETable device telling
      that sPAPRTCETable should not try allocating TCE table in the host kernel
      for VFIO. The flag is false now as at the moment there is no VFIO.
      
      This adds an vfio_accel parameter to spapr_tce_new_table(), the semantic
      is the same. Since there is only emulated PCI and VIO now, the flag is set
      to false. Upcoming VFIO support will set it to true.
      
      This is a preparation patch so no change in behaviour is expected
      Signed-off-by: NAlexey Kardashevskiy <aik@ozlabs.ru>
      Signed-off-by: NAlexander Graf <agraf@suse.de>
      9bb62a07
  16. 16 6月, 2014 9 次提交
    • A
      PPC: KVM: Make pv hcall endian agnostic · d13fc32e
      Alexander Graf 提交于
      There were a few revisions of the Linux kernel that incorrectly swapped
      the hcall instructions when they saw ePAPR compliant hypercalls.
      
      We already have fixups for those in place when running with PR KVM, but
      HV KVM and systems that don't implement hypercalls at all are still broken
      because they fall back to the QEMU implementation of fallback hypercalls.
      
      So let's make the fallback hypercall instruction path endian agnostic. This
      only really works well for 64bit guests, but I don't think there are any 32bit
      systems left that don't implement real pv hcall support, so we'll never get
      into this code path.
      Signed-off-by: NAlexander Graf <agraf@suse.de>
      d13fc32e
    • A
      KVM: target-ppc: Enable TM state migration · 80b3f79b
      Alexey Kardashevskiy 提交于
      This adds migration support for registers saved before Transactional
      Memory (TM) transaction started.
      Signed-off-by: NAlexey Kardashevskiy <aik@ozlabs.ru>
      Reviewed-by: NTom Musta <tommusta@gmail.com>
      Signed-off-by: NAlexander Graf <agraf@suse.de>
      80b3f79b
    • A
      KVM: PPC: Expose fixup hcall capability · 87a91de6
      Alexander Graf 提交于
      New kvm versions expose a PPC_FIXUP_HCALL capability. Make it visible to
      machine code so we can take decisions based on it.
      Signed-off-by: NAlexander Graf <agraf@suse.de>
      87a91de6
    • A
      spapr_iommu: Get rid of window_size in sPAPRTCETable · 523e7b8a
      Alexey Kardashevskiy 提交于
      This removes window_size as it is basically a copy of nb_table
      shifted by SPAPR_TCE_PAGE_SHIFT. As new dynamic DMA windows are
      going to support windows as big as the entire RAM and this number
      will be bigger that 32 capacity, we will have to do something
      about @window_size anyway and removal seems to be the right way to go.
      
      This removes dma_window_start/dma_window_size from sPAPRPHBState as
      they are no longer used.
      Signed-off-by: NAlexey Kardashevskiy <aik@ozlabs.ru>
      Signed-off-by: NAlexander Graf <agraf@suse.de>
      523e7b8a
    • A
      spapr_iommu: Enable multiple TCE requests · da95324e
      Alexey Kardashevskiy 提交于
      Currently only single TCE entry per request is supported (H_PUT_TCE).
      However PAPR+ specification allows multiple entry requests such as
      H_PUT_TCE_INDIRECT and H_STUFF_TCE. Having less transitions to the host
      kernel via ioctls, support of these calls can accelerate IOMMU operations.
      
      This implements H_STUFF_TCE and H_PUT_TCE_INDIRECT.
      
      This advertises "multi-tce" capability to the guest if the host kernel
      supports it (KVM_CAP_SPAPR_MULTITCE) or guest is running in TCG mode.
      Signed-off-by: NAlexey Kardashevskiy <aik@ozlabs.ru>
      Signed-off-by: NAlexander Graf <agraf@suse.de>
      da95324e
    • A
      KVM: PPC: Enable compatibility mode · 6db5bb0f
      Alexey Kardashevskiy 提交于
      The host kernel implements a KVM_REG_PPC_ARCH_COMPAT register which
      this uses to enable a compatibility mode if any chosen.
      
      This sets the KVM_REG_PPC_ARCH_COMPAT register in KVM. ppc_set_compat()
      signals the caller if the mode cannot be enabled by the host kernel.
      Signed-off-by: NAlexey Kardashevskiy <aik@ozlabs.ru>
      [agraf: fix TCG compat setting]
      Signed-off-by: NAlexander Graf <agraf@suse.de>
      6db5bb0f
    • A
      spapr: Add support for time base offset migration · 98a8b524
      Alexey Kardashevskiy 提交于
      This allows guests to have a different timebase origin from the host.
      
      This is needed for migration, where a guest can migrate from one host
      to another and the two hosts might have a different timebase origin.
      However, the timebase seen by the guest must not go backwards, and
      should go forwards only by a small amount corresponding to the time
      taken for the migration.
      
      This is only supported for recent POWER hardware which has the TBU40
      (timebase upper 40 bits) register. That includes POWER6, 7, 8 but not
      970.
      
      This adds kvm_access_one_reg() to access a special register which is not
      in env->spr. This requires kvm_set_one_reg/kvm_get_one_reg patch.
      
      The feature must be present in the host kernel.
      
      This bumps vmstate_spapr::version_id and enables new vmstate_ppc_timebase
      only for it. Since the vmstate_spapr::minimum_version_id remains
      unchanged, migration from older QEMU is supported but without
      vmstate_ppc_timebase.
      Signed-off-by: NAlexey Kardashevskiy <aik@ozlabs.ru>
      Signed-off-by: NAlexander Graf <agraf@suse.de>
      98a8b524
    • A
      KVM: PPC: Don't secretly add 1T segment feature to CPU · 08215d8f
      Alexander Graf 提交于
      When we select a CPU type that does not support 1TB segments, we should
      not expose 1TB just because KVM supports 1TB segments. User configuration
      always wins over feature availability.
      Signed-off-by: NAlexander Graf <agraf@suse.de>
      08215d8f
    • A
      target-ppc: Create versionless CPU class per family if KVM · 5b79b1ca
      Alexey Kardashevskiy 提交于
      At the moment generic version-less CPUs are supported via hardcoded aliases.
      For example, POWER7 is an alias for POWER7_v2.1. So when QEMU is started
      with -cpu POWER7, the POWER7_v2.1 class instance is created.
      
      This approach works for TCG and KVMs other than HV KVM. HV KVM cannot emulate
      PVR value so the guest always sees the real PVR. HV KVM will not allow setting
      PVR other that the host PVR because of that (the kernel patch for it is on
      its way). So in most cases it is impossible to run QEMU with -cpu POWER7
      unless the host PVR is exactly the same as the one from the alias (which
      is now POWER7_v2.3). It was decided that under HV KVM QEMU should use
      -cpu host.
      
      Using "host" CPU type creates a problem for management tools such as libvirt
      because they want to know in advance if the destination guest can possibly
      run on the destination. Since the "host" type is really not a type and will
      always work with any KVM, there is no way for libvirt to know if the migration
      will success.
      
      This registers additional CPU class derived from the host CPU family.
      The name for it is taken from @desc field of the CPU family class.
      Signed-off-by: NAlexey Kardashevskiy <aik@ozlabs.ru>
      Signed-off-by: NAlexander Graf <agraf@suse.de>
      5b79b1ca
  17. 13 5月, 2014 1 次提交
    • P
      kvm: reset state from the CPU's reset method · 50a2c6e5
      Paolo Bonzini 提交于
      Now that we have a CPU object with a reset method, it is better to
      keep the KVM reset close to the CPU reset.  Using qemu_register_reset
      as we do now keeps them far apart.
      
      With this patch, PPC no longer calls the kvm_arch_ function, so
      it can get removed there.  Other arches call it from their CPU
      reset handler, and the function gets an ARMCPU/X86CPU/S390CPU.
      
      Note that ARM- and s390-specific functions are called kvm_arm_*
      and kvm_s390_*, while x86-specific functions are called kvm_arch_*.
      That follows the convention used by the different architectures.
      Changing that is the topic of a separate patch.
      Reviewed-by: NGleb Natapov <gnatapov@redhat.com>
      Reviewed-by: NMichael S. Tsirkin <mst@redhat.com>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      50a2c6e5
  18. 30 4月, 2014 1 次提交
  19. 14 3月, 2014 2 次提交
  20. 05 3月, 2014 5 次提交