Re: [PATCH v5 08/14] nEPT: Redefine EPT-specific link_shadow_page()

Gleb Natapov
2013-08-01T07:27:39Z

On Thu, Aug 01, 2013 at 03:24:06PM +0800, Xiao Guangrong wrote:
> On 07/31/2013 10:48 PM, Gleb Natapov wrote:
> > From: Yang Zhang <yang.z.zhang@Intel.com>
>
> > }
> > }
> > return emulate;
> > diff --git a/arch/x86/kvm/paging_tmpl.h b/arch/x86/kvm/paging_tmpl.h
> > index 762c904..0d25351 100644
> > --- a/arch/x86/kvm/paging_tmpl.h
> > +++ b/arch/x86/kvm/paging_tmpl.h
> > @@ -555,7 +555,7 @@ static int FNAME(fetch)(struct kvm_vcpu *vcpu, gva_t addr,
> > goto out_gpte_changed;
> >
> > if (sp)
> > - link_shadow_page(it.sptep, sp);
> > + link_shadow_page(it.sptep, sp, PTTYPE != PTTYPE_EPT);
>
> It is better to use "!!PT_GUEST_ACCESSED_MASK" instead? It will be easier when
> we export A/D to guest in the further.
>
Yes, this is indeed better. It shows better what is going on here. Will
change and add your Reviewed-by.

> Others look good to me.
>
> Reviewed-by: Xiao Guangrong <xiaoguangrong@linux.vnet.ibm.com>

--
Gleb.