OSDN Git Service

vfio/pci: Virtualize Maximum Read Request Size
authorAlex Williamson <alex.williamson@redhat.com>
Mon, 2 Oct 2017 18:39:10 +0000 (12:39 -0600)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 24 Apr 2018 07:34:15 +0000 (09:34 +0200)
commit502b50e87038e63011dbe83f210292b1c505b6c9
treeee035ce0bf080c2f5a71f07b46fdcfc36d350754
parent4076d92cc204fde02b07ca3a399c89d217c9ff0f
vfio/pci: Virtualize Maximum Read Request Size

commit cf0d53ba4947aad6e471491d5b20a567cbe92e56 upstream.

MRRS defines the maximum read request size a device is allowed to
make.  Drivers will often increase this to allow more data transfer
with a single request.  Completions to this request are bound by the
MPS setting for the bus.  Aside from device quirks (none known), it
doesn't seem to make sense to set an MRRS value less than MPS, yet
this is a likely scenario given that user drivers do not have a
system-wide view of the PCI topology.  Virtualize MRRS such that the
user can set MRRS >= MPS, but use MPS as the floor value that we'll
write to hardware.

Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/vfio/pci/vfio_pci_config.c