All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sean Christopherson <seanjc@google.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: Sami Farin <lkml20261027@mifar.in>,
	linux-kernel@vger.kernel.org,
	 Greg Kroah-Hartman <gregkh@kernel.org>,
	kvm@vger.kernel.org, kimjw04271234@gmail.com,
	 stable@vger.kernel.org
Subject: Re: [REGRESSION] KVM: x86: OVMF boot hang with SMM enabled after commit b3e6212dea2e ("KVM: x86: Use active memslots for the per-vCPU MMIO cache")
Date: Wed, 28 Oct 2026 11:01:53 -0700	[thread overview]
Message-ID: <auI4kViOXpqxT3wA@google.com> (raw)
In-Reply-To: <69437bf0-45fc-4701-9144-a208c12423e6@redhat.com>

On Wed, Oct 28, 2026, Paolo Bonzini wrote:
> On 10/28/26 18:48, Paolo Bonzini wrote:
> > On 10/28/26 18:37, Sean Christopherson wrote:
> > > > However, address space 0 and address space 1 maintain separate
> > generation counters
> > > > starting from 0.
> > 
> > This is also incorrect:
> > 
> >          for (i = 0; i < kvm_arch_nr_memslot_as_ids(kvm); i++) {
> >                  for (j = 0; j < 2; j++) {
> >                          slots = &kvm->__memslots[i][j];
> > 
> >                          atomic_long_set(&slots->last_used_slot,
> > (unsigned long)NULL);
> >                          slots->hva_tree = RB_ROOT_CACHED;
> >                          slots->gfn_tree = RB_ROOT;
> >                          hash_init(slots->id_hash);
> >                          slots->node_idx = j;
> > 
> >                          /* Generations must be different for each
> > address space. */
> >                          slots->generation = i;
> >                  }
> > 
> > 
> > > >          An MMIO access cached in SMM (e.g., GFN 0xFED40000 with
> > > > gen = 4) matches in normal mode where gen is also 4.
> > > Hmm, this isn't adding up for me.  It should be impossible for the
> > > generation to
> > > be '4' for SMM, because SMM is supposed to use odd-numbered
> > > generations.  From
> > > kvm_swap_active_memslots():
> > 
> > vcpu_cache_mmio_info() does not use the address space id:
> > 
> >          u64 gen = kvm_memslots(vcpu->kvm)->generation;
> > 
> > Will send a patch soon.
> Nevermind, wrong tree - I was reinventing the (apparently buggy) commit
> because it's past 7.3.0-rc7... still looking.

Heh, I did the same thing.  I was like, "this code doesn't exist!!!", then
realized the commit isn't in kvm/next. 

  reply	other threads:[~2026-10-28 18:01 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-23 12:45 CVE-2026-99082: KVM: x86: Use active memslots for the per-vCPU MMIO cache Greg Kroah-Hartman
2026-10-27 12:41 ` [REGRESSION] KVM: x86: OVMF boot hang with SMM enabled after commit b3e6212dea2e ("KVM: x86: Use active memslots for the per-vCPU MMIO cache") Sami Farin
2026-10-28 17:37   ` Sean Christopherson
2026-10-28 17:48     ` Paolo Bonzini
2026-10-28 17:58       ` Paolo Bonzini
2026-10-28 18:01         ` Sean Christopherson [this message]
2026-10-28 18:42           ` Paolo Bonzini
2026-10-29 10:38             ` Sami Farin

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=auI4kViOXpqxT3wA@google.com \
    --to=seanjc@google.com \
    --cc=gregkh@kernel.org \
    --cc=kimjw04271234@gmail.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lkml20261027@mifar.in \
    --cc=pbonzini@redhat.com \
    --cc=stable@vger.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.