From 1240ef3261caaff3053376645e94e653821cd44e Mon Sep 17 00:00:00 2001 From: Rob Bradford Date: Wed, 11 Aug 2021 22:58:22 +0000 Subject: [PATCH] pci: vfio_user: Update all fields in MmioRegion on map When mapping the region into the guest ensure that all the fields are updated correctly as the unmap code path checks that they are set. Signed-off-by: Rob Bradford --- pci/src/vfio_user.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/pci/src/vfio_user.rs b/pci/src/vfio_user.rs index a4ca1d484..8fd7c5f52 100644 --- a/pci/src/vfio_user.rs +++ b/pci/src/vfio_user.rs @@ -385,6 +385,7 @@ impl VfioUserPciDevice { mmio_region.mem_slot = Some(slot); mmio_region.host_addr = Some(host_addr as u64); + mmio_region.mmap_size = Some(mmio_region.length as usize); } }