• Alex Williamson's avatar
    vfio/pci: Virtualize Maximum Payload Size · 52318497
    Alex Williamson authored
    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: default avatarAlex Williamson <alex.williamson@redhat.com>
    Reviewed-by: default avatarEric Auger <eric.auger@redhat.com>
    52318497
vfio_pci_config.c 47.8 KB