vvmx: fix the wrong address width in c/s 08fac63

c/s 08fac63 misused v->domain-arch.paging.gfn_bits as the width of
guest physical address and missed adding PAGE_SHIFT to it when
checking vmxon operand.

Signed-off-by: Haozhong Zhang <haozhong.zhang@intel.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Kevin Tian <kevin.tian@intel.com>
This commit is contained in:
Haozhong Zhang authored and Jan Beulich committed 2016-12-20 09:51:45 +01:00
1 parent bfe67e80b2
commit 1cb650c319
1 file changed
+2 -1
+2 -1
View File
@@ -1388,7 +1388,8 @@ int nvmx_handle_vmxon(struct cpu_user_regs *regs)
return X86EMUL_OKAY;
}
if ( (gpa & ~PAGE_MASK) || (gpa >> v->domain->arch.paging.gfn_bits) )
if ( (gpa & ~PAGE_MASK) ||
(gpa >> (v->domain->arch.paging.gfn_bits + PAGE_SHIFT)) )
{
vmreturn(regs, VMFAIL_INVALID);
return X86EMUL_OKAY;
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.