[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20230310211832.GA3719990@ls.amr.corp.intel.com>
Date: Fri, 10 Mar 2023 13:18:32 -0800
From: Isaku Yamahata <isaku.yamahata@...il.com>
To: Chenyi Qiang <chenyi.qiang@...el.com>
Cc: isaku.yamahata@...el.com, kvm@...r.kernel.org,
linux-kernel@...r.kernel.org, isaku.yamahata@...il.com,
Paolo Bonzini <pbonzini@...hat.com>, erdemaktas@...gle.com,
Sean Christopherson <seanjc@...gle.com>,
Sagi Shahar <sagis@...gle.com>,
David Matlack <dmatlack@...gle.com>,
Kai Huang <kai.huang@...el.com>,
Zhi Wang <zhi.wang.linux@...il.com>
Subject: Re: [PATCH v12 050/106] KVM: TDX: MTRR: implement get_mt_mask() for
TDX
On Thu, Mar 09, 2023 at 05:03:13PM +0800,
Chenyi Qiang <chenyi.qiang@...el.com> wrote:
> > diff --git a/arch/x86/kvm/vmx/tdx.c b/arch/x86/kvm/vmx/tdx.c
> > index 8f191177bfe9..f532f5c352f3 100644
> > --- a/arch/x86/kvm/vmx/tdx.c
> > +++ b/arch/x86/kvm/vmx/tdx.c
> > @@ -5,6 +5,7 @@
> >
> > #include "capabilities.h"
> > #include "x86_ops.h"
> > +#include "common.h"
> > #include "tdx.h"
> > #include "vmx.h"
> > #include "x86.h"
> > @@ -345,6 +346,22 @@ int tdx_vm_init(struct kvm *kvm)
> > return 0;
> > }
> >
> > +u8 tdx_get_mt_mask(struct kvm_vcpu *vcpu, gfn_t gfn, bool is_mmio)
> > +{
> > + /* TDX private GPA is always WB. */
> > + if (kvm_gfn_private(vcpu->kvm, gfn)) {
>
> kvm_gfn_private() only drops shared bit instead of checking if gfn is
> private of shared. It should be !(gfn & shared mask) as mentioned in
> your v11 series :)
Oops. Will fix it. thanks for catching it.
--
Isaku Yamahata <isaku.yamahata@...il.com>
Powered by blists - more mailing lists