vmm: Move codebase to GuestMemoryAtomic from vm-memory

Relying on the latest vm-memory version, including the freshly
introduced structure GuestMemoryAtomic, this patch replaces every
occurrence of Arc<ArcSwap<GuestMemoryMmap> with
GuestMemoryAtomic<GuestMemoryMmap>.

The point is to rely on the common RCU-like implementation from
vm-memory so that we don't have to do it from Cloud-Hypervisor.

Fixes #735

Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>
This commit is contained in:
Sebastien Boeuf
2020-02-11 17:22:40 +01:00
committed by Rob Bradford
parent ddf6caf955
commit 793d4e7b8d
23 changed files with 116 additions and 147 deletions

View File

@@ -49,6 +49,8 @@ use vm_device::interrupt::{
};
use vm_device::{Migratable, MigratableError, Pausable, Snapshotable};
use vm_memory::guest_memory::FileOffset;
#[cfg(feature = "cmos")]
use vm_memory::GuestAddressSpace;
use vm_memory::{Address, GuestAddress, GuestUsize, MmapRegion};
#[cfg(feature = "pci_support")]
use vm_virtio::transport::VirtioPciDevice;
@@ -739,7 +741,7 @@ impl DeviceManager {
.lock()
.unwrap()
.guest_memory()
.load()
.memory()
.last_addr()
.0
+ 1;