mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
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:
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user