[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <dda1d136be3d5b86e42fd08fee133124a80805df.camel@intel.com>
Date: Sat, 6 Aug 2022 00:49:54 +0000
From: "Huang, Kai" <kai.huang@...el.com>
To: "pbonzini@...hat.com" <pbonzini@...hat.com>,
"Christopherson,, Sean" <seanjc@...gle.com>
CC: "kvm@...r.kernel.org" <kvm@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v2] KVM: x86/mmu: Add sanity check that MMIO SPTE mask
doesn't overlap gen
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@...el.com>
> Signed-off-by: Sean Christopherson <seanjc@...gle.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@...el.com>
--
Thanks,
-Kai
Powered by blists - more mailing lists