Skip to contentSkip to conversation

x86/HVM: don't #GP/#SS on wrapping 64-bit virt->linear translations

PATCH Superseded Jan Beulich 1 participant 1 message Jul 5, 2017

v1 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 x86/HVM: don't #GP/#SS on wrapping 64-bit virt->linear translations

Real hardware wraps silently, so we should behave the same.

xen/arch/x86/hvm/hvm.c +1 -1
@@ -2447,7 +2447,7 @@ bool_t hvm_virtual_to_linear_addr(
             addr += reg->base;
 
         last_byte = addr + bytes - !!bytes;
-        if ( !is_canonical_address(addr) || last_byte < addr ||
+        if ( !is_canonical_address(addr) ||
              !is_canonical_address(last_byte) )
             goto out;
     }

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel