From patchwork Wed Aug 14 08:34:11 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frediano Ziglio X-Patchwork-Id: 13763062 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 482DDC3DA4A for ; Wed, 14 Aug 2024 08:35:09 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.776849.1187043 (Exim 4.92) (envelope-from ) id 1se9TB-0004D0-1L; Wed, 14 Aug 2024 08:35:01 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 776849.1187043; Wed, 14 Aug 2024 08:35:01 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1se9TA-0004CO-S7; Wed, 14 Aug 2024 08:35:00 +0000 Received: by outflank-mailman (input) for mailman id 776849; Wed, 14 Aug 2024 08:35:00 +0000 Received: from se1-gles-flk1-in.inumbo.com ([94.247.172.50] helo=se1-gles-flk1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1se9TA-0003IY-2G for xen-devel@lists.xenproject.org; Wed, 14 Aug 2024 08:35:00 +0000 Received: from mail-yw1-x1130.google.com (mail-yw1-x1130.google.com [2607:f8b0:4864:20::1130]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id 16bf59dd-5a18-11ef-8776-851b0ebba9a2; Wed, 14 Aug 2024 10:34:58 +0200 (CEST) Received: by mail-yw1-x1130.google.com with SMTP id 00721157ae682-690af536546so63569377b3.3 for ; Wed, 14 Aug 2024 01:34:58 -0700 (PDT) Received: from fziglio-xenia-fedora.eng.citrite.net ([185.25.67.249]) by smtp.gmail.com with ESMTPSA id af79cd13be357-7a4c7e05595sm407786785a.122.2024.08.14.01.34.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 14 Aug 2024 01:34:56 -0700 (PDT) X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 16bf59dd-5a18-11ef-8776-851b0ebba9a2 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cloud.com; s=cloud; t=1723624497; x=1724229297; darn=lists.xenproject.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=9liPXw8F8uWc1T2M5e5K9juxcl/gQEIllOyVhjRgClo=; b=YZuTbeCi/FYg66M3taI8SEwHanJvd8Hx+Kqafh0DrF6FR5XeQi0iHXZguxdTN4wYtg ilT1QxuJDth8LjAMJJkbjElrTpq3T5r9ilp2ZEqsZT3HbczaHj4jzqI42yrxRZX/QAqZ jYJq5ByXGFQlPdz0+uuRMFr3LGqd6W4eodr10= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1723624497; x=1724229297; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=9liPXw8F8uWc1T2M5e5K9juxcl/gQEIllOyVhjRgClo=; b=cT1p6z05tWzlCXlHvUrWfgcKHAfFEk1DS9gMy0pHEE929Fqbfy4njXt8hkSJ3WZvje WjKJauE2+BVnPopvdXPbMbV5H3KcgMhQkZr6Wt9vh25Kav2xXkxH19J4x0z45dFbJOVq 7tn/Uw+2HbgH8Xf8IzeBu+G1lpk2rfq5+iaSMT5YNdCJHDOypJzT6uzz6b6afM2xOnlI I9pNBL+CkoI1M+A6ARUF8lCiOOhO3T3z8PZ2VASdwIOgguqS3IG3VuHla2Eq65OQqUcn Bg4wxcCtWUOuE3Dd2nG5zQBbfK8DD4CpT6ZmD3ZdiIjLCDjOTopeBZpalt+NLV8uYgLR vZJw== X-Gm-Message-State: AOJu0Yz/uNKJO0RnpqZnmyiPqq8uZt9NmAmy4cHrZkKdVCimaSBuf/oz sjKOSDLo3i+MW7VjCF8fjHLA3EagGrFuQzIVRM2xdP55sypNnwOo5dgB+XQeqRoPs2KCKE0Cm5q W X-Google-Smtp-Source: AGHT+IGMUyQiPtuxz+T1VQxDgT44hXZVi7vkaynauzor/OZHJNJzRTZJWR2TZztIUfw3xi2fMzeBPA== X-Received: by 2002:a05:690c:2512:b0:648:3fb2:753b with SMTP id 00721157ae682-6ac976454c9mr21427057b3.24.1723624497101; Wed, 14 Aug 2024 01:34:57 -0700 (PDT) From: Frediano Ziglio To: xen-devel@lists.xenproject.org Cc: Frediano Ziglio , Jan Beulich , Andrew Cooper , =?utf-8?q?Roger_Pau_Monn=C3=A9?= Subject: [PATCH v2 2/5] x86: Set xen_phys_start and trampoline_xen_phys_start earlier Date: Wed, 14 Aug 2024 09:34:11 +0100 Message-ID: <20240814083428.3012-3-frediano.ziglio@cloud.com> X-Mailer: git-send-email 2.46.0 In-Reply-To: <20240814083428.3012-1-frediano.ziglio@cloud.com> References: <20240814083428.3012-1-frediano.ziglio@cloud.com> MIME-Version: 1.0 No reason to wait, if Xen image is loaded by EFI (not multiboot EFI path) these are set in efi_arch_load_addr_check, but not in the multiboot EFI code path. This change makes the 2 EFI code paths more similar and allows the usage of these variables if needed. Signed-off-by: Frediano Ziglio --- xen/arch/x86/boot/head.S | 5 +++++ 1 file changed, 5 insertions(+) --- Changes since v1: - Do not remove other hunk, used for BIOS; - Slightly improved commit message. diff --git a/xen/arch/x86/boot/head.S b/xen/arch/x86/boot/head.S index 16830f636f..af598a60bf 100644 --- a/xen/arch/x86/boot/head.S +++ b/xen/arch/x86/boot/head.S @@ -240,6 +240,11 @@ __efi64_mb2_start: jmp x86_32_switch .Lefi_multiboot2_proto: + /* Save Xen image load base address for later use. */ + lea __image_base__(%rip), %esi + mov %rsi, xen_phys_start(%rip) + mov %esi, trampoline_xen_phys_start(%rip) + /* Zero EFI SystemTable, EFI ImageHandle addresses and cmdline. */ xor %esi,%esi xor %edi,%edi