All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] vvmx: fix the wrong address width in c/s 08fac63
@ 2016-12-19  1:14 Haozhong Zhang
  2016-12-19  7:57 ` Jan Beulich
  2016-12-20  5:04 ` Tian, Kevin
  0 siblings, 2 replies; 3+ messages in thread
From: Haozhong Zhang @ 2016-12-19  1:14 UTC (permalink / raw)
  To: xen-devel
  Cc: Haozhong Zhang, Kevin Tian, Jun Nakajima, Andrew Cooper, Jan Beulich

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>
---
 xen/arch/x86/hvm/vmx/vvmx.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/xen/arch/x86/hvm/vmx/vvmx.c b/xen/arch/x86/hvm/vmx/vvmx.c
index 4a5b79c..9e37d22 100644
--- a/xen/arch/x86/hvm/vmx/vvmx.c
+++ b/xen/arch/x86/hvm/vmx/vvmx.c
@@ -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;
-- 
2.10.1


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

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] vvmx: fix the wrong address width in c/s 08fac63
  2016-12-19  1:14 [PATCH] vvmx: fix the wrong address width in c/s 08fac63 Haozhong Zhang
@ 2016-12-19  7:57 ` Jan Beulich
  2016-12-20  5:04 ` Tian, Kevin
  1 sibling, 0 replies; 3+ messages in thread
From: Jan Beulich @ 2016-12-19  7:57 UTC (permalink / raw)
  To: Haozhong Zhang; +Cc: Andrew Cooper, Kevin Tian, Jun Nakajima, xen-devel

>>> On 19.12.16 at 02:14, <haozhong.zhang@intel.com> wrote:
> 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>


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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] vvmx: fix the wrong address width in c/s 08fac63
  2016-12-19  1:14 [PATCH] vvmx: fix the wrong address width in c/s 08fac63 Haozhong Zhang
  2016-12-19  7:57 ` Jan Beulich
@ 2016-12-20  5:04 ` Tian, Kevin
  1 sibling, 0 replies; 3+ messages in thread
From: Tian, Kevin @ 2016-12-20  5:04 UTC (permalink / raw)
  To: Zhang, Haozhong, xen-devel; +Cc: Andrew Cooper, Jan Beulich, Nakajima, Jun

> From: Zhang, Haozhong
> Sent: Monday, December 19, 2016 9:14 AM
> 
> 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>

Acked-by: Kevin Tian <kevin.tian@intel.com>

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-12-20  5:04 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-12-19  1:14 [PATCH] vvmx: fix the wrong address width in c/s 08fac63 Haozhong Zhang
2016-12-19  7:57 ` Jan Beulich
2016-12-20  5:04 ` Tian, Kevin

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.