mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Huang, Kai" <kai.huang@intel.com>
To: "pbonzini@redhat.com" <pbonzini@redhat.com>, "Christopherson,,
	Sean" <seanjc@google.com>
Cc: "kvm@vger.kernel.org" <kvm@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v2] KVM: x86/mmu: Add sanity check that MMIO SPTE mask doesn't overlap gen
Date: Sat, 6 Aug 2022 00:49:54 +0000	[thread overview]
Message-ID: <dda1d136be3d5b86e42fd08fee133124a80805df.camel@intel.com> (raw)
In-Reply-To: <20220805194133.86299-1-seanjc@google.com>

On Fri, 2022-08-05 at 19:41 +0000, Sean Christopherson wrote:
> Add compile-time and init-time sanity checks to ensure that the MMIO SPTE
> mask doesn't overlap the MMIO SPTE generation or the MMU-present bit.
> The generation currently avoids using bit 63, but that's as much
> coincidence as it is strictly necessarly.  That will change in the future,
> as TDX support will require setting bit 63 (SUPPRESS_VE) in the mask.
> 
> Explicitly carve out the bits that are allowed in the mask so that any
> future shuffling of SPTE bits doesn't silently break MMIO caching (KVM
> has broken MMIO caching more than once due to overlapping the generation
> with other things).
> 
> Suggested-by: Kai Huang <kai.huang@intel.com>
> Signed-off-by: Sean Christopherson <seanjc@google.com>
> ---
> 
> Kai, I didn't included your review since I pretty much rewrote the entire
> comment.
> 
> v2: Prevent overlap with SPTE_MMU_PRESENT_MASK
> v1: https://lore.kernel.org/all/20220803213354.951376-1-seanjc@google.com

Reviewed-by: Kai Huang <kai.huang@intel.com>


-- 
Thanks,
-Kai



  reply	other threads:[~2022-08-06  0:50 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-05 19:41 Sean Christopherson
2022-08-06  0:49 ` Huang, Kai [this message]
2022-08-09 14:51 ` Paolo Bonzini

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

all inboxes | Powered by JetHome®