diff options
author | John Levon <john.levon@nutanix.com> | 2025-06-06 17:10:36 -0700 |
---|---|---|
committer | Cédric Le Goater <clg@redhat.com> | 2025-06-11 14:01:58 +0200 |
commit | a574b0614449760a83310226b548e21b08a805fa (patch) | |
tree | 1c9b69cb45506550409104c2f57bc631b8495998 /hw/vfio/pci.c | |
parent | 59adfc6f1843538d78373296fd05a57ced1f3ecb (diff) | |
download | qemu-a574b0614449760a83310226b548e21b08a805fa.zip qemu-a574b0614449760a83310226b548e21b08a805fa.tar.gz qemu-a574b0614449760a83310226b548e21b08a805fa.tar.bz2 |
vfio: mark posted writes in region write callbacks
For vfio-user, the region write implementation needs to know if the
write is posted; add the necessary plumbing to support this.
Signed-off-by: John Levon <john.levon@nutanix.com>
Reviewed-by: Cédric Le Goater <clg@redhat.com>
Link: https://lore.kernel.org/qemu-devel/20250607001056.335310-5-john.levon@nutanix.com
Signed-off-by: Cédric Le Goater <clg@redhat.com>
Diffstat (limited to 'hw/vfio/pci.c')
-rw-r--r-- | hw/vfio/pci.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/hw/vfio/pci.c b/hw/vfio/pci.c index 2901ced..89f9246 100644 --- a/hw/vfio/pci.c +++ b/hw/vfio/pci.c @@ -989,7 +989,7 @@ static int vfio_pci_config_space_write(VFIOPCIDevice *vdev, off_t offset, { return vdev->vbasedev.io_ops->region_write(&vdev->vbasedev, VFIO_PCI_CONFIG_REGION_INDEX, - offset, size, data); + offset, size, data, false); } static uint64_t vfio_rom_read(void *opaque, hwaddr addr, unsigned size) @@ -1793,6 +1793,9 @@ static void vfio_bar_prepare(VFIOPCIDevice *vdev, int nr) bar->type = pci_bar & (bar->ioport ? ~PCI_BASE_ADDRESS_IO_MASK : ~PCI_BASE_ADDRESS_MEM_MASK); bar->size = bar->region.size; + + /* IO regions are sync, memory can be async */ + bar->region.post_wr = (bar->ioport == 0); } static void vfio_bars_prepare(VFIOPCIDevice *vdev) |