From nobody Thu Oct 30 18:36:20 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; arc=pass (i=1 dmarc=pass fromdomain=amd.com); dmarc=pass(p=quarantine dis=none) header.from=amd.com ARC-Seal: i=2; a=rsa-sha256; t=1760389928; cv=pass; d=zohomail.com; s=zohoarc; b=TNlSIqLrTp7TL3oxtV0Iwk6KYFUzSO9s4AN0H80AElq0wmf4nQk+/c5CdmyJ1LJQS92QamMRmtXcfVRy7qvoxj1iY/e/n3gvi1kDfPRJNqzlHtySe9Sn+HnYb7aJbygS1RdzeEHRbW/l/yDVozMrBo/Vx5kK8tQkLqR+sJe/4lc= ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1760389928; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=XXe8zTKYF8x6DO9Gyq6hh+L+Uww1AxrCS0EUCz3I5Sg=; b=cMmHjUW3XKw++fx/LsjhYwR0CHqZTkN/juf5UABzk4eoewVG/jdPwdjWAUUs6KgVVhk8yDLEbT20PfNS/wcbccO1s9lucOgYlRb0iLsQgAUgSMm0JDeWXinx6qPAvGb1S2yQuOtX7OESLyA2WB4aoDrmBtGbvT2Euxsqy37SzGc= ARC-Authentication-Results: i=2; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; arc=pass (i=1 dmarc=pass fromdomain=amd.com); dmarc=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1760389928096188.20895237239915; Mon, 13 Oct 2025 14:12:08 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.1142504.1476648 (Exim 4.92) (envelope-from ) id 1v8Ppf-0000wd-Rw; Mon, 13 Oct 2025 21:11:51 +0000 Received: by outflank-mailman (output) from mailman id 1142504.1476648; Mon, 13 Oct 2025 21:11:51 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1v8Ppf-0000wW-Ox; Mon, 13 Oct 2025 21:11:51 +0000 Received: by outflank-mailman (input) for mailman id 1142504; Mon, 13 Oct 2025 21:11:50 +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 1v8Ppe-0000Zw-Gm for xen-devel@lists.xenproject.org; Mon, 13 Oct 2025 21:11:50 +0000 Received: from PH8PR06CU001.outbound.protection.outlook.com (mail-westus3azlp170120001.outbound.protection.outlook.com [2a01:111:f403:c107::1]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id 3a60d4b6-a879-11f0-980a-7dc792cee155; Mon, 13 Oct 2025 23:11:48 +0200 (CEST) Received: from SJ0PR13CA0096.namprd13.prod.outlook.com (2603:10b6:a03:2c5::11) by IA1PR12MB6307.namprd12.prod.outlook.com (2603:10b6:208:3e5::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9203.12; Mon, 13 Oct 2025 21:11:43 +0000 Received: from SJ1PEPF000023D8.namprd21.prod.outlook.com (2603:10b6:a03:2c5:cafe::31) by SJ0PR13CA0096.outlook.office365.com (2603:10b6:a03:2c5::11) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.9228.9 via Frontend Transport; Mon, 13 Oct 2025 21:11:42 +0000 Received: from satlexmb08.amd.com (165.204.84.17) by SJ1PEPF000023D8.mail.protection.outlook.com (10.167.244.73) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9253.0 via Frontend Transport; Mon, 13 Oct 2025 21:11:41 +0000 Received: from Satlexmb09.amd.com (10.181.42.218) by satlexmb08.amd.com (10.181.42.217) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.17; Mon, 13 Oct 2025 14:11:41 -0700 Received: from satlexmb07.amd.com (10.181.42.216) by satlexmb09.amd.com (10.181.42.218) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.17; Mon, 13 Oct 2025 14:11:41 -0700 Received: from fedora.mshome.net (10.180.168.240) by satlexmb07.amd.com (10.181.42.216) with Microsoft SMTP Server id 15.2.2562.17 via Frontend Transport; Mon, 13 Oct 2025 14:11:40 -0700 X-Outflank-Mailman: Message body and most headers restored to incoming version 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: 3a60d4b6-a879-11f0-980a-7dc792cee155 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=s+Ll1+vSCg40be+YwDkbLp5QWG919yR0/H4iigNMIO552kz1WW8YkYi6n7iQgSGeV2ln4tnkLxJeB8R+ZRGhjFf4OK8/bous7P8VkHLblLbz+xEn/UHS9VLe8bGSgdyK2u4Mojwf1iH3wae2gJIgvPk+Mm8n8/Fj/Zc0R+I08wNCL/WEUHVP34+s3bQwTDfuHukMbQ3sIBJiuiq7DI10ALFAjj24pXn7migwzYiJgi0lDwgl6cS73CmaTPYCCyJjL8kugN39vzIwe1W6qLRtm62gceyD+4ug4gomhnKHuITY78AQITDp0bo386CTSY+JEEW4ukZc2rb86n6H9hdl0Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=XXe8zTKYF8x6DO9Gyq6hh+L+Uww1AxrCS0EUCz3I5Sg=; b=abUEi8sTyO1uohYrXxgWYX3cUTTtaUQXjMrW8hXf8swpXQAuEuAnJCmUvmx4q/7rwQpTu4P2vd92a/uN9f7JEz/QQAHPqsqc5Y+tkmRegJyCvPRLFhaOmIH0QMAhI0Ai/vF560+9P3DawogDOffFI/RybLzrWI429og7OC9GkdnloYzfs7n0/VyVGvIEqDyqZ8GJcwNUYsoV7y6WWT38MH3wxLKEaMcbnZYcy+JeFUUjHIDpz1tOhTt31hpBcxGSjo+lYmFDALIEJK8dL3s/M3muZ2JBv83jwY/F8o+0IvfkS3wMkY9r8eRvrHpfGXJD0DD9fg+kUeQ80sQmzyZ4Hw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=lists.xenproject.org smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=XXe8zTKYF8x6DO9Gyq6hh+L+Uww1AxrCS0EUCz3I5Sg=; b=4qNtyLyVhUCW+TuiNo0pxivwcTGPZBQlV2Qd+YTrdZbUAMPPxcGQXUcHvrvJGnTbqlJVT/t1lq++kofGlseEhYcVFZz/9hdjd6+rY/UJyMc68gS1o5QiQTikcd47bcYxOv67QWom7fhtBTSxtoEBhSmSkMVMCFC8LOCrxNsKouc= X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=satlexmb08.amd.com; pr=C From: Jason Andryuk To: CC: Oleksii Kurochko , Jason Andryuk , Jan Beulich , Andrew Cooper , =?UTF-8?q?Roger=20Pau=20Monn=C3=A9?= Subject: [PATCH] x86/boot: Fix edd=off to skip mbr Date: Mon, 13 Oct 2025 17:11:39 -0400 Message-ID: <20251013211139.8750-1-jason.andryuk@amd.com> X-Mailer: git-send-email 2.51.0 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SJ1PEPF000023D8:EE_|IA1PR12MB6307:EE_ X-MS-Office365-Filtering-Correlation-Id: 945fb084-8d70-47ed-8c03-08de0a9d1b81 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|36860700013|1800799024|376014|82310400026; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?6P+8k7B8QH3f39tI4cnjCwQFiYZpda/e7O/JRKJ3DEL17hKXkGCSlB2Z2s8N?= =?us-ascii?Q?9miRx8ctMKExnAE/V3Yv08jtdL6NJ5Fd3o9jKgnFz+PjN4Ekls+3paBjN2wO?= =?us-ascii?Q?ciNx9UmG7ZnPVkSizGGZL9kryxapXTfsrHlSPf//pxCBFsEpF81RtAuRVvfV?= =?us-ascii?Q?SMpZB15tdoQogLiAZiM/WggeJMA653zsjNutyG7QqQStGgnkgBUxrCE5WtM6?= =?us-ascii?Q?XrwC4yYwPtB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SCFMR2ZI?= =?us-ascii?Q?9+bMGK+l/dvNrmxv4STqJ0bWT37wGmDBrLI5OUyOT4+IUuKwCkbMMhu21It2?= =?us-ascii?Q?j8duXVm7rGnZbTflLvGhtXWPvWOHMCS2bjVbk7zmeeKdXDi6B9JPiJZkbHUN?= =?us-ascii?Q?H8v/RTu1OH4oz1VfCqwoTfUt2/bVXlYCDTM2O4Dc72TtiHXntSnM+6G9HN+O?= =?us-ascii?Q?I0mG2u8zTcYesUuJmvlkO0FfNe28nNlJzmVR4lnSjwWv3HCPCtPYnQ14ihlX?= =?us-ascii?Q?PCv0Gbr+Jec+pXvFK0csHwZwFs5MFooEZPhffzLmpg/Npblm2K7u7epgp0u/?= =?us-ascii?Q?dIp0xNFffyfZG0twdnqxqfKx7qdKgXhPMJnftLRy+7RdjKA3+qoRnT1ubJOF?= =?us-ascii?Q?q9FaTPUCHZjI6uMWkCaJLfdbQFRhs2/8ll1khh7fWiVAKkUYRMe+5dSHPCYK?= =?us-ascii?Q?fjpIktUHHr7NH/WcPUE=3D?= X-Forefront-Antispam-Report: CIP:165.204.84.17;CTRY:US;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:satlexmb08.amd.com;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230040)(36860700013)(1800799024)(376014)(82310400026);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Oct 2025 21:11:41.9548 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 945fb084-8d70-47ed-8c03-08de0a9d1b81 X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d;Ip=[165.204.84.17];Helo=[satlexmb08.amd.com] X-MS-Exchange-CrossTenant-AuthSource: SJ1PEPF000023D8.namprd21.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: IA1PR12MB6307 X-ZohoMail-DKIM: pass (identity @amd.com) X-ZM-MESSAGEID: 1760389928699158500 Content-Type: text/plain; charset="utf-8" When the fixes commit re-arranged the code, it made edd=3Doff jump to the mbr code instead of returning from the function. Previously edd_done was immediately before ret and skipped the MBR check. Replace edd_done with .Ledd_mbr_sig for the start of the MBR checking, and replace .Ledd_mbr_sig_skip with .Ledd_done to exit from the function. edd=3Doff jumps to .Ledd_done to return from the function, and internal jumps go to .Ledd_mbr_sig to check edd=3Dskipmbr. Fixes: 5ec164fd61bd ("x86/boot: re-arrange how/when we do disk I/O") Signed-off-by: Jason Andryuk Reviewed-by: Jan Beulich --- xen/arch/x86/boot/edd.S | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/xen/arch/x86/boot/edd.S b/xen/arch/x86/boot/edd.S index 3df712bce1..02437511b2 100644 --- a/xen/arch/x86/boot/edd.S +++ b/xen/arch/x86/boot/edd.S @@ -25,7 +25,7 @@ =20 get_edd: cmpb $2, bootsym(opt_edd) # edd=3Doff ? - je edd_done + je .Ledd_done =20 # Do the BIOS Enhanced Disk Drive calls # This consists of two calls: @@ -48,7 +48,7 @@ edd_check_ext: movb $0x41, %ah # 0x41 Check Extensions Pr= esent movw $0x55AA, %bx # magic int $0x13 # make the call - jc edd_done # no more BIOS devices + jc .Ledd_mbr_sig # no more BIOS devices =20 cmpw $0xAA55, %bx # is magic right? jne edd_next # nope, next... @@ -96,13 +96,13 @@ edd_legacy_done: =20 edd_next: incb %dl # increment to next device - jz edd_done + jz .Ledd_mbr_sig cmpb $EDD_INFO_MAX,bootsym(boot_edd_info_nr) jb edd_check_ext =20 -edd_done: +.Ledd_mbr_sig: cmpb $1, bootsym(opt_edd) # edd=3Dskipmbr ? - je .Ledd_mbr_sig_skip + je .Ledd_done =20 # Read the first sector of each BIOS disk device and store the 4-byte sign= ature .Ledd_mbr_sig_start: @@ -160,7 +160,7 @@ edd_done: jb .Ledd_mbr_sig_read .Ledd_mbr_sig_done: popw %es -.Ledd_mbr_sig_skip: +.Ledd_done: ret =20 GLOBAL(boot_edd_info_nr) --=20 2.51.0