diff options
author | Sean Christopherson <seanjc@google.com> | 2024-06-07 10:26:06 -0700 |
---|---|---|
committer | Sean Christopherson <seanjc@google.com> | 2024-06-28 08:59:05 -0700 |
commit | 322a569c4b4188a0da2812f9e952780ce09b74ba (patch) | |
tree | cde3bac52e2274f9a378d245adddd9822d7d260d /arch/x86/kvm/vmx/vmx.h | |
parent | 32f55e475ce2c4b8b124d335fcfaf1152ba977a1 (diff) | |
download | linux-322a569c4b4188a0da2812f9e952780ce09b74ba.tar.gz linux-322a569c4b4188a0da2812f9e952780ce09b74ba.tar.bz2 linux-322a569c4b4188a0da2812f9e952780ce09b74ba.zip |
KVM: VMX: Split out the non-virtualization part of vmx_interrupt_blocked()
Move the non-VMX chunk of the "interrupt blocked" checks to a separate
helper so that KVM can reuse the code to detect if interrupts are blocked
for L2, e.g. to determine if a virtual interrupt _for L2_ is a valid wake
event. If L1 disables HLT-exiting for L2, nested APICv is enabled, and L2
HLTs, then L2 virtual interrupts are valid wake events, but if and only if
interrupts are unblocked for L2.
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/20240607172609.3205077-4-seanjc@google.com
Signed-off-by: Sean Christopherson <seanjc@google.com>
Diffstat (limited to 'arch/x86/kvm/vmx/vmx.h')
-rw-r--r-- | arch/x86/kvm/vmx/vmx.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/x86/kvm/vmx/vmx.h b/arch/x86/kvm/vmx/vmx.h index 7b64e271a931..2e23a01fe320 100644 --- a/arch/x86/kvm/vmx/vmx.h +++ b/arch/x86/kvm/vmx/vmx.h @@ -406,6 +406,7 @@ u64 construct_eptp(struct kvm_vcpu *vcpu, hpa_t root_hpa, int root_level); bool vmx_guest_inject_ac(struct kvm_vcpu *vcpu); void vmx_update_exception_bitmap(struct kvm_vcpu *vcpu); bool vmx_nmi_blocked(struct kvm_vcpu *vcpu); +bool __vmx_interrupt_blocked(struct kvm_vcpu *vcpu); bool vmx_interrupt_blocked(struct kvm_vcpu *vcpu); bool vmx_get_nmi_mask(struct kvm_vcpu *vcpu); void vmx_set_nmi_mask(struct kvm_vcpu *vcpu, bool masked); |