From f7b9a6e5776d6d7edabf093376db8b3420732211 Mon Sep 17 00:00:00 2001 From: Jinank Jain Date: Thu, 21 Mar 2024 09:37:26 +0530 Subject: [PATCH] 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 --- hypervisor/src/mshv/mod.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/hypervisor/src/mshv/mod.rs b/hypervisor/src/mshv/mod.rs index 9f53b7adf..2375db6ff 100644 --- a/hypervisor/src/mshv/mod.rs +++ b/hypervisor/src/mshv/mod.rs @@ -598,6 +598,7 @@ impl cpu::Vcpu for MshvVcpu { .map_err(|e| cpu::HypervisorCpuError::SetRegister(e.into()))?; Ok(cpu::VmExit::Ignore) } + #[cfg(target_arch = "x86_64")] hv_message_type_HVMSG_UNMAPPED_GPA => { let info = x.to_memory_info().unwrap(); let insn_len = info.instruction_byte_count as usize;