]> www.infradead.org Git - users/dwmw2/qemu.git/commit
vfio/pci: Add support for mmapping sub-page MMIO BARs after live migration
authorKunkun Jiang <jiangkunkun@huawei.com>
Wed, 27 Oct 2021 09:04:05 +0000 (17:04 +0800)
committerAlex Williamson <alex.williamson@redhat.com>
Mon, 1 Nov 2021 18:17:51 +0000 (12:17 -0600)
commitf36d4fb85f41604038386e1eb4295acd7d372d86
treea011c8a5774a6ee32c27b393c9ac3312a7e1e1af
parentaf531756d25541a1b3b3d9a14e72e7fedd941a2e
vfio/pci: Add support for mmapping sub-page MMIO BARs after live migration

We can expand MemoryRegions of sub-page MMIO BARs in
vfio_pci_write_config() to improve IO performance for some
devices. However, the MemoryRegions of destination VM are
not expanded any more after live migration. Because their
addresses have been updated in vmstate_load_state()
(vfio_pci_load_config) and vfio_sub_page_bar_update_mapping()
will not be called.

This may result in poor performance after live migration.
So iterate BARs in vfio_pci_load_config() and try to update
sub-page BARs.

Reported-by: Nianyao Tang <tangnianyao@huawei.com>
Reported-by: Qixin Gan <ganqixin@huawei.com>
Signed-off-by: Kunkun Jiang <jiangkunkun@huawei.com>
Link: https://lore.kernel.org/r/20211027090406.761-2-jiangkunkun@huawei.com
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
hw/vfio/pci.c