Skip to content

Commit

Permalink
add external interrupt support
Browse files Browse the repository at this point in the history
  • Loading branch information
aarkegz committed Jan 15, 2025
1 parent fc9e92c commit 0b07547
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/vmx/vcpu.rs
Original file line number Diff line number Diff line change
Expand Up @@ -532,9 +532,9 @@ impl<H: AxVCpuHal> VmxVcpu<H> {
VmcsControl32::PINBASED_EXEC_CONTROLS,
Msr::IA32_VMX_TRUE_PINBASED_CTLS,
Msr::IA32_VMX_PINBASED_CTLS.read() as u32,
// (PinCtrl::NMI_EXITING | PinCtrl::EXTERNAL_INTERRUPT_EXITING).bits(),
(PinCtrl::NMI_EXITING | PinCtrl::EXTERNAL_INTERRUPT_EXITING).bits(),
// (PinCtrl::NMI_EXITING | PinCtrl::VMX_PREEMPTION_TIMER).bits(),
PinCtrl::NMI_EXITING.bits(),
// PinCtrl::NMI_EXITING.bits(),
0,
)?;

Expand Down Expand Up @@ -1157,6 +1157,11 @@ impl<H: AxVCpuHal> AxArchVCpu for VmxVcpu<H> {
}
}
}
},
VmxExitReason::EXTERNAL_INTERRUPT => {
let int_info = self.interrupt_exit_info()?;
assert!(int_info.valid);
AxVCpuExitReason::ExternalInterrupt { vector: int_info.vector as _ }
}
_ => {
warn!("VMX unsupported VM-Exit: {:#x?}", exit_info);
Expand Down

0 comments on commit 0b07547

Please sign in to comment.