vvmx: fix the wrong address width in c/s 08fac63
PATCH 1/1 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.
--- xen/arch/x86/hvm/vmx/vvmx.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
xen/arch/x86/hvm/vmx/vvmx.c +2 -1
@@ -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 ;
Signature · 7 lines
2.10.1 _______________________________________________ Xen-devel mailing list [email protected] https://lists.xen.org/xen-devel
Quoted 6 lines
Quoted 1 line
Quoted 1 line · On 19.12.16 at 02:14, <[email protected]> wrote:
c/s 08fac63 misused v->domain-arch.paging.gfn_bits as the width of guest physical address and missed adding
PAGE_SHIFTto it when checking vmxon operand.Signed-off-by Haozhong Zhang <[email protected]>
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
Quoted 8 lines
From: Zhang, Haozhong
Sent: Monday, December 19, 2016 9:14 AMc/s 08fac63 misused v->domain-arch.paging.gfn_bits as the width of guest physical address and missed adding
PAGE_SHIFTto it when checking vmxon operand.Signed-off-by Haozhong Zhang <[email protected]>
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel