vmm: use MemoryRegion where applicable

That removes one more KVM-ism in VMM crate.

Note that there are more KVM specific code in those files to be split
out, but we're not at that stage yet.

No functional change.

Signed-off-by: Wei Liu <liuwe@microsoft.com>
This commit is contained in:
Wei Liu
2020-06-24 12:02:26 +00:00
committed by Sebastien Boeuf
parent 48a05c4727
commit b00171e17d
3 changed files with 9 additions and 7 deletions

View File

@@ -590,7 +590,7 @@ impl DeviceRelocation for AddressManager {
if let Some(mut shm_regions) = virtio_dev.get_shm_regions() {
if shm_regions.addr.raw_value() == old_base {
// Remove old region from KVM by passing a size of 0.
let mut mem_region = hypervisor::kvm::kvm_userspace_memory_region {
let mut mem_region = hypervisor::MemoryRegion {
slot: shm_regions.mem_slot,
guest_phys_addr: old_base,
memory_size: 0,