Re: [RFC PATCH v2 43/69] KVM: x86/mmu: Allow non-zero init value for shadow PTE
From: Isaku Yamahata
Date: Thu Jul 08 2021 - 11:20:17 EST
On Tue, Jul 06, 2021 at 04:56:07PM +0200,
Paolo Bonzini <pbonzini@xxxxxxxxxx> wrote:
> On 03/07/21 00:04, isaku.yamahata@xxxxxxxxx wrote:
> > From: Sean Christopherson <sean.j.christopherson@xxxxxxxxx>
> >
> > TDX will run with EPT violation #VEs enabled, which means KVM needs to
> > set the "suppress #VE" bit in unused PTEs to avoid unintentionally
> > reflecting not-present EPT violations into the guest.
> >
> > Signed-off-by: Sean Christopherson <sean.j.christopherson@xxxxxxxxx>
> > Signed-off-by: Isaku Yamahata <isaku.yamahata@xxxxxxxxx>
> > ---
> > arch/x86/kvm/mmu.h | 1 +
> > arch/x86/kvm/mmu/mmu.c | 50 +++++++++++++++++++++++++++++++++++------
> > arch/x86/kvm/mmu/spte.c | 10 +++++++++
> > arch/x86/kvm/mmu/spte.h | 2 ++
> > 4 files changed, 56 insertions(+), 7 deletions(-)
>
> Please ensure that this also works for tdp_mmu.c (if anything, consider
> supporting TDX only for TDP MMU; it's quite likely that mmu.c support for
> EPT/NPT will go away).
It's on my TODO list. Will address it.
--
Isaku Yamahata <isaku.yamahata@xxxxxxxxx>