On 17.02.2023 18:48, Andrew Cooper wrote:
> ljmp is (famously?) incompatible between Intel and AMD CPUs, and while we're
> using one of the compatible forms, we've got a good stack and lret is the far
> more common way of doing this.
> 
> No functional change.
> 
> Signed-off-by: Andrew Cooper <andrew.coop...@citrix.com>

Reviewed-by: Jan Beulich <jbeul...@suse.com>

One question though:

> --- a/xen/arch/x86/x86_64/kexec_reloc.S
> +++ b/xen/arch/x86/x86_64/kexec_reloc.S
> @@ -86,12 +86,11 @@ ENTRY(kexec_reloc)
>          movq    %rax, (compat_mode_gdt_desc + 2)(%rip)
>          lgdt    compat_mode_gdt_desc(%rip)
>  
> -        /* Relocate compatibility mode entry point address. */
> -        leal    compatibility_mode(%rip), %eax
> -        movl    %eax, compatibility_mode_far(%rip)
> -
>          /* Enter compatibility mode. */
> -        ljmp    *compatibility_mode_far(%rip)
> +        lea     compatibility_mode(%rip), %rax
> +        push    $0x10

Any thought about making this literal number a proper expression,
rendering the code a little less fragile?

Jan

Reply via email to