mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2025-02-08 12:41:35 +00:00
virtio-devices: iommu: Error out if couldn't translate address
It doesn't matter if we're trying to translate a GVA or a GPA address, but in both cases we must error out if the address couldn't be translated. Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>
This commit is contained in:
parent
76b1a009e4
commit
26006974e8
@ -702,8 +702,10 @@ impl DmaRemapping for IommuMapping {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
debug!("Into same addr...");
|
Err(io::Error::new(
|
||||||
Ok(addr)
|
io::ErrorKind::Other,
|
||||||
|
format!("failed to translate GVA addr 0x{:x}", addr),
|
||||||
|
))
|
||||||
}
|
}
|
||||||
|
|
||||||
fn translate_gpa(&self, id: u32, addr: u64) -> std::result::Result<u64, std::io::Error> {
|
fn translate_gpa(&self, id: u32, addr: u64) -> std::result::Result<u64, std::io::Error> {
|
||||||
@ -720,8 +722,10 @@ impl DmaRemapping for IommuMapping {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
debug!("Into same addr...");
|
Err(io::Error::new(
|
||||||
Ok(addr)
|
io::ErrorKind::Other,
|
||||||
|
format!("failed to translate GPA addr 0x{:x}", addr),
|
||||||
|
))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user