Re: [kvm-unit-tests PATCH v3 10/11] x86: efi, smp: Transition APs from 32-bit to 64-bit mode

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Apr 26, 2022, Varad Gautam wrote:
> diff --git a/x86/start32.S b/x86/start32.S
> index 9e00474..2089be7 100644
> --- a/x86/start32.S
> +++ b/x86/start32.S
> @@ -27,7 +27,16 @@ MSR_GS_BASE = 0xc0000101
>  .endm
>  
>  prepare_64:
> -	lgdt gdt_descr
> +#ifdef CONFIG_EFI
> +	call prepare_64_1
> +prepare_64_1:

Use "1:" for the label, and 1f / 1b, that way it's obvious it's a relatively transient
thing.

> +	pop %edx
> +	add $gdt_descr - prepare_64_1, %edx
> +#else
> +	mov $gdt_descr, %edx
> +#endif

Rather than have #ifdefs everyway, add a macro to hide the differences, e.g.
load_absolute_addr.



[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux