[xen stable-4.10] x86: fix GET_STACK_END

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[xen stable-4.10] x86: fix GET_STACK_END

patchbot
commit 05eba93a0a344ec189e71722bd542cdc7949a8a5
Author:     Wei Liu <[hidden email]>
AuthorDate: Thu Feb 8 11:45:19 2018 +0100
Commit:     Jan Beulich <[hidden email]>
CommitDate: Thu Feb 8 11:45:19 2018 +0100

    x86: fix GET_STACK_END
   
    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 <[hidden email]>
    Acked-by: Andrew Cooper <[hidden email]>
    master commit: 8155476765a5bdecea1534b46562cf28e0113a9a
    master date: 2018-01-25 11:34:17 +0000
---
 xen/include/asm-x86/asm_defns.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/xen/include/asm-x86/asm_defns.h b/xen/include/asm-x86/asm_defns.h
index 9cfd79f..61b6d35 100644
--- a/xen/include/asm-x86/asm_defns.h
+++ b/xen/include/asm-x86/asm_defns.h
@@ -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;              \
--
generated by git-patchbot for /home/xen/git/xen.git#stable-4.10

_______________________________________________
Xen-changelog mailing list
[hidden email]
https://lists.xenproject.org/xen-changelog