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

View File

@@ -151,7 +151,7 @@ impl ConsoleEpollHandler {
if let Err(e) = desc_chain.memory().write_slice(
&source_slice[..],
desc.addr()
.translate(self.access_platform.as_ref(), desc.len() as usize),
.translate_gva(self.access_platform.as_ref(), desc.len() as usize),
) {
error!("Failed to write slice: {:?}", e);
avail_iter.go_to_previous_position();
@@ -190,7 +190,7 @@ impl ConsoleEpollHandler {
if let Some(ref mut out) = self.endpoint.out_file() {
let _ = desc_chain.memory().write_to(
desc.addr()
.translate(self.access_platform.as_ref(), desc.len() as usize),
.translate_gva(self.access_platform.as_ref(), desc.len() as usize),
out,
desc.len() as usize,
);