qemu-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-commits] [qemu/qemu] f5793f: vfio/pci-quirks: Only quirk to size o


From: GitHub
Subject: [Qemu-commits] [qemu/qemu] f5793f: vfio/pci-quirks: Only quirk to size of PCI config ...
Date: Thu, 21 Jan 2016 04:30:03 -0800

  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: f5793fd9e1fd89808f4adbfe690235b094176a37
      
https://github.com/qemu/qemu/commit/f5793fd9e1fd89808f4adbfe690235b094176a37
  Author: Alex Williamson <address@hidden>
  Date:   2016-01-19 (Tue, 19 Jan 2016)

  Changed paths:
    M hw/vfio/pci-quirks.c

  Log Message:
  -----------
  vfio/pci-quirks: Only quirk to size of PCI config space

For quirks that support the full PCIe extended config space, limit the
quirk to only the size of config space available through vfio.  This
allows host systems with broken MMCONFIG regions to still make use of
these quirks without generating bad address faults trying to access
beyond the end of config space exposed through vfio.  This may expose
direct access to the mirror of extended config space, only trapping
the sub-range of standard config space, but allowing this makes the
quirk, and thus the device, functional.  We expect that only device
specific accesses make use of the mirror, not general extended PCI
capability accesses, so any virtualization in this space is likely
unnecessary anyway, and the device is still IOMMU isolated, so it
should only be able to hurt itself through any bogus configurations
enabled by this space.

Link: https://www.redhat.com/archives/vfio-users/2015-November/msg00192.html
Reported-by: Ronnie Swanink <address@hidden>
Reviewed-by: Laszlo Ersek <address@hidden>
Signed-off-by: Alex Williamson <address@hidden>


  Commit: 95239e162518dc6577164be3d9a789aba7f591a3
      
https://github.com/qemu/qemu/commit/95239e162518dc6577164be3d9a789aba7f591a3
  Author: Alex Williamson <address@hidden>
  Date:   2016-01-19 (Tue, 19 Jan 2016)

  Changed paths:
    M hw/vfio/pci.c
    M hw/vfio/pci.h
    M trace-events

  Log Message:
  -----------
  vfio/pci: Lazy PBA emulation

The PCI spec recommends devices use additional alignment for MSI-X
data structures to allow software to map them to separate processor
pages.  One advantage of doing this is that we can emulate those data
structures without a significant performance impact to the operation
of the device.  Some devices fail to implement that suggestion and
assigned device performance suffers.

One such case of this is a Mellanox MT27500 series, ConnectX-3 VF,
where the MSI-X vector table and PBA are aligned on separate 4K
pages.  If PBA emulation is enabled, performance suffers.  It's not
clear how much value we get from PBA emulation, but the solution here
is to only lazily enable the emulated PBA when a masked MSI-X vector
fires.  We then attempt to more aggresively disable the PBA memory
region any time a vector is unmasked.  The expectation is then that
a typical VM will run entirely with PBA emulation disabled, and only
when used is that emulation re-enabled.

Reported-by: Shyam Kaushik <address@hidden>
Tested-by: Shyam Kaushik <address@hidden>
Signed-off-by: Alex Williamson <address@hidden>


  Commit: 1cf81ea2e2ecfd2ec046e2b409e75e87808ac4d0
      
https://github.com/qemu/qemu/commit/1cf81ea2e2ecfd2ec046e2b409e75e87808ac4d0
  Author: Peter Maydell <address@hidden>
  Date:   2016-01-21 (Thu, 21 Jan 2016)

  Changed paths:
    M hw/vfio/pci-quirks.c
    M hw/vfio/pci.c
    M hw/vfio/pci.h
    M trace-events

  Log Message:
  -----------
  Merge remote-tracking branch 'remotes/awilliam/tags/vfio-update-20160119.0' 
into staging

VFIO updates 2016-01-19

 - Performance fix for devices with poorly placed MSI-X PBA regions
 - Quirk fix for hosts with broken MMCONFIG access

# gpg: Signature made Tue 19 Jan 2016 19:00:21 GMT using RSA key ID 3BB08B22
# gpg: Good signature from "Alex Williamson <address@hidden>"
# gpg:                 aka "Alex Williamson <address@hidden>"
# gpg:                 aka "Alex Williamson <address@hidden>"
# gpg:                 aka "Alex Williamson <address@hidden>"

* remotes/awilliam/tags/vfio-update-20160119.0:
  vfio/pci: Lazy PBA emulation
  vfio/pci-quirks: Only quirk to size of PCI config space

Signed-off-by: Peter Maydell <address@hidden>


Compare: https://github.com/qemu/qemu/compare/3db34bf64ab4...1cf81ea2e2ec

reply via email to

[Prev in Thread] Current Thread [Next in Thread]