]> git.baikalelectronics.ru Git - kernel.git/commit
vfio/pci: Virtualize Maximum Payload Size
authorAlex Williamson <alex.williamson@redhat.com>
Mon, 2 Oct 2017 18:39:09 +0000 (12:39 -0600)
committerAlex Williamson <alex.williamson@redhat.com>
Mon, 2 Oct 2017 18:39:09 +0000 (12:39 -0600)
commit16765356baba5bc7a769d1dfbe1d47ff3e07ef57
tree13c8d7b317d59d96b6d933194d2c8f0b816e92f3
parentb888c937506147d5d77f24afb038b53ae6e1b4f2
vfio/pci: Virtualize Maximum Payload Size

With virtual PCI-Express chipsets, we now see userspace/guest drivers
trying to match the physical MPS setting to a virtual downstream port.
Of course a lone physical device surrounded by virtual interconnects
cannot make a correct decision for a proper MPS setting.  Instead,
let's virtualize the MPS control register so that writes through to
hardware are disallowed.  Userspace drivers like QEMU assume they can
write anything to the device and we'll filter out anything dangerous.
Since mismatched MPS can lead to AER and other faults, let's add it
to the kernel side rather than relying on userspace virtualization to
handle it.

Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
Reviewed-by: Eric Auger <eric.auger@redhat.com>
drivers/vfio/pci/vfio_pci_config.c