]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commit
vfio/pci: Virtualize Maximum Payload Size
authorAlex Williamson <alex.williamson@redhat.com>
Tue, 16 Jan 2018 23:40:39 +0000 (17:40 -0600)
committerKhalid Elmously <khalid.elmously@canonical.com>
Fri, 16 Feb 2018 17:42:00 +0000 (12:42 -0500)
commitf96f53d5753eae64346c6bdb30a557380d8fcb48
tree48edce5a1d95b5271c1d8bd51fa8e2a67e93c626
parentab2afcbc0ec8bd463c878aca4546c7ef2911f3bd
vfio/pci: Virtualize Maximum Payload Size

BugLink: https://launchpad.net/bugs/1732804
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>
(cherry picked from commit 523184972b282cd9ca17a76f6ca4742394856818)
Signed-off-by: Manoj Iyer <manoj.iyer@canonical.com>
Acked-by: Paolo Pisati <paolo.pisati@canonical.com>
Acked-by: Khalid Elmously <khalid.elmously@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
drivers/vfio/pci/vfio_pci_config.c