lkml.org 
[lkml]   [2020]   [Mar]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH 02/10] KVM: nVMX: Drop a superfluous WARN on reflecting EXTERNAL_INTERRUPT
Date
Sean Christopherson <sean.j.christopherson@intel.com> writes:

> Drop the WARN in nested_vmx_reflect_vmexit() that fires if KVM attempts
> to reflect an external interrupt. nested_vmx_exit_reflected() is now
> called from nested_vmx_reflect_vmexit() and unconditionally returns
> false for EXTERNAL_INTERRUPT, i.e. barring a compiler or major CPU bug,
> the WARN will never fire.
>
> Signed-off-by: Sean Christopherson <sean.j.christopherson@intel.com>
> ---
> arch/x86/kvm/vmx/nested.h | 9 ++++-----
> 1 file changed, 4 insertions(+), 5 deletions(-)
>
> diff --git a/arch/x86/kvm/vmx/nested.h b/arch/x86/kvm/vmx/nested.h
> index 6bc379cf4755..8f5ff3e259c9 100644
> --- a/arch/x86/kvm/vmx/nested.h
> +++ b/arch/x86/kvm/vmx/nested.h
> @@ -84,12 +84,11 @@ static inline bool nested_vmx_reflect_vmexit(struct kvm_vcpu *vcpu,
> return false;
>
> /*
> - * At this point, the exit interruption info in exit_intr_info
> - * is only valid for EXCEPTION_NMI exits. For EXTERNAL_INTERRUPT
> - * we need to query the in-kernel LAPIC.
> + * vmcs.VM_EXIT_INTR_INFO is only valid for EXCEPTION_NMI exits. For
> + * EXTERNAL_INTERRUPT, the value for vmcs12->vm_exit_intr_info would
> + * need to be synthesized by querying the in-kernel LAPIC, but external
> + * interrupts are never reflected to L1 so it's a non-issue.
> */
> - WARN_ON(exit_reason == EXIT_REASON_EXTERNAL_INTERRUPT);
> -
> exit_intr_info = vmcs_read32(VM_EXIT_INTR_INFO);
> if ((exit_intr_info &
> (INTR_INFO_VALID_MASK | INTR_INFO_DELIVER_CODE_MASK)) ==

Reviewed-by: Vitaly Kuznetsov <vkuznets@redhat.com>

--
Vitaly

\
 
 \ /
  Last update: 2020-03-13 13:15    [W:0.415 / U:0.988 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site