diff options
author | Alex Williamson <alex.williamson@redhat.com> | 2016-01-19 11:33:42 -0700 |
---|---|---|
committer | Alex Williamson <alex.williamson@redhat.com> | 2016-01-19 11:33:42 -0700 |
commit | 95239e162518dc6577164be3d9a789aba7f591a3 (patch) | |
tree | 357b84f217fbc385239e12863fe87eb514ceef2d /trace-events | |
parent | f5793fd9e1fd89808f4adbfe690235b094176a37 (diff) | |
download | qemu-95239e162518dc6577164be3d9a789aba7f591a3.zip qemu-95239e162518dc6577164be3d9a789aba7f591a3.tar.gz qemu-95239e162518dc6577164be3d9a789aba7f591a3.tar.bz2 |
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 <shyam.kaushik@gmail.com>
Tested-by: Shyam Kaushik <shyam.kaushik@gmail.com>
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
Diffstat (limited to 'trace-events')
-rw-r--r-- | trace-events | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/trace-events b/trace-events index 934a7b6..c9ac144 100644 --- a/trace-events +++ b/trace-events @@ -1631,6 +1631,8 @@ vfio_msi_interrupt(const char *name, int index, uint64_t addr, int data) " (%s) vfio_msix_vector_do_use(const char *name, int index) " (%s) vector %d used" vfio_msix_vector_release(const char *name, int index) " (%s) vector %d released" vfio_msix_enable(const char *name) " (%s)" +vfio_msix_pba_disable(const char *name) " (%s)" +vfio_msix_pba_enable(const char *name) " (%s)" vfio_msix_disable(const char *name) " (%s)" vfio_msi_enable(const char *name, int nr_vectors) " (%s) Enabled %d MSI vectors" vfio_msi_disable(const char *name) " (%s)" |