mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2024-12-22 13:45:20 +00:00
pci: vfio_user: Fix region start calculation in unmap_mmio_regions()
The offset on the fd should not be used with the GPA. Signed-off-by: Rob Bradford <robert.bradford@intel.com>
This commit is contained in:
parent
0b5c680d15
commit
ed53c74ca9
@ -398,18 +398,10 @@ impl VfioUserPciDevice {
|
||||
mmio_region.mmap_size,
|
||||
mmio_region.mem_slot,
|
||||
) {
|
||||
let file_offset = self
|
||||
.client
|
||||
.lock()
|
||||
.unwrap()
|
||||
.region(mmio_region.index)
|
||||
.unwrap()
|
||||
.file_offset
|
||||
.clone();
|
||||
// Remove region
|
||||
let r = self.vm.make_user_memory_region(
|
||||
mem_slot,
|
||||
mmio_region.start.raw_value() + file_offset.unwrap().start(),
|
||||
mmio_region.start.raw_value(),
|
||||
mmap_size as u64,
|
||||
host_addr as u64,
|
||||
false,
|
||||
|
Loading…
Reference in New Issue
Block a user