diff mbox

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

Message ID 595D1F820200007800168CD2@prv-mh.provo.novell.com (mailing list archive)
State New, archived
Headers show

Commit Message

Jan Beulich July 5, 2017, 3:18 p.m. UTC
Real hardware wraps silently, so we should behave the same.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
diff mbox

Patch

--- a/xen/arch/x86/hvm/hvm.c
+++ b/xen/arch/x86/hvm/hvm.c
@@ -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;
     }