Struct crosvm_direct::crosvm::plugin::vcpu::SharedVcpuState
source · [−]pub struct SharedVcpuState {
ioport_regions: BTreeSet<Range>,
mmio_regions: BTreeSet<Range>,
hint: Option<CallHint>,
}
Expand description
State shared by every VCPU, grouped together to make edits to the state coherent across VCPUs.
Fields
ioport_regions: BTreeSet<Range>
mmio_regions: BTreeSet<Range>
hint: Option<CallHint>
Implementations
sourceimpl SharedVcpuState
impl SharedVcpuState
sourcepub fn reserve_range(
&mut self,
space: IoSpace,
start: u64,
length: u64,
async_write: bool
) -> SysResult<()>
pub fn reserve_range(
&mut self,
space: IoSpace,
start: u64,
length: u64,
async_write: bool
) -> SysResult<()>
Reserves the given range for handling by the plugin process.
This will reject any reservation that overlaps with an existing reservation.
pub fn unreserve_range(&mut self, space: IoSpace, start: u64) -> SysResult<()>
pub fn set_hint(
&mut self,
space: IoSpace,
addr: u64,
on_write: bool,
regs: Vec<CallHintDetails>
)
fn is_reserved(&self, space: IoSpace, addr: u64) -> bool
fn first_before(&self, io_space: IoSpace, addr: u64) -> Option<Range>
fn matches_hint(&self, io_space: IoSpace, addr: u64, is_write: bool) -> bool
fn check_hint_details(&self, regs: &kvm_regs) -> (bool, bool)
Trait Implementations
sourceimpl Default for SharedVcpuState
impl Default for SharedVcpuState
sourcefn default() -> SharedVcpuState
fn default() -> SharedVcpuState
Returns the “default value” for a type. Read more
Auto Trait Implementations
impl RefUnwindSafe for SharedVcpuState
impl Send for SharedVcpuState
impl Sync for SharedVcpuState
impl Unpin for SharedVcpuState
impl UnwindSafe for SharedVcpuState
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<T> Downcast for T where
T: Any,
impl<T> Downcast for T where
T: Any,
fn into_any(self: Box<T, Global>) -> Box<dyn Any + 'static, Global>
fn into_any(self: Box<T, Global>) -> Box<dyn Any + 'static, Global>
Convert Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
. Read more
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
Convert Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
. Read more
fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert &Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s. Read more
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert &mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s. Read more