mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2024-10-04 04:25:45 +00:00
hypervisor: mshv: Restrict unmapped GPA exit to x86
Current instruction emulator can only decode x86 instructions. Thus, restrict the exit handling for just x86 guests. Signed-off-by: Jinank Jain <jinankjain@microsoft.com>
This commit is contained in:
parent
c9e989de6e
commit
f7b9a6e577
@ -598,6 +598,7 @@ impl cpu::Vcpu for MshvVcpu {
|
|||||||
.map_err(|e| cpu::HypervisorCpuError::SetRegister(e.into()))?;
|
.map_err(|e| cpu::HypervisorCpuError::SetRegister(e.into()))?;
|
||||||
Ok(cpu::VmExit::Ignore)
|
Ok(cpu::VmExit::Ignore)
|
||||||
}
|
}
|
||||||
|
#[cfg(target_arch = "x86_64")]
|
||||||
hv_message_type_HVMSG_UNMAPPED_GPA => {
|
hv_message_type_HVMSG_UNMAPPED_GPA => {
|
||||||
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;
|
||||||
|
Loading…
Reference in New Issue
Block a user