All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sean Christopherson <seanjc@google.com>
To: Kai Huang <kai.huang@intel.com>
Cc: "pbonzini@redhat.com" <pbonzini@redhat.com>,
	"kvm@vger.kernel.org" <kvm@vger.kernel.org>,
	 "jthoughton@google.com" <jthoughton@google.com>,
	 "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 0/2] KVM: x86/mmu: Use LOCK CMPXCHG to clear Accessed bits
Date: Wed, 29 Jul 2026 06:33:43 -0700	[thread overview]
Message-ID: <amoBN62nWqEgh0RE@google.com> (raw)
In-Reply-To: <99aef43760db560d32e12e99df6bf209c67260e8.camel@intel.com>

On Wed, Jul 29, 2026, Kai Huang wrote:
> On Mon, 2026-07-27 at 17:22 -0700, Sean Christopherson wrote:
> > I initially was planning on tweaking the FROZEN_SPTE value to make it ok to
> > use LOCK AND on Accessed bits, but AFAICT there's no meaningful downside to
> > using CMPXCHG.
> 
> Maybe do both, e.g., still remove the A-bit from FROZEN_SPTE?  AFAICT there's no
> good reason to keep the A-bit in FROZEN_SPTE.

Hmm, I'm leaning "no".

Once aging uses CMPXCHG, the A-bit isn't any more or less likely to be corrupted
than any other bits.  And arguably, using the A-bit is "safer", because (a) it's
got the same bit position on EPT and everything else, and (b) spuriously setting
or clearing the bit is more likely to be benign.

  reply	other threads:[~2026-07-29 13:33 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-28  0:22 [PATCH 0/2] KVM: x86/mmu: Use LOCK CMPXCHG to clear Accessed bits Sean Christopherson
2026-07-28  0:22 ` [PATCH 1/2] KVM: x86/mmu: Use CMPXCHG when clearing Accessed bit in TDP MMU Sean Christopherson
2026-07-28  0:31   ` James Houghton
2026-07-29 11:07   ` Huang, Kai
2026-07-28  0:22 ` [PATCH 2/2] KVM: x86/mmu: Use CMPXCHG when clearing Accessed bit in the shadow MMU Sean Christopherson
2026-07-28  0:34   ` James Houghton
2026-07-29 11:10   ` Huang, Kai
2026-07-29 11:12 ` [PATCH 0/2] KVM: x86/mmu: Use LOCK CMPXCHG to clear Accessed bits Huang, Kai
2026-07-29 13:33   ` Sean Christopherson [this message]
2026-07-29 22:04     ` Huang, Kai

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=amoBN62nWqEgh0RE@google.com \
    --to=seanjc@google.com \
    --cc=jthoughton@google.com \
    --cc=kai.huang@intel.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pbonzini@redhat.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 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.