]> www.infradead.org Git - users/jedix/linux-maple.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)
committerBrian Maly <brian.maly@oracle.com>
Mon, 23 Apr 2018 20:21:54 +0000 (16:21 -0400)
commit4d434945048c1fdc18d8d9125f9c17e0cf7c0e63
treec1a7b291f1738bd0f5a4282be2df1da322a14949
parent1931adad0903d098cdfde85259d33898716a27e7
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.

OraBug: 27876914

Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
Reviewed-by: Eric Auger <eric.auger@redhat.com>
(cherry picked from commit 523184972b282cd9ca17a76f6ca4742394856818)
Signed-off-by: Wim ten Have <wim.ten.have@oracle.com>
Reviewed-by: Ross Philipson <ross.philipson@oracle.com>
Signed-off-by: Brian Maly <brian.maly@oracle.com>
drivers/vfio/pci/vfio_pci_config.c