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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2CF9BC61DA4 for ; Wed, 15 Feb 2023 01:53:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230182AbjBOBxv (ORCPT ); Tue, 14 Feb 2023 20:53:51 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40430 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229609AbjBOBx0 (ORCPT ); Tue, 14 Feb 2023 20:53:26 -0500 Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7D9E9BC for ; Tue, 14 Feb 2023 17:53:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1676426003; x=1707962003; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-id:content-transfer-encoding: mime-version; bh=YjzMRrr79cvWHhnzBj3/lDYHN5uz17MKB6Bd7+tQo6I=; b=ccVIvoMUNKKdghLHp1i23APOpRgcUTyrkt3h7s5Hse9F9VRq5DQfjQlF 4YROD+YOUCuR2FX50GsYx6jwu7lFN4HbU+W7hHv+YpMKH+yd7HlUfj+dl 1W6Eiou5LuGOSffjqhYQei0zN3vQZEy4RI0QjBOA9Rqp8Sm1k0fd5y7Lv v50cfVJMRjl8GFl6/uzj2pMQ4x2cCUB7BK/52VXR4rHDPD3jDjadDcy+l ZSDe+wF7QsFSjyysxMIXuCCDHfhWm4KzU9y/XTpIePUtCD/CQM+R1a4OK TVl4bP/K8yJH0dxsgfu40gGGeNYeGhrRs33KtOkr2n90uWIW843iRfRvf g==; X-IronPort-AV: E=McAfee;i="6500,9779,10621"; a="333457964" X-IronPort-AV: E=Sophos;i="5.97,298,1669104000"; d="scan'208";a="333457964" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Feb 2023 17:53:23 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10621"; a="733099146" X-IronPort-AV: E=Sophos;i="5.97,298,1669104000"; d="scan'208";a="733099146" Received: from fmsmsx601.amr.corp.intel.com ([10.18.126.81]) by fmsmga008.fm.intel.com with ESMTP; 14 Feb 2023 17:53:22 -0800 Received: from fmsmsx612.amr.corp.intel.com (10.18.126.92) by fmsmsx601.amr.corp.intel.com (10.18.126.81) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.16; Tue, 14 Feb 2023 17:53:22 -0800 Received: from fmsmsx611.amr.corp.intel.com (10.18.126.91) by fmsmsx612.amr.corp.intel.com (10.18.126.92) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.16; Tue, 14 Feb 2023 17:53:22 -0800 Received: from fmsedg601.ED.cps.intel.com (10.1.192.135) by fmsmsx611.amr.corp.intel.com (10.18.126.91) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.16 via Frontend Transport; Tue, 14 Feb 2023 17:53:22 -0800 Received: from NAM11-CO1-obe.outbound.protection.outlook.com (104.47.56.171) by edgegateway.intel.com (192.55.55.70) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.16; Tue, 14 Feb 2023 17:53:21 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=gxZZ8y9MYQqNSikNNQgDesPlEsLIRxqBixxiHse4OQBRtEa5iOzgDHowb/xSn+hti1Zrf3jUIH/dU+KEAKV6bUKBN7yfatYBSAXjKA7FtxEH46ZzGKy+E0K47ZaWjSmM2q3Q/p2KNdSDHg8NYhrT1HAlfG54QvWRWcRU9K1+8N11eAxBMkgwYiAfQwUNUb5GoVEAB1aTlUmmfv8Q2VJvF5IW+M0J97mvZJ58S/96K+ggZh2il/28D40BVB5GRA8RXYjYfONWzwDx4/gMdGyD0/ImdvcPXChCw9j80Kx3f4twSpiiMLy5+BESfvQP28iZX5FYjYQ+5JkgEWVE0idNFw== 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=YjzMRrr79cvWHhnzBj3/lDYHN5uz17MKB6Bd7+tQo6I=; b=HXbi0aHfZgfKowfQNaIX2zuINNAgwe1mf3uWVo9f3PnbX6CqJ5P9FiyMWkj8OgQx9aDyl8bvtyghMPqRVs1UdIqxlWoTAnoKvHT9K20ixh50HI+F17/oXesgrd1DCfhk9BawCv8iCvXSeAZ0317BOhhjxrgBD/uk4H0TUPLkzQZsYyi3+5j5t/KhcRhrcixt6ipIziywaQjHS9ij0E4WJ1j9uZrfN4noChatctZhXtnpxcu5hq9UIh9bNwjJJGOUMPDgoK4oFB0SNPzWIxNms11JDJVmcOvm2PxhE+FtADirHc3b2vjbY+Q852YtfSf999RD+XC2YB0QIrXqsH1MJA== 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 Received: from BL1PR11MB5978.namprd11.prod.outlook.com (2603:10b6:208:385::18) by DM6PR11MB4561.namprd11.prod.outlook.com (2603:10b6:5:2ae::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6086.24; Wed, 15 Feb 2023 01:53:19 +0000 Received: from BL1PR11MB5978.namprd11.prod.outlook.com ([fe80::3f19:b226:ebf1:b04a]) by BL1PR11MB5978.namprd11.prod.outlook.com ([fe80::3f19:b226:ebf1:b04a%7]) with mapi id 15.20.6086.026; Wed, 15 Feb 2023 01:53:19 +0000 From: "Huang, Kai" To: "kirill.shutemov@linux.intel.com" , "Hansen, Dave" , "bp@alien8.de" CC: "sathyanarayanan.kuppuswamy@linux.intel.com" , "tglx@linutronix.de" , "linux-coco@lists.linux.dev" , "kexec@lists.infradead.org" , "linux-kernel@vger.kernel.org" , "Yamahata, Isaku" , "x86@kernel.org" Subject: Re: [PATCH 2/2] x86/tdx: Convert shared memory back to private on kexec Thread-Topic: [PATCH 2/2] x86/tdx: Convert shared memory back to private on kexec Thread-Index: AQHZQAXD7tsyIloqhU2IdZsgp2Dap67PQH4A Date: Wed, 15 Feb 2023 01:53:19 +0000 Message-ID: <39b41f5b5852c5e9d23acb84a4ed4d9bf8a7c092.camel@intel.com> References: <20230213234836.3683-1-kirill.shutemov@linux.intel.com> <20230213234836.3683-3-kirill.shutemov@linux.intel.com> In-Reply-To: <20230213234836.3683-3-kirill.shutemov@linux.intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: user-agent: Evolution 3.46.3 (3.46.3-1.fc37) authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: BL1PR11MB5978:EE_|DM6PR11MB4561:EE_ x-ms-office365-filtering-correlation-id: 9a42e274-a81d-4da6-0795-08db0ef7697c 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; x-microsoft-antispam-message-info: VSGvgC4PrsHVO0rVjVCNrxXBGlFGLZK2pSc6mZhEZudcnjXI0rLRnwVUVnz48Vy1uGmarL9pVTH/CeRYyAanvqIgVAT3rBQvemyg6Lz9VqnsT4zsKnuCgNNcBYPcr7guzCXp0Ro7dK3X0eAhAHTjxGuKn3yWKZeJ0levR433ezRn/47zywGvFwEGd8MUEZDRMGzQlslKv/+Ogi0IKYa3IqBtcDIuXSMUwEJbR+Aj4GnDoaBVjELZxELKEQBF9jG4w2lHTLdbuUG8E6BMGCcbsU5tQn4LCHvyWCuN981AURT2QCpC//k/qVoIvAydWhorjQQFHMi8P0AY04BX+vFlbxncnPVeWTNIE93zB/SpvObqIgddPOzWfLCrGcjo3XocYJeqPzQaXjH/QCl9WVn7+8YbpuDQp59gygPrDxnt6PTCWuipup++5UMRj7CA/xJ//11NsELdhq2VVfOKxlcYuGIsctqz6mWZy/UFSCsN4WtWDQ4kqXWhgSpUsxv772Gq8OMmnarbXpL6hMw4TmL2zVySE6DAo2aS5AIO5F+hydqaOOBOfrEh6SJRQln+ziH36ezZL5ApTwJiWUrtZf8MX2xAW1aXjAcRKZfFxJeKoHm7gNywl2fuZur0zd+/r+U5NqWQMomTuojkiQB6UKA98qm3lteIUuYWKOdTG+C4ufebQKisz7R4AfIMMl3PkUGP0MxB4ENzHLNsLBUBMMRTFA== 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:(13230025)(136003)(366004)(376002)(39860400002)(346002)(396003)(451199018)(82960400001)(91956017)(66946007)(38100700002)(76116006)(5660300002)(66476007)(4326008)(2616005)(6486002)(38070700005)(41300700001)(36756003)(71200400001)(66556008)(8936002)(8676002)(64756008)(478600001)(2906002)(110136005)(54906003)(66446008)(316002)(83380400001)(26005)(186003)(86362001)(6512007)(122000001)(6506007);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?utf-8?B?ZDNYMHNUZHlJOWdNekE1Wk9M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?B?dkZZTjJuVDM5MHlGWTA5Z0JiL0xZMjJGbGF4NlIxSXBsNVpiN25jYVJMVWsv?= =?utf-8?B?WlA2ZC81Ynd3WTZBd05FcEVBeXVPTFZwcWQ1bXR1Z0RmdXNUWFBzczFuODJp?= =?utf-8?B?TWFZZmRTRU81ZmVEeGY2TC9IQStWT2hJbDVReWxVS09PSjhtSURWdEdvS1E2?= =?utf-8?B?dXlsdGwxMXJGNVV0QXNITUpVRkk4aW9mQ29KckRnQ1Ezbk5Wai9KUmRKWU9R?= =?utf-8?B?MXhXQzRNdHArKytPdVhRUnE1UjNWVjZXWmpFbi9RWHJQc1NoKzZBRzU3ZVdV?= =?utf-8?B?dUthWE5YY2hsSTNRTmRkdFlvOTQ1dmZvZ3d0eEI2TGxLSTlZSzUxS1djTVhO?= =?utf-8?B?T1E9PQ==?= Content-Type: text/plain; charset="utf-8" Content-ID: <84C0A106BEDF754AB6C2B2D0730CF993@namprd11.prod.outlook.com> Content-Transfer-Encoding: base64 MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: BL1PR11MB5978.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 9a42e274-a81d-4da6-0795-08db0ef7697c X-MS-Exchange-CrossTenant-originalarrivaltime: 15 Feb 2023 01:53:19.2035 (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: qT4NH8sUdf2GlhIIg3uxMI87Zbk1HWYA+gSDatyK5FtZiQKnIFeE42DfkBJiN1ymwVweSoNAEIuYdhA6IeEh8g== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR11MB4561 X-OriginatorOrg: intel.com Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org DQo+ICt2b2lkIHRkeF9rZX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