virtio-devices: Rename address translation function for more clarity

Renaming translate() to translate_gva() to clarify we want to translate
a GVA address into a GPA.

Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>
This commit is contained in:
Sebastien Boeuf
2022-04-04 13:35:24 +02:00
parent 16c525b2c0
commit 059e787cb5
11 changed files with 48 additions and 33 deletions
+5 -2
View File
@@ -133,7 +133,10 @@ impl Request {
let request: VirtioPmemReq = desc_chain
.memory()
.read_obj(desc.addr().translate(access_platform, desc.len() as usize))
.read_obj(
desc.addr()
.translate_gva(access_platform, desc.len() as usize),
)
.map_err(Error::GuestMemory)?;
let request_type = match request.type_ {
@@ -156,7 +159,7 @@ impl Request {
type_: request_type,
status_addr: status_desc
.addr()
.translate(access_platform, status_desc.len() as usize),
.translate_gva(access_platform, status_desc.len() as usize),
})
}
}