|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [PATCH v2 08/23] x86/traps: Alter switch_stack_and_jump() for FRED mode
On 28.08.2025 17:03, Andrew Cooper wrote:
> 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>
Reviewed-by: Jan Beulich <jbeulich@xxxxxxxx>
However, I'd much prefer if ...
> --- 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];", \
... the unnecessarily complicated $%c here could be replaced by plain %.
Jan
> + X86_FEATURE_XEN_FRED) \
> "and $%c[stack_mask], %[ssp];" \
> "sub %[ssp], %[val];" \
> "shr $3, %[val];" \
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |