[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [PATCH v2 08/23] x86/traps: Alter switch_stack_and_jump() for FRED mode
FRED and IDT differ by a Supervisor Token on the base of the shstk. This means that switch_stack_and_jump() needs to discard one extra word when FRED is active. Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx> --- CC: Jan Beulich <JBeulich@xxxxxxxx> CC: Roger Pau Monné <roger.pau@xxxxxxxxxx> v2: * Use X86_FEATURE_XEN_FRED --- xen/arch/x86/include/asm/current.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/xen/arch/x86/include/asm/current.h b/xen/arch/x86/include/asm/current.h index c1eb27b1c4c2..35cc61fa88e7 100644 --- a/xen/arch/x86/include/asm/current.h +++ b/xen/arch/x86/include/asm/current.h @@ -154,7 +154,9 @@ unsigned long get_stack_dump_bottom (unsigned long sp); "rdsspd %[ssp];" \ "cmp $1, %[ssp];" \ "je .L_shstk_done.%=;" /* CET not active? Skip. */ \ - "mov $%c[skstk_base], %[val];" \ + ALTERNATIVE("mov $%c[skstk_base], %[val];", \ + "mov $%c[skstk_base] + 8, %[val];", \ + X86_FEATURE_XEN_FRED) \ "and $%c[stack_mask], %[ssp];" \ "sub %[ssp], %[val];" \ "shr $3, %[val];" \ -- 2.39.5
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |