]> xenbits.xensource.com Git - xen.git/commitdiff
x86: fix GET_STACK_END
authorWei Liu <wei.liu2@citrix.com>
Thu, 8 Feb 2018 11:51:18 +0000 (12:51 +0100)
committerJan Beulich <jbeulich@suse.com>
Thu, 8 Feb 2018 11:51:18 +0000 (12:51 +0100)
AIUI the purpose of having the .if directive is to make GET_STACK_END
work with any general purpose registers. The code as-is would produce
the wrong result for r8. Fix it.

Signed-off-by: Wei Liu <wei.liu2@citrix.com>
Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
master commit: 8155476765a5bdecea1534b46562cf28e0113a9a
master date: 2018-01-25 11:34:17 +0000

xen/include/asm-x86/asm_defns.h

index 358deffb5beafb2875ed447208873bdb9708e647..edd7f05accb96b879e8ce74657c62d1c9d278977 100644 (file)
@@ -120,7 +120,7 @@ void ret_from_intr(void);
 
 #define STACK_CPUINFO_FIELD(field) (1 - CPUINFO_sizeof + CPUINFO_##field)
 #define GET_STACK_END(reg)                        \
-        .if .Lr##reg > 8;                         \
+        .if .Lr##reg >= 8;                        \
         movq $STACK_SIZE-1, %r##reg;              \
         .else;                                    \
         movl $STACK_SIZE-1, %e##reg;              \