1. 28 4月, 2020 2 次提交
  2. 27 4月, 2020 3 次提交
    • D
      qemu: Add capability for IBS pSeries feature · 199dd6f6
      Daniel Henrique Barboza 提交于
      IBS (Indirect Branch Speculation) is the last capability added
      in QEMU 2.12 related to Spectre mitigation for Power. It was
      added in commit 4be8d4e7d935.
      
      This patch introduces it as QEMU_CAPS_MACHINE_PSERIES_CAP_IBS.
      Like CFPC and SBBC, users might want to tune in IBS based on
      their HW and guest OS requirements, and it's better to do it
      so in a proper Libvirt feature than to put QEMU arguments
      in the middle of the domain XML.
      Signed-off-by: NDaniel Henrique Barboza <danielhb413@gmail.com>
      Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
      199dd6f6
    • D
      qemu: Add capability for SBBC pSeries feature · 249a5c78
      Daniel Henrique Barboza 提交于
      SBBC (Speculation Barrier Bounds Checking) is another capability
      related to Spectre mitigation efforts in Power processors. It
      was implemented in QEMU 2.12 by commit 09114fd81799.
      
      This patch introduces it as QEMU_CAPS_MACHINE_PSERIES_CAP_SBBC to
      be implemented in the next patch. Like the case with the now
      implemented CFPC, exposing this feature in the XML allows for
      a cleaner way for users to tune the SBBC accordingly, given
      that not all hypervisor and guest setups supports this
      Spectre mitigation.
      Signed-off-by: NDaniel Henrique Barboza <danielhb413@gmail.com>
      Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
      249a5c78
    • D
      qemu: Add capability for CFPC pSeries feature · a0a2c8ab
      Daniel Henrique Barboza 提交于
      CFPC (Cache Flush on Privilege Change) is one of the capabilities
      added to QEMU to mitigate Spectre vulnerabilities in Power chips.
      It was implemented in QEMU 2.12 by commit 6898aed77f46.
      
      This capability is still used today due to differences in how
      the host setup (hardware and firmware/kernel) can handle this
      mitigation. Its default value also varies with the pseries machine
      version of the time. There's also certain OSes, like AIX, that
      might not support the default value of the pseries machine the
      guest uses.
      
      Exposing this in the Libvirt XML as a feature will allow users to tune
      CFPC values in a cleaner way, instead of hacking parameters in
      <qemu:commandline> elements.
      Signed-off-by: NDaniel Henrique Barboza <danielhb413@gmail.com>
      Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
      a0a2c8ab
  3. 24 4月, 2020 1 次提交
  4. 13 4月, 2020 1 次提交
  5. 08 4月, 2020 1 次提交
  6. 06 4月, 2020 1 次提交
  7. 01 4月, 2020 1 次提交
  8. 30 3月, 2020 1 次提交
  9. 17 3月, 2020 1 次提交
  10. 14 3月, 2020 1 次提交
  11. 13 3月, 2020 2 次提交
  12. 04 3月, 2020 2 次提交
  13. 25 2月, 2020 1 次提交
  14. 14 2月, 2020 1 次提交
  15. 07 2月, 2020 2 次提交
  16. 06 2月, 2020 1 次提交
  17. 04 2月, 2020 1 次提交
  18. 30 1月, 2020 1 次提交
    • L
      qemu: add capabilities flag for failover feature · cad65f22
      Laine Stump 提交于
      Presence of the virtio-net-pci option called "failover" indicates
      support in a qemu binary of a simplistic bonding of a virtio-net
      device with another PCI device. This feature allows migration of
      guests that have a network device assigned to a guest with VFIO, by
      creating a network bond device in the guest consisting of the
      VFIO-assigned device and a virtio-net-pci device, then temporarily
      (and automatically) unplugging the VFIO net device prior to migration
      (and hotplugging an equivalent device on the migration
      destination). (The feature is called "failover" because the bond
      device uses the vfio-pci netdev for normal guest networking, but
      "fails over" to the virtio-net-pci netdev once the vfio-pci device is
      unplugged for migration.)
      
      Full functioning of the feature also requires support in the
      virtio-net driver in the guest OS (since that is where the bond device
      resides), but if the "failover" commandline option is present for the
      virtio-net-pci device in qemu, at least the qemu part of the feature
      is available, and libvirt can add the proper options to both the
      virtio-net-pci and vfio-pci device commandlines to indicate qemu
      should attempt doing the failover during migration.
      
      This patch just adds the qemu capabilities flag "virtio-net.failover".
      Signed-off-by: NLaine Stump <laine@redhat.com>
      Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com>
      cad65f22
  19. 27 1月, 2020 4 次提交
  20. 25 1月, 2020 2 次提交
  21. 24 1月, 2020 2 次提交
    • M
      qemu_capabilities: Rework domain caps cache · c7600931
      Michal Privoznik 提交于
      Since v5.6.0-48-g270583ed we try to cache domain capabilities,
      i.e. store filled virDomainCaps in a hash table in virQEMUCaps
      for future use. However, there's a race condition in the way it's
      implemented. We use virQEMUCapsGetDomainCapsCache() to obtain the
      pointer to the hash table, then we search the hash table for
      cached data and if none is found the domcaps is constructed and
      put into the table. Problem is that this is all done without any
      locking, so if there are two threads trying to do the same, one
      will succeed and the other will fail inserting the data into the
      table.
      
      Also, the API looks a bit fishy - obtaining pointer to the hash
      table is dangerous.
      
      The solution is to use a mutex that guards the whole operation
      with the hash table. Then, the API can be changes to return
      virDomainCapsPtr directly.
      
      Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1791790Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      Reviewed-by: NPeter Krempa <pkrempa@redhat.com>
      c7600931
    • D
      qemu: fixing auto-detecting binary in domain capabilities · 6d786f95
      Daniel P. Berrangé 提交于
      The virConnectGetDomainCapabilities API accepts either a binary path
      to the emulator, or desired guest arch. If guest arch is not given,
      then the host arch is assumed.
      
      In the case where the binary is not given, the code tried to find the
      emulator binary in the existing list of cached emulator capabilities.
      This is not valid since we switched to lazy population of the cache in:
      
        commit 3dd91af0
        Author: Daniel P. Berrangé <berrange@redhat.com>
        Date:   Mon Dec 2 13:04:26 2019 +0000
      
          qemu: stop creating capabilities at driver startup
      
      As a result of this change, if there are no persistent guests defined
      using the requested guest architecture, virConnectGetDomainCapabilities
      will fail to find an emulator binary.
      
      The solution is to stop relying on the cached capabilities to find the
      binary and instead use the same logic we use to pick default a binary
      per arch when populating capabilities.
      Tested-by: NBoris Fiuczynski <fiuczy@linux.ibm.com>
      Tested-by: NRichard W.M. Jones <rjones@redhat.com>
      Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
      Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
      6d786f95
  22. 23 1月, 2020 1 次提交
  23. 17 1月, 2020 1 次提交
  24. 16 1月, 2020 1 次提交
  25. 13 1月, 2020 1 次提交
  26. 07 1月, 2020 1 次提交
  27. 24 12月, 2019 3 次提交