[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen master] x86/pv: Fix determination of 64bit mode in emulate_privilege_op()



commit f4e8c6539a60df0f710722f303272bafc55bd31d
Author:     Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
AuthorDate: Thu Jan 5 11:23:15 2017 +0000
Commit:     Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
CommitDate: Thu Jan 5 12:22:55 2017 +0000

    x86/pv: Fix determination of 64bit mode in emulate_privilege_op()
    
    ctxt->addr_size is expressed in bits rather than bytes, and has the value 
16,
    32 or 64.  Comparing < 8 made the intended non-64bit paths dead.
    
    Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
    Reviewed-by: Jan Beulich <jbeulich@xxxxxxxx>
    Tested-by: Jan Beulich <jbeulich@xxxxxxxx>
---
 xen/arch/x86/traps.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/xen/arch/x86/traps.c b/xen/arch/x86/traps.c
index 2d211d1..a33109d 100644
--- a/xen/arch/x86/traps.c
+++ b/xen/arch/x86/traps.c
@@ -2100,7 +2100,7 @@ static int pv_emul_virt_to_linear(unsigned long base, 
unsigned long offset,
 
     *addr = base + offset;
 
-    if ( ctxt->addr_size < 8 )
+    if ( ctxt->addr_size < 64 )
     {
         if ( limit < bytes - 1 || offset > limit - bytes + 1 )
             rc = X86EMUL_EXCEPTION;
@@ -2169,7 +2169,7 @@ static int priv_op_read_segment(enum x86_segment seg,
                                 struct segment_register *reg,
                                 struct x86_emulate_ctxt *ctxt)
 {
-    if ( ctxt->addr_size < 8 )
+    if ( ctxt->addr_size < 64 )
     {
         unsigned long limit;
         unsigned int sel, ar;
--
generated by git-patchbot for /home/xen/git/xen.git#master

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxx
https://lists.xenproject.org/xen-changelog

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.