[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 1/3] x86/kexec: Drop compatibility_mode_far
- To: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
- From: Jan Beulich <jbeulich@xxxxxxxx>
- Date: Tue, 21 Feb 2023 11:34:26 +0100
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.com; arc=none
- Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=Vueirk411ccbQsk/R6TFPb0Ku2dFHcQ1GekFPx42q2o=; b=naWajNS9H46oI2gYdacWmOsj0YmSiTouCVBGWHJuEplK+JXM/DJlp6LuNrgVR1VY/xU/o/TyINetLrLUf8J7TOyALV8S0ddVMU0f30lc7Qn0T47V2fPtUsmwIEbBlUhkVL96GKpcPKlDK0yQ3LC/LXyOXL9DV0lCuntkPMPe8vu9ypDAIj7LSPFtRyU9K6ILovHLiBJhLCHBe4DhpyriDCEgTNk9g8ut421sLjimPCDGuWuj4DCBR3tiQ0bLycFwAupKyxD0H+bDK/qK4JB7ywHSROSf/aYxTPsRUG32cOJUadei1b5X5oPdTcLCN+hrKwZDopSMaWEEjrcc83eAfA==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=mQU2xLwwnhExbN9XV9mwIyHaES/mMfy2kyBOzjqPxGY5y7zAD4wXcNsBWw7fUkrnVkHjT0A6SZN0EbFUSC+1BhcF6qjlJ6bwft1AFynq2V0sNzcazg2uZzZCItpsx/n3arZsr7bmOqSU4grka2dV3JxgYXZiug/927ZBwurQtDSdX8aWVgbdMJ8OCh9GcQ1i8OcNX0g0RE/ZOrIlpRLWZiGzCMT0hgDeO/arZFpkHitQmX25kqMUlLeurDt0VK/gEC3lYLDwM72wINnqNbIEoycyk6HmKO3VosHK44bLYITBAF3R+t8bKemLzYaTsFPqHAeMX1ShSB+7BEUU7MsMCw==
- Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
- Cc: Roger Pau Monné <roger.pau@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>
- Delivery-date: Tue, 21 Feb 2023 10:34:31 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
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.cooper3@xxxxxxxxxx>
Reviewed-by: Jan Beulich <jbeulich@xxxxxxxx>
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
|