All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sean Christopherson <seanjc@google.com>
To: Yosry Ahmed <yosry@kernel.org>
Cc: Paolo Bonzini <pbonzini@redhat.com>,
	kvm@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/2] KVM: x86: Suppress WARNs on nested_run_pending after userspace exit
Date: Wed, 11 Mar 2026 06:27:14 -0700	[thread overview]
Message-ID: <abFtshMZLoLLbbXO@google.com> (raw)
In-Reply-To: <CAO9r8zMTEi++JvAfKbMd2676Z8cTPQKcWA+mydzXGYPenUrG6g@mail.gmail.com>

On Tue, Mar 10, 2026, Yosry Ahmed wrote:
> > diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
> > index 879cdeb6adde..cad16c83dcff 100644
> > --- a/arch/x86/kvm/x86.c
> > +++ b/arch/x86/kvm/x86.c
> > @@ -12090,6 +12090,13 @@ int kvm_arch_vcpu_ioctl_run(struct kvm_vcpu *vcpu)
> >         if (r <= 0)
> >                 goto out;
> >
> > +       /*
> > +        * If userspace may have modified vCPU state, mark nested_run_pending
> > +        * as "untrusted" to avoid triggering false-positive WARNs.
> > +        */
> > +       if (vcpu->arch.nested_run_pending == KVM_NESTED_RUN_PENDING)
> > +               vcpu->arch.nested_run_pending = KVM_NESTED_RUN_PENDING_UNTRUSTED;
> > +
> 
> Why not inside kvm_x86_vcpu_pre_run()?

That, is a very good question.  /facepalm

  reply	other threads:[~2026-03-11 13:27 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-10 22:45 [PATCH 0/2] KVM: x86: Syzkaller nested_run_pending defense Sean Christopherson
2026-03-10 22:45 ` [PATCH 1/2] KVM: x86: Move nested_run_pending to kvm_vcpu_arch Sean Christopherson
2026-03-10 22:45 ` [PATCH 2/2] KVM: x86: Suppress WARNs on nested_run_pending after userspace exit Sean Christopherson
2026-03-11  1:53   ` Yosry Ahmed
2026-03-11 13:27     ` Sean Christopherson [this message]
2026-03-11 18:23       ` Yosry Ahmed
2026-03-12 14:22         ` Sean Christopherson

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=abFtshMZLoLLbbXO@google.com \
    --to=seanjc@google.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pbonzini@redhat.com \
    --cc=yosry@kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.