Received: by 2002:ab2:7855:0:b0:1f9:5764:f03e with SMTP id m21csp731439lqp; Wed, 22 May 2024 19:50:11 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUyv83jp+O3le2f3bw7BTyWE1mw+bP92Ypnc7gbzWySHNdPB1C7ZLdB68cAvjGHry0dAnqzYEZnhm9nukAUN6d4crIHEPxpCUnyMYeIoQ== X-Google-Smtp-Source: AGHT+IFpOCacUHsrmGu7p41QG9d1EQuyVorUpveHj5XsUen/z+6hwLSFa01tSPAJq/K7ZaBSEFUu X-Received: by 2002:a17:906:d28a:b0:a5c:fe8e:cf6f with SMTP id a640c23a62f3a-a6228164719mr233431866b.56.1716432611735; Wed, 22 May 2024 19:50:11 -0700 (PDT) Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id a640c23a62f3a-a61868e30cdsi393615366b.532.2024.05.22.19.50.11 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 May 2024 19:50:11 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-186925-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=M3SnqtIP; arc=fail (signature failed); spf=pass (google.com: domain of linux-kernel+bounces-186925-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-186925-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.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 am.mirrors.kernel.org (Postfix) with ESMTPS id 248021F218E6 for ; Thu, 23 May 2024 02:50:11 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id BC4F513A41C; Thu, 23 May 2024 02:50:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="M3SnqtIP" Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.10]) (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 B28E31E871 for ; Thu, 23 May 2024 02:50:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=198.175.65.10 ARC-Seal:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716432604; cv=fail; b=fUwSO+Wf3ETWrqakg/s6sV9YxELzxx6snlnISSdM1Vqv0f4t6yLxgnwlQdxO7WAH2D/+qMGDMX5lKq0thBP9z1qwgcgMGof1crZcOMaH4MFJ3qSEfezAGPMg8iAUD8SmM4UB+/l07Trq1Hi01HfDXz9MwJJlmB0wYIPkklLRcGE= ARC-Message-Signature:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716432604; c=relaxed/simple; bh=sJYfj3SXBTtxlh9KWOwaBkeH95SVPVgcxHsRR8OnGdY=; h=Message-ID:Date:Subject:From:To:CC:References:In-Reply-To: Content-Type:MIME-Version; b=dS4qVoPYDkqsKwYbgcxot8yKYfX0VKAx5EDGQJD7MiigmgEsYwqD6GKvKhjG0Mv2IanF2pRQXJYkcPndN1d2nusz9p9za1M2H32fsdA73GeVZOaz5PKFvbb/F2pmYkQPWw9aOYzaMmuufS5GDvIG7MPOf2mVet7VewtHZMlvWfg= ARC-Authentication-Results:i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com; spf=pass smtp.mailfrom=intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=M3SnqtIP; arc=fail smtp.client-ip=198.175.65.10 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1716432603; x=1747968603; h=message-id:date:subject:from:to:cc:references: in-reply-to:content-transfer-encoding:mime-version; bh=sJYfj3SXBTtxlh9KWOwaBkeH95SVPVgcxHsRR8OnGdY=; b=M3SnqtIPX87bKIkOIYlPBWS4NB6x7ASJCeVLDApoM/+u/sUHDO1/owJ8 ZSVHceLj542Lug+bEO9t1iNDIXQFDXqE4t1Bx98FKYeAvpo/zoWT2GEJe pxv+VqCJV6IJmMkOmoN3NpF6qxArFlGoB+Ybl3bDPUFc5yoGBR63aRiS0 ZpZitRZ5ytj00fkeuX05yRd/6fLJ9xNCCUsVUx1+3RBAS4dwKv/E4sa3/ HfSbrOvSSdMGs7iEhBmW51ZIqWhHOrN2PfUspszEFSaVt2pHYG8oF2z18 1CxzWONJNyWXWxwqN60i2kRoDcxMhxPAD/KIZL9vpSHMnFMUvjavBXkr2 Q==; X-CSE-ConnectionGUID: goq1lGkYRt6mBJYxQYZ3og== X-CSE-MsgGUID: JW25xVZVQOySYnAtpNzp3w== X-IronPort-AV: E=McAfee;i="6600,9927,11080"; a="30223669" X-IronPort-AV: E=Sophos;i="6.08,181,1712646000"; d="scan'208";a="30223669" Received: from fmviesa005.fm.intel.com ([10.60.135.145]) by orvoesa102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 May 2024 19:50:02 -0700 X-CSE-ConnectionGUID: nykeRg8EQn2qpuZylNo6ag== X-CSE-MsgGUID: 0Z3BoB3QTou2UjjDWOdSGg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,181,1712646000"; d="scan'208";a="37899177" Received: from orsmsx603.amr.corp.intel.com ([10.22.229.16]) by fmviesa005.fm.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 22 May 2024 19:50:01 -0700 Received: from orsmsx610.amr.corp.intel.com (10.22.229.23) by ORSMSX603.amr.corp.intel.com (10.22.229.16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Wed, 22 May 2024 19:50:01 -0700 Received: from orsmsx610.amr.corp.intel.com (10.22.229.23) by ORSMSX610.amr.corp.intel.com (10.22.229.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Wed, 22 May 2024 19:50:01 -0700 Received: from ORSEDG601.ED.cps.intel.com (10.7.248.6) by orsmsx610.amr.corp.intel.com (10.22.229.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39 via Frontend Transport; Wed, 22 May 2024 19:50:01 -0700 Received: from NAM11-BN8-obe.outbound.protection.outlook.com (104.47.58.168) by edgegateway.intel.com (134.134.137.102) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.39; Wed, 22 May 2024 19:50:00 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Il+zaDJsppcpWeBk9oAFl/ea2n297k3T4vWiyKl2l+8YcHtawRCMPjpkQDEBfYyJgpjStYo3dNO13rQ+xoKsNYf+ZvL80KttPAhJxV9vMJfLqJihbl1rbzcxAXkZMKgcLElIs5bDqYXfMOCI7FgxqVutExvELT5EV2pIW6Y13bjRZMAi3KhPtJ0TySPQRnie0nQE+sjSVd//kVXUpYBMavlysEF5TjPfJo1HrP8/btk2DirE64lfRgUiA/wQ4YbXqOrvAwFi/4I8BenuuazS1y/UChm/t/Nmo7eaCleScYdbDBibDfVdyZCZCpQ52iiyVf5WI63QJdQBBAXhNFXbyQ== 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=KqfIMg7aPxayUMQ+h6BHc6ptiNJyRyvFUusCvmRdOic=; b=PAyWJwSKCwJWMfAVRQQvGajGpLExeZ8tzA4FWVoUOPZ/xhsRabSy72E+4uSy2VUwXgFSnNZWO4v7OGq6v7L1KtO2fzdXGajgzrpuKTEs8MK7k0HaAne4Ply2O+y+dITI+779TrjumXkH8zAy5j3JJOEBMBIrwcuNEoVHKRSUnzBhK9nljblwcV3jSQ05ePX5nlW5593gI3ZSiZe12wTEn2iXdsggZfCKZ/e9H/I1ibX49uo7+ZQ1nJ3tNX9u2on3s1XnEOAyHsB35oaAe+wP5W/4gtqXWrx8SPe5KbtElUHFguxuhSckYSKmCO93Fctz4KaJVDg9MSIMhua1MdGSCw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; Received: from BL1PR11MB5978.namprd11.prod.outlook.com (2603:10b6:208:385::18) by CH3PR11MB8186.namprd11.prod.outlook.com (2603:10b6:610:15a::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7587.35; Thu, 23 May 2024 02:49:53 +0000 Received: from BL1PR11MB5978.namprd11.prod.outlook.com ([fe80::fdb:309:3df9:a06b]) by BL1PR11MB5978.namprd11.prod.outlook.com ([fe80::fdb:309:3df9:a06b%4]) with mapi id 15.20.7611.016; Thu, 23 May 2024 02:49:53 +0000 Message-ID: <1ca2c140-8ab5-46a6-a26e-6840d7ba051c@intel.com> Date: Thu, 23 May 2024 14:49:41 +1200 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v4 1/5] x86/kexec: do unconditional WBINVD for bare-metal in stop_this_cpu() From: "Huang, Kai" To: CC: , , , , , , , , , , , , , , , , References: <327899e13c4dbbfbe8ca95cab83ba229d17fb74b.1713439632.git.kai.huang@intel.com> Content-Language: en-US In-Reply-To: <327899e13c4dbbfbe8ca95cab83ba229d17fb74b.1713439632.git.kai.huang@intel.com> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: BYAPR07CA0062.namprd07.prod.outlook.com (2603:10b6:a03:60::39) To BL1PR11MB5978.namprd11.prod.outlook.com (2603:10b6:208:385::18) 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: BL1PR11MB5978:EE_|CH3PR11MB8186:EE_ X-MS-Office365-Filtering-Correlation-Id: 2483315e-a6f3-4cd9-9a0b-08dc7ad305eb X-LD-Processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230031|1800799015|376005|7416005|366007; X-Microsoft-Antispam-Message-Info: =?utf-8?B?d0JvMGU1c1R4NVM2VnlmQjd5ampxeDMrdWx5TlY1REFXMWNuMkdsMTZKRHFU?= =?utf-8?B?VFExUmpqTC9BUkRYM2tmQlpUbkNDci9ZeHBIZ1NYeERBOGxWL2lyYUxwWlA2?= =?utf-8?B?amJTS0JXWFBqRFNlQzBFWHMwWWJCay9NQUlhclg4czhZVldDZC9UdFlFa2FW?= =?utf-8?B?RnBack5GZWR1NW90dldxY1A2NVpxMWRZRW80RWNkRFppS3BhZzR6Z3BSSExI?= =?utf-8?B?T1BNc1k3UVBEWVZBcDlHdVRHdUl1c21kNGdnUUZKZm9WTVJp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1K1dsbC81aFR0Z0JKbkxRM0pST3JXRzhp?= =?utf-8?B?elIyR1l6OTNXQTVzT2IybnhRTmV4ZENCeklQZ1JreEFGVS9jblIvaDUxNitl?= =?utf-8?B?ZnNvOHpYMmc0RlRpdjR5SnJkTmdEZExFN01hUDREVlJzUWh6Z0F4cUJjdlpW?= =?utf-8?B?ZHpnMDl3M1pOWjhGTlVVWlVleGk4bGlpa1ZFU2FqSnRyMUxLbUg5Z2xEM1Ux?= =?utf-8?B?YUJ0UVcrYTJUdGhUb2tnNGFKa3lscjg0VUZMVmVWaGpJdWJ2ZkFQMlJ3OXp6?= =?utf-8?B?SkZtaERpdzVob1gvUFo5aVRNbTh2NmRGL2RLNy9QVDFPOURYblEvQkNkckU4?= =?utf-8?B?aE5uZk9pTmFvNzhhc252UDRKQnhXNmNiNXh4Tyt2NDM1cG5DWWZDdG1qcnpq?= =?utf-8?B?ZGVRdU82RDBPNGZLUERmZlJGeDhqdmZaUmlZQ2IyQkM1d1BkUk9FeU9tWjdp?= =?utf-8?B?QnVOQ1BXMklWK0xrSHRYRkFzaStpdCtud2RYUzd0TFZQeVEwaGtrK3JSQ3NH?= =?utf-8?B?bk5VZmNiRHZ6SFc0TXE0eElVWHF0TmxYd1lPVUlKMk8xK2I0NDRLQk5BPT0=?= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:BL1PR11MB5978.namprd11.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?cm13NTlleDN3QTJGRnFsbmN0NzlHT21reFhPVGhYTElrdktvNUVxMWtWdVlq?= =?utf-8?B?VnA3alUwaXJlVW1xRHd5eXZ6bnI0UWkwZzUyUitBYXk1SHRnQVJYRk15M3Jp?= =?utf-8?B?VmxJdVdj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tPYnBTRkFzZ1Y3a0xzU0w5RWNGL05I?= =?utf-8?B?QkgveGZML2xXQ1dKcU8wbk12OC82UFhDbTFhYS9kMDBzK0MvaElLOEJub2Jz?= =?utf-8?B?dzBKY2g2dUI2am1EcDdramRLUFZvTE45bnptTk1mNjQyRXpEVnRHd3ZPNDNV?= =?utf-8?B?LzV1NDhPS1RFalprcU5VS2xaUzZOTk5DOUZRcHNVY2p6bFN5eVBYVHhnb0dt?= =?utf-8?Q?g3j+y6SDfb9mIb004xHHDxsCa?= X-MS-Exchange-CrossTenant-Network-Message-Id: 2483315e-a6f3-4cd9-9a0b-08dc7ad305eb X-MS-Exchange-CrossTenant-AuthSource: BL1PR11MB5978.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 May 2024 02:49:53.6706 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: quK1eRjithx4SfGsWnlmMRRI7TSCJcmWg//eaHdWSKJxXA+K87KBWkqqFh3GWhUC6pliVKPZfwADxi9ndAosxA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH3PR11MB8186 X-OriginatorOrg: intel.com On 18/04/2024 11:48 pm, Kai Huang wrote: > TL;DR: > > Change to do unconditional WBINVD in stop_this_cpu() for bare metal > to cover kexec support for both AMD SME and Intel TDX, despite there > _was_ some issue preventing from doing so but now has it got fixed. > > Long version: > > Both AMD SME and Intel TDX can leave caches in an incoherent state due > to memory encryption, which can lead to silent memory corruption during > kexec. To address this issue, it is necessary to flush the caches > before jumping to the second kernel. > > Currently, the kernel only performs WBINVD in stop_this_cpu() when SME > is supported by hardware. To support TDX, instead of adding one more > vendor-specific check, it is proposed to perform unconditional WBINVD. > Kexec() is a slow path, and the additional WBINVD is acceptable for the > sake of simplicity and maintainability. > Hi Tom, May I ask how does SME work with kdump in crash_kexec(). Looking at the code, AFAICT the crash_kexec() path doesn't use stop_this_cpu() to stop all other cpus. Instead, kdump_nmi_shootdown_cpus() is called to send NMI to remote cpus and crash_nmi_callback() is invoked to stop them. But the crash_nmi_callback() doesn't invoke WBINVD for SME AFAICT. It does call the kdump_nmi_callback() callback where a WBINVD is performed for the SNP host: void kdump_sev_callback(void) { /* * Do wbinvd() on remote CPUs when SNP is enabled in order to * safely do SNP_SHUTDOWN on the local CPU. */ if (cc_platform_has(CC_ATTR_HOST_SEV_SNP)) wbinvd(); } So if I read correctly, what's the reason the WBINVD is skipped for SME in case of crash_kexec()?