hypervisor: x86: make debug output more useful

The debug output should show the range of memory read from / written to.

Signed-off-by: Wei Liu <liuwe@microsoft.com>
This commit is contained in:
Wei Liu 2021-06-07 17:29:35 +00:00 committed by Bo Chen
parent 1e2aa769e5
commit d76743ed0b

View File

@ -714,7 +714,7 @@ mod mock_vmm {
"Memory read {} bytes from [{:#x} -> {:#x}]",
data.len(),
gva,
gva
gva + data.len() as u64 - 1
);
data.copy_from_slice(&self.memory[gva as usize..gva as usize + data.len()]);
Ok(())
@ -725,7 +725,7 @@ mod mock_vmm {
"Memory write {} bytes at [{:#x} -> {:#x}]",
data.len(),
gva,
gva
gva + data.len() as u64 - 1
);
self.memory[gva as usize..gva as usize + data.len()].copy_from_slice(data);