• I
    vfio/pci: fix out-of-sync BAR information on reset · a52a4c47
    Ido Yariv 提交于
    When a PCI device is reset, pci_do_device_reset resets all BAR addresses
    in the relevant PCIDevice's config buffer.
    
    The VFIO configuration space stays untouched, so the guest OS may choose
    to skip restoring the BAR addresses as they would seem intact. The PCI
    device may be left non-operational.
    One example of such a scenario is when the guest exits S3.
    
    Fix this by resetting the BAR addresses in the VFIO configuration space
    as well.
    Signed-off-by: NIdo Yariv <ido@wizery.com>
    Signed-off-by: NAlex Williamson <alex.williamson@redhat.com>
    a52a4c47
pci.c 92.1 KB