Received: by 2002:a89:48b:0:b0:1f5:f2ab:c469 with SMTP id a11csp1249178lqd; Thu, 25 Apr 2024 09:45:18 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCV7DMckGl8HMIb0sJs30zo3uRl3l2hC7uK6H+FcMaMZFlBzwHB6zRPOzYQdugmwPDf7c5ozHajZM6V9JZpuOKcfbhcDtWldETU8T4I5CQ== X-Google-Smtp-Source: AGHT+IGvS8WmFc/EpwuDnxXVIUy9WxiGC5HB+Ah7pUYMQh2wDB2/bc7yBAqQqP/XfKj38W1wTGMM X-Received: by 2002:a05:6a20:dda9:b0:1a7:a3ba:4252 with SMTP id kw41-20020a056a20dda900b001a7a3ba4252mr219623pzb.31.1714063518064; Thu, 25 Apr 2024 09:45:18 -0700 (PDT) Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id u4-20020a170902e5c400b001dddbb23e2bsi13548427plf.47.2024.04.25.09.45.16 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 25 Apr 2024 09:45:17 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-158922-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@amd.com header.s=selector1 header.b=LNpYK0hb; arc=fail (signature failed); spf=pass (google.com: domain of linux-kernel+bounces-158922-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-158922-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amd.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id AFD2328301B for ; Thu, 25 Apr 2024 16:45:16 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 6132A14D42C; Thu, 25 Apr 2024 16:45:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=amd.com header.i=@amd.com header.b="LNpYK0hb" Received: from NAM11-BN8-obe.outbound.protection.outlook.com (mail-bn8nam11on2084.outbound.protection.outlook.com [40.107.236.84]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A1FEB14A0BC for ; Thu, 25 Apr 2024 16:45:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.236.84 ARC-Seal:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714063510; cv=fail; b=ChZYEwGGxG8SqjQ7uvk9gBYu8Kl9/OorNgtLabONxA1NdIswFW9MoZsMiz7PaL+FHqI/lGxyW/JksVhDoxUfHtOsmeKUFug/aXrJUf8UYJZ+1AhHy8JI3l7b7RAyABHLKFZxY5r+LXDFondxzw3e6w3zJknmTI/YqYx7NgRsuco= ARC-Message-Signature:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714063510; c=relaxed/simple; bh=xN7A5tl5al7JutYOa1fmvjLDosXaBpJSi0FEmH5m18s=; h=Message-ID:Date:Subject:From:To:Cc:References:In-Reply-To: Content-Type:MIME-Version; b=COt1K2QZfeeTeUQ5iia7yQgEEY7tj9/6YsPcqqUAIFFCkAKCHEFFoY/wx1ci0PmGgdKvmE3GlLn/yCCd9ajB5scu2cd0e3A+UESnQsscYtmHEZc6iGNerOFeJwRobaTjFd6Oxg+ezsEK9ton8VF1bCMoGvWOr2KNY/gnn5JJhrU= ARC-Authentication-Results:i=2; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=amd.com; spf=fail smtp.mailfrom=amd.com; dkim=pass (1024-bit key) header.d=amd.com header.i=@amd.com header.b=LNpYK0hb; arc=fail smtp.client-ip=40.107.236.84 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=amd.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=amd.com ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=YO1FIFUfdAo3GsU8S3ZRc7++//IaFGkicvi1xXyWNiCg6qTFAkkUm1IXEaiM0ny8+7QKZqDimRzsZ5rwdAl1+NSfh54bMT+si8of9K+7Duzcr8aPuMadpbD1Q9uJkeguGUXX4OuwN3WybUYxgVOcNvNLRJvR+V3yQhL75LUdUrHj/SW+ZRwjTPbQlENpaeFBU5TnBJcqzxKzhLLLUs6+N/CH0sK0V85wbiuTRlTp2bftvlZyv5eyr1GQm7wR7o0/jsZRJSn62bcZRKyvtTPCWzYIffABylmNPHunvTr6QATh/Miyc8f3WV5/YwUg18VS2JEH2Ov5lOTMtB8/PKARNg== 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=0AVkvnbfH2UU9A12N9umHHgJyY/Ju/6l6jvSSNM3kog=; b=DipfP5v7ORyDv0kM5EHRMmNLOpJ942RkFsRyirXl4KK99spG3mBql3Xr/RX9p6d2ukLt5LoROj6ge7vz+UALwBoRCmz35qDLrrSti7BJzIakmLhb6hex7I6P39lWiPPrZhfOv/wZVV6vSb0pyJalPGCsH1jiAi0RzdSdHDhHFHluVarSPkcp7X/wkSOBBJTOY7U+/YjgWijKSIPmuGW4BNzkU6OYluQB1dOjCHBeYL8iz4t9gR4X/YXOnYIz/OsonnLi1RITZEg+sYX7oFXWu50shl1V3ZvobGuRQqq14fbzrgIbXBH0OjgO8Yb5d6pVTP2P5bQnSmUKFM3jnkCEtg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=amd.com; dmarc=pass action=none header.from=amd.com; dkim=pass header.d=amd.com; arc=none 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=0AVkvnbfH2UU9A12N9umHHgJyY/Ju/6l6jvSSNM3kog=; b=LNpYK0hboJOOTfmEtjLvA5C1/pfPIgJPA12MJbgC6lAZzm5q+10wlCyJYesJGbPClpjDYKTkb3/lQrdlPz3NP1ffisYzp1gtSXzKXR1xhXZnBSrzDyW72ecJEqSzeo7xS1fH0FKYV1KV86qERaO4CORQdkaTOj1nfChrze3owXQ= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=amd.com; Received: from SN6PR12MB2767.namprd12.prod.outlook.com (2603:10b6:805:75::23) by MN2PR12MB4375.namprd12.prod.outlook.com (2603:10b6:208:24f::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7472.48; Thu, 25 Apr 2024 16:45:06 +0000 Received: from SN6PR12MB2767.namprd12.prod.outlook.com ([fe80::3cc5:f552:44ae:1f26]) by SN6PR12MB2767.namprd12.prod.outlook.com ([fe80::3cc5:f552:44ae:1f26%7]) with mapi id 15.20.7472.044; Thu, 25 Apr 2024 16:45:05 +0000 Message-ID: <9c96cf16-73a5-46c1-b4ce-de4e0561ba1c@amd.com> Date: Thu, 25 Apr 2024 11:45:01 -0500 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v5 1/3] efi/x86: skip efi_arch_mem_reserve() in case of kexec. Content-Language: en-US From: "Kalra, Ashish" To: Borislav Petkov Cc: tglx@linutronix.de, mingo@redhat.com, dave.hansen@linux.intel.com, x86@kernel.org, rafael@kernel.org, peterz@infradead.org, adrian.hunter@intel.com, sathyanarayanan.kuppuswamy@linux.intel.com, jun.nakajima@intel.com, rick.p.edgecombe@intel.com, thomas.lendacky@amd.com, michael.roth@amd.com, seanjc@google.com, kai.huang@intel.com, bhe@redhat.com, kirill.shutemov@linux.intel.com, bdas@redhat.com, vkuznets@redhat.com, dionnaglaze@google.com, anisinha@redhat.com, jroedel@suse.de, ardb@kernel.org, kexec@lists.infradead.org, linux-coco@lists.linux.dev, linux-kernel@vger.kernel.org References: <20240424144807.GEZikbp0NjFP5AM_ms@fat_crate.local> <16b34494-7e5f-4feb-8a21-58e7b8fa97e2@amd.com> In-Reply-To: <16b34494-7e5f-4feb-8a21-58e7b8fa97e2@amd.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: DS7PR03CA0260.namprd03.prod.outlook.com (2603:10b6:5:3b3::25) To SN6PR12MB2767.namprd12.prod.outlook.com (2603:10b6:805:75::23) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SN6PR12MB2767:EE_|MN2PR12MB4375:EE_ X-MS-Office365-Filtering-Correlation-Id: 8119dc75-8e6f-4820-f638-08dc65470f73 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: =?utf-8?B?L1ppYWk2U1RqR2VhMGszQisyd1NoT3RkemcxVDZoWlBQRzROSEJnVGpib2dL?= =?utf-8?B?VEV6TGVTd0hWdUJaU1krRjBybmNlR1BGVCtvNUNNbnJJT0RaK3pZK2hNd3Fp?= =?utf-8?B?T2FXbVJYL1pmVUJTQUdsOVkxWVBNdUMwbGdNcDdDMFZobkQ0Qk51MGpOUHNI?= =?utf-8?B?eHVDWGFhaHVYNV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f-8?B?elhUNlRCUG5HUDc2eUlVdkI4bGtDTmZtem9xb2pxd09aNTlldUg5TTQwOG1B?= =?utf-8?B?eHp2cHFWeTViVXJjbWYrSDE4ZFNHbzVYWFA0Y05LZmFBQjVxcjM1NUdlUyt3?= =?utf-8?B?S3U1OGVlak1RY0p1bWVOUjJldjEwMWlVenFYNGFMUkpURWM3V09KZUdOQjNt?= =?utf-8?B?cThFcSt5SG9FelFQb3poUWtyWWxMbk5GalRMUjNqTklkZDZLb0VEUG1ESEdX?= =?utf-8?B?NnAyR0RuWEZJTDVrK2hhTFJJZ0hSaVN2blQ1YitIZURWMmhxZUg3c2VEWG5C?= =?utf-8?B?OHRVRG1YUWRWL3VIb1lzRWJuV0hmOC91SXZkMTJNUndCaTB1ak03OFIvaHRj?= =?utf-8?B?R0RtRXVzVGtCOGFQQ01mdFM3ZHJRMXJBTlpxWk1yY0hkUmUwQnJqa01QOXR1?= =?utf-8?B?aVNYU2VSalZDekQxak9iVVdZTjU1VDF4cXRXSEFtbmhPall5Vm9DMzVqMWtS?= =?utf-8?B?UUZZNjFZcno3SFd2MU1nUVdSaWVNdk1UV05jSjU1d1lMYmNac2tvRW00UlBs?= =?utf-8?B?VEV3bER1VFRrQlJQcjJ5U1k3UUFLWlJaYzF6SmhVV0JVVnRDaVJBYnlwK3RR?= =?utf-8?B?K2JpOUMwS0M3TEJsU0gxSlhXdXhMUi9XZTVwOFk4Z1RjeVZPNittL3hRPT0=?= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SN6PR12MB2767.namprd12.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(1800799015)(376005)(7416005)(366007);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?T2xqNlJFbzhSd0pjZXJVRmN4MHh2ZmNwVlRsQnJNcnNCS1daMHk2ZjhBU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OURpR21TbENOMXZNZGQ0TWNr?= =?utf-8?B?Zk52OHpaNWZjUlRXbm81MDVBM21IQ084ejVaMUE0UGRKQTJRb1ZsZHI0bmhH?= =?utf-8?B?dm02U0IwVi9wTkJyK05abExQWDY5N1ZRZVVPUlJjaEwrakh2cHo3UlFxcFN5?= =?utf-8?B?eHFNbXJFeGFUQS9jTmRVT0dLUVpDSlFITEFoSG9TK0hlT2t5dUZjR1VEQndP?= =?utf-8?B?VDlXZjJhb3hlOG96S09zdDFsUWQwbmdzdktEYlgrSHc1QW5LbXpHTzhHNjZp?= =?utf-8?Q?s6tJv8iNIXKeBWLALtLAEj4/O?= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: 8119dc75-8e6f-4820-f638-08dc65470f73 X-MS-Exchange-CrossTenant-AuthSource: SN6PR12MB2767.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Apr 2024 16:45:05.8414 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: dcIYVy+eFTejDBVSvUgFSseVH9a02PLZO6tJqV1xO98zB+d7VllaC6GZean68G1kAidL2oiVLMTSHQsH3GCcoQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR12MB4375 >It sounds to me like you need to go back up, to the 10000ft view and >> explain how exactly this efi_mem_reserve() causes trouble for the >> kexec-ed kernel so that we can think of a proper solution, not some >> random hackery. > > The above details explain why and how efi_arch_mem_reserve() causes > trouble for the (nested) kexec-ed kernel, additionally, there is a > another reason to skip efi_arch_mem_reserve() altogether for the kexec > case, as for kexec use case we need to use the EFI memmap passed from > the 1st kernel via setup_data and probably need to avoid any > additional EFI memory map additions/updates. > > Therefore, the first revision of this patch had the following code to > skip efi_arch_mem_reserve(): > > void __init efi_arch_mem_reserve(..) { > > + if (efi_setup) + return; > > But then based on upstream review/feedback, the second revision of > this patch, updated the patch to check the md attribute of the EFI > memory descriptor instead of checking for efi_setup for detecting if > running under kexec kernel and the checking of the md attribute of the > EFI memory descriptor introduces these additional checks and pr_err() > which you commented on above. > > Hopefully, the above detailed explanation captures the reason to skip > efi_arch_mem_reserve() in case of (SNP) guest kexec, looking forward > to your comments/feedback on the same for me to rework this patch > (especially the commit message) and post it again. I am actually going to rename this patch to something more appropriate like: Fix EFI memory map corruption during SNP guest kexec And in the patch itself, go back to skipping efi_arch_mem_reserve() by checking efi_setup to check for running under kexec kernel similar to how it used by efi_enter_virtual_mode(). Thanks, Ashish