pub struct VtdSharedState { /* private fields */ }Expand description
Shared VT-d IOMMU state accessible by per-device wrappers.
This struct holds the MMIO register state and guest memory reference
behind a RwLock, allowing concurrent reads from per-device translation
wrappers while the IntelVtdDevice performs exclusive writes via MMIO.
Implementations§
Sourcepub fn is_enabled(&self) -> bool
pub fn is_enabled(&self) -> bool
Returns whether translation is currently enabled (GSTS.TES).
Sourcepub fn is_ir_enabled(&self) -> bool
pub fn is_ir_enabled(&self) -> bool
Returns whether interrupt remapping is currently enabled (GSTS.IRES).
Sourcepub fn translator(self: &Arc<Self>) -> VtdTranslator
pub fn translator(self: &Arc<Self>) -> VtdTranslator
Create a per-device IOVA→GPA translator.
Sourcepub fn wrap_signal_msi(
self: &Arc<Self>,
inner: Arc<dyn SignalMsi>,
) -> Arc<VtdSignalMsi>
pub fn wrap_signal_msi( self: &Arc<Self>, inner: Arc<dyn SignalMsi>, ) -> Arc<VtdSignalMsi>
Create a per-device MSI remapping wrapper.
Trait Implementations§
Source§fn remap_msi(
&self,
device_id: u16,
address: u64,
data: u32,
) -> Option<(u64, u32)>
fn remap_msi( &self, device_id: u16, address: u64, data: u32, ) -> Option<(u64, u32)>
Translate an MSI address/data pair for a device. Read more
Source§fn register_route(&self, route: &Arc<dyn RetranslateInterrupts>)
fn register_route(&self, route: &Arc<dyn RetranslateInterrupts>)
Register a route for invalidation callbacks. Read more
Source§fn unregister_route(&self, route: &Arc<dyn RetranslateInterrupts>)
fn unregister_route(&self, route: &Arc<dyn RetranslateInterrupts>)
Unregister a route. Dead (dropped) routes are also cleaned up
lazily during invalidation.
Auto Trait Implementations§
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
Mutably borrows from an owned value. Read more