Skip to content

Commit b59e5a8

Browse files
Shuo A Liuwenlingz
authored andcommitted
hv: Disable HLT and PAUSE-loop exiting emulation in lapic passthrough
In lapic passthrough mode, it should passthrough HLT/PAUSE execution too. This patch disable their emulation when switch to lapic passthrough mode. Tracked-On: #4329 Tested-by: Dongsheng Zhang <dongsheng.x.zhang@intel.com> Signed-off-by: Shuo A Liu <shuo.a.liu@intel.com> Acked-by: Eddie Dong <eddie.dong@intel.com>
1 parent 3edde26 commit b59e5a8

File tree

1 file changed

+2
-0
lines changed
  • hypervisor/arch/x86/guest

1 file changed

+2
-0
lines changed

hypervisor/arch/x86/guest/vmcs.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -599,11 +599,13 @@ void switch_apicv_mode_x2apic(struct acrn_vcpu *vcpu)
599599

600600
value32 = exec_vmread32(VMX_PROC_VM_EXEC_CONTROLS);
601601
value32 &= ~VMX_PROCBASED_CTLS_TPR_SHADOW;
602+
value32 &= ~VMX_PROCBASED_CTLS_HLT;
602603
exec_vmwrite32(VMX_PROC_VM_EXEC_CONTROLS, value32);
603604

604605
exec_vmwrite32(VMX_TPR_THRESHOLD, 0U);
605606

606607
value32 = exec_vmread32(VMX_PROC_VM_EXEC_CONTROLS2);
608+
value32 &= ~VMX_PROCBASED_CTLS2_PAUSE_LOOP;
607609
value32 &= ~VMX_PROCBASED_CTLS2_VAPIC;
608610
if (is_apicv_advanced_feature_supported()) {
609611
value32 &= ~VMX_PROCBASED_CTLS2_VIRQ;

0 commit comments

Comments
 (0)