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

Xiao Guangrong
2013-08-01T07:24:14Z

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.

Others look good to me.

Reviewed-by: Xiao Guangrong <xiaoguangrong@linux.vnet.ibm.com>