hypervisor: Use instruction emulator to handle unmapped gpa

Use the context from Unmapped Gpa exit from the hypervisor to initialize
the MshvEmulatorContext and later call the emulator to decode the
instruction.

Signed-off-by: Jinank Jain <jinankjain@microsoft.com>
This commit is contained in:
Jinank Jain
2025-04-16 05:13:01 +00:00
parent 461e31e6d8
commit d374101f38
2 changed files with 35 additions and 2 deletions

View File

@@ -28,7 +28,7 @@ impl<'a> Emulator<'a> {
Emulator { context }
}
/// Decode the instruction using the syndrome register.
/// Decode & emulate the instruction using the syndrome register.
pub fn emulate_with_syndrome(&mut self) -> Result<bool, PlatformError> {
let esr_el2 = EsrEl2::from(self.context.syndrome);
if !matches!(