On Thu, Nov 15, 2018 at 01:52:48PM +0000, Andrew Cooper wrote:
> The referenced addresses also need checking against MAXPHYSADDR.
> 
> Signed-off-by: Andrew Cooper <andrew.coop...@citrix.com>

Reviewed-by: Roger Pau Monné <roger....@citrix.com>

> ---
> CC: Jan Beulich <jbeul...@suse.com>
> CC: Wei Liu <wei.l...@citrix.com>
> CC: Roger Pau Monné <roger....@citrix.com>
> CC: Sergey Dyasli <sergey.dya...@citrix.com>
> CC: Jun Nakajima <jun.nakaj...@intel.com>
> CC: Kevin Tian <kevin.t...@intel.com>
> ---
>  xen/arch/x86/hvm/vmx/vvmx.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/xen/arch/x86/hvm/vmx/vvmx.c b/xen/arch/x86/hvm/vmx/vvmx.c
> index c296660..5daab82 100644
> --- a/xen/arch/x86/hvm/vmx/vvmx.c
> +++ b/xen/arch/x86/hvm/vmx/vvmx.c
> @@ -1672,7 +1672,7 @@ static int nvmx_handle_vmptrld(struct cpu_user_regs 
> *regs)
>      if ( rc != X86EMUL_OKAY )
>          return rc;
>  
> -    if ( gpa & 0xfff )
> +    if ( (gpa & ~PAGE_MASK) || !gfn_valid(v->domain, gaddr_to_gfn(gpa)) )

Seeing this is repeated in several places, it might be helpful to
introduce a helper?

Thanks, Roger.

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

Reply via email to