Messages in this thread | | | Date | Tue, 26 Apr 2022 14:12:23 -0700 | From | Isaku Yamahata <> | Subject | Re: [RFC PATCH v5 048/104] KVM: x86/tdp_mmu: Support TDX private mapping for TDP MMU |
| |
On Mon, Apr 25, 2022 at 12:10:22PM -0700, Sagi Shahar <sagis@google.com> wrote:
> On Wed, Apr 6, 2022 at 5:50 PM Kai Huang <kai.huang@intel.com> wrote: > > > > On Fri, 2022-03-04 at 11:49 -0800, isaku.yamahata@intel.com wrote: > > > From: Isaku Yamahata <isaku.yamahata@intel.com> ... > > > @@ -914,14 +1014,23 @@ static int tdp_mmu_map_handle_target_level(struct kvm_vcpu *vcpu, > > > u64 new_spte; > > > int ret = RET_PF_FIXED; > > > bool wrprot = false; > > > + unsigned long pte_access = ACC_ALL; > > > > > > WARN_ON(sp->role.level != fault->goal_level); > > > + > > > + /* TDX shared GPAs are no executable, enforce this for the SDV. */ > > > + if (!kvm_is_private_gfn(vcpu->kvm, iter->gfn)) > > This should be: > if (kvm_gfn_stolen_mask(vcpu->kvm) && !kvm_is_private_gfn(vcpu->kvm, iter->gfn)) > > Otherwise, when TDX is disabled, all EPTs are going to be considered > as shared non-executable EPTs.
Oops, will fix it. Thank you for pointing it out.
-- Isaku Yamahata <isaku.yamahata@gmail.com>
| |