Enum hypervisor::MemCacheType
source · pub enum MemCacheType {
CacheCoherent,
CacheNonCoherent,
}
Expand description
Signal to the hypervisor on kernels that support the KVM_CAP_USER_CONFIGURE_NONCOHERENT_DMA (or equivalent) that during user memory region (memslot) configuration, a guest page’s memtype should be considered in SLAT effective memtype determination rather than implicitly respecting only the host page’s memtype.
This explicit control is needed for Virtio devices (e.g. gpu) that configure memslots for host WB page mappings with guest WC page mappings. See b/316337317, b/360295883 for more detail.
Variants§
CacheCoherent
Don’t provide any explicit instruction to the hypervisor on how it should determine a memslot’s effective memtype.
On KVM-VMX (Intel), this means that the memslot is flagged with VMX_EPT_IPAT_BIT such that only the host memtype is respected.
CacheNonCoherent
explicitly instruct the hypervisor to respect the guest page’s memtype when determining the memslot’s effective memtype.
On KVM-VMX (Intel), this means the memslot is NOT flagged with VMX_EPT_IPAT_BIT, and the effective memtype will generally decay to the weaker amongst the host/guest memtypes and the MTRR for the physical address.
Trait Implementations§
source§impl Clone for MemCacheType
impl Clone for MemCacheType
source§fn clone(&self) -> MemCacheType
fn clone(&self) -> MemCacheType
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for MemCacheType
impl Debug for MemCacheType
source§impl<'de> Deserialize<'de> for MemCacheType
impl<'de> Deserialize<'de> for MemCacheType
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
source§impl PartialEq for MemCacheType
impl PartialEq for MemCacheType
source§fn eq(&self, other: &MemCacheType) -> bool
fn eq(&self, other: &MemCacheType) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl Serialize for MemCacheType
impl Serialize for MemCacheType
impl Copy for MemCacheType
impl Eq for MemCacheType
impl StructuralPartialEq for MemCacheType
Auto Trait Implementations§
impl RefUnwindSafe for MemCacheType
impl Send for MemCacheType
impl Sync for MemCacheType
impl Unpin for MemCacheType
impl UnwindSafe for MemCacheType
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
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
.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.