Fix IOMMU unassign bug and add translate opcode
unassign_device: clear DTE and submit hardware INVALIDATE_DEVTAB_ENTRY and INVALIDATE_INTERRUPT_TABLE commands with completion wait (was previously only clearing the software HashMap). TRANSLATE opcode (0x0012): walk IOMMU page tables for IOVA-to-physical address resolution. fstat: return proper MODE_DIR/MODE_FILE and sizes for all handle kinds (Root, Control, Domain, Device). Remove #TODO from recipe.toml.
This commit is contained in:
@@ -628,6 +628,10 @@ impl DomainPageTables {
|
||||
pub fn mapping_count(&self) -> usize {
|
||||
self.mappings.len()
|
||||
}
|
||||
|
||||
pub fn translate(&self, iova: u64) -> Option<u64> {
|
||||
self.page_table.translate(iova)
|
||||
}
|
||||
}
|
||||
|
||||
fn align_up(value: u64, align: u64) -> Option<u64> {
|
||||
|
||||
Reference in New Issue
Block a user