mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
virtio-devices: move userspace mapping to vm-device
Move UserspaceMapping to vm-device to avoid redefinition since UserspaceMapping is used by both `virtio-devices` and `device` crate. Signed-off-by: Songqian Li <sionli@tencent.com>
This commit is contained in:
@@ -15,6 +15,7 @@ use std::thread;
|
||||
|
||||
use libc::EFD_NONBLOCK;
|
||||
use virtio_queue::Queue;
|
||||
use vm_device::UserspaceMapping;
|
||||
use vm_memory::{GuestAddress, GuestMemoryAtomic, GuestUsize};
|
||||
use vm_migration::{MigratableError, Pausable};
|
||||
use vm_virtio::{AccessPlatform, VirtioDeviceType};
|
||||
@@ -37,15 +38,6 @@ pub trait VirtioInterrupt: Send + Sync {
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Clone)]
|
||||
pub struct UserspaceMapping {
|
||||
pub host_addr: u64,
|
||||
pub mem_slot: u32,
|
||||
pub addr: GuestAddress,
|
||||
pub len: GuestUsize,
|
||||
pub mergeable: bool,
|
||||
}
|
||||
|
||||
#[derive(Clone)]
|
||||
pub struct VirtioSharedMemory {
|
||||
pub offset: u64,
|
||||
|
||||
Reference in New Issue
Block a user