public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: Oliver Upton <oupton@google.com>, kvm@vger.kernel.org
Subject: Re: [PATCH] KVM: nVMX: don't clear mtf_pending when nested events are blocked
Date: Tue, 7 Apr 2020 10:21:46 +0200	[thread overview]
Message-ID: <f7688790-02bc-e634-eff6-e58d25da31a4@redhat.com> (raw)
In-Reply-To: <20200406201237.178725-1-oupton@google.com>

On 06/04/20 22:12, Oliver Upton wrote:
> If nested events are blocked, don't clear the mtf_pending flag to avoid
> missing later delivery of the MTF VM-exit.
> 
> Fixes: 5ef8acbdd687c ("KVM: nVMX: Emulate MTF when performing instruction emulation")
> Signed-off-by: Oliver Upton <oupton@google.com>
> ---
>  arch/x86/kvm/vmx/nested.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/arch/x86/kvm/vmx/nested.c b/arch/x86/kvm/vmx/nested.c
> index de232306561a0..cbc9ea2de28f9 100644
> --- a/arch/x86/kvm/vmx/nested.c
> +++ b/arch/x86/kvm/vmx/nested.c
> @@ -3645,7 +3645,8 @@ static int vmx_check_nested_events(struct kvm_vcpu *vcpu)
>  	 * Clear the MTF state. If a higher priority VM-exit is delivered first,
>  	 * this state is discarded.
>  	 */
> -	vmx->nested.mtf_pending = false;
> +	if (!block_nested_events)
> +		vmx->nested.mtf_pending = false;
>  
>  	if (lapic_in_kernel(vcpu) &&
>  		test_bit(KVM_APIC_INIT, &apic->pending_events)) {
> 

Queued, thanks.

Paolo


      reply	other threads:[~2020-04-07  8:21 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-06 20:12 [PATCH] KVM: nVMX: don't clear mtf_pending when nested events are blocked Oliver Upton
2020-04-07  8:21 ` Paolo Bonzini [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=f7688790-02bc-e634-eff6-e58d25da31a4@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=oupton@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox