mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2024-11-09 13:20:00 +00:00
hypervisor: mshv: handle GPA intercept
We will start receiving GPA intercepts. For our use cases they are handled the same way as UNMAPPED GPA intercepts. Put in some logging to distinguish the two cases. Signed-off-by: Wei Liu <liuwe@microsoft.com>
This commit is contained in:
parent
519476e842
commit
14b45e4d2e
@ -638,13 +638,18 @@ impl cpu::Vcpu for MshvVcpu {
|
|||||||
Ok(cpu::VmExit::Ignore)
|
Ok(cpu::VmExit::Ignore)
|
||||||
}
|
}
|
||||||
#[cfg(target_arch = "x86_64")]
|
#[cfg(target_arch = "x86_64")]
|
||||||
hv_message_type_HVMSG_UNMAPPED_GPA => {
|
msg_type @ (hv_message_type_HVMSG_UNMAPPED_GPA
|
||||||
|
| hv_message_type_HVMSG_GPA_INTERCEPT) => {
|
||||||
let info = x.to_memory_info().unwrap();
|
let info = x.to_memory_info().unwrap();
|
||||||
let insn_len = info.instruction_byte_count as usize;
|
let insn_len = info.instruction_byte_count as usize;
|
||||||
|
let gva = info.guest_virtual_address;
|
||||||
|
let gpa = info.guest_physical_address;
|
||||||
|
|
||||||
|
debug!("Exit ({:?}) GVA {:x} GPA {:x}", msg_type, gva, gpa);
|
||||||
|
|
||||||
let mut context = MshvEmulatorContext {
|
let mut context = MshvEmulatorContext {
|
||||||
vcpu: self,
|
vcpu: self,
|
||||||
map: (info.guest_virtual_address, info.guest_physical_address),
|
map: (gva, gpa),
|
||||||
};
|
};
|
||||||
|
|
||||||
// Create a new emulator.
|
// Create a new emulator.
|
||||||
|
Loading…
Reference in New Issue
Block a user