Received: by 2002:a05:7412:da14:b0:e2:908c:2ebd with SMTP id fe20csp1899581rdb; Mon, 9 Oct 2023 06:35:32 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFdXkdL+zHMh1Vj8ecj5gFC98mPeBrOWgUYYztv2MdJ3SIxOEQsnthVxviffb8p7eayZ34Z X-Received: by 2002:a17:903:2308:b0:1bc:3908:14d with SMTP id d8-20020a170903230800b001bc3908014dmr19191321plh.2.1696858532205; Mon, 09 Oct 2023 06:35:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696858532; cv=none; d=google.com; s=arc-20160816; b=s+m3zWbCtD+HOwvd6lHBoLiqH7V078dImmDmvqjt72AM020rSGlNh/4H4PT+RNBKia uiZABtL+rcjYg9aleGaCaSklhf5VxVqxeD0n+lf49ksjIAWnT3EdMNHdX7D+PWsdmEzm I9iDGcEBwTpG5E3cZkgf49aLc1AaB7b5iNrn5rIRlfqoaM13afMaSqrjIPqLyiNfsR6k 2ZCQKworeTUzAn01BAzAKNu97QC3dKNdhJVag7B0De+66VNTfiHNQb78ucrGNYmwnpGs Iw93V/5c+go+QV7ppCkWrdJgnjjzPnLQJNLIvCA2pudBu+ZffSikzngHlbn3dgjRS+QG b58w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=eNWtwoSsvgAZ15Zm2MXe9JPfZ4CDfKOuioSnE7VL770=; fh=Wj9+p36r7zx82WCRUFQeEck5Cay/tY7jxS/3C72tb4Q=; b=aRMKWFAkQCRU3Oxmmi7LDKsoFjzdXdaXVUO4IyAQ4ivn5UizCtoWfDhmpFuAvLuQ8p WiVDYJP6TAq5GuGbpCxZ+2gIPIno0HuJSkt2VDUayMLE3X3dumiLCqG/UNtE44PzSfC/ EYyr63Dp9TF/WUnRjaK/+vdbnx/yuiDvo6tbwVHJmipCCOnX1/ZtJFoeL+jqkDfTBHOL t08tKlZJZprBrHQHW1aJoqN2jCj4z8cT3oupYsgmu/S7MZ/iWB1hSI10t4SXn8y6VG+R TcpmLBQCtoVUbRfYJUxBFr/E3y7tROa4Vk1fGI94DOmTYA1rqz+dqW5vSRm4MOhCAkov lLNg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=RwcbvQX4; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from fry.vger.email (fry.vger.email. [23.128.96.38]) by mx.google.com with ESMTPS id i15-20020a170902c94f00b001c72dbaf7b9si7925751pla.415.2023.10.09.06.35.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 Oct 2023 06:35:32 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) client-ip=23.128.96.38; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=RwcbvQX4; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by fry.vger.email (Postfix) with ESMTP id 6F7EC801B1BF; Mon, 9 Oct 2023 06:35:29 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1377163AbjJINfS (ORCPT + 99 others); Mon, 9 Oct 2023 09:35:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52726 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1377169AbjJINfQ (ORCPT ); Mon, 9 Oct 2023 09:35:16 -0400 Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.31]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5D1F599 for ; Mon, 9 Oct 2023 06:35:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1696858515; x=1728394515; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=a8KWFLu3eVLALOO0s2Gfw3D3r4t41MgJmAmOQhK1GqY=; b=RwcbvQX4vTxV2SjYxjaf1K0WLu5sdFnpBIlX9CZKO27ZTULr68Ku1gnB iWC8xj9LCPKk0fb9Yj2xNkpfMGEaloWdSQHu2GVRKHU1EIm/1++7te0xS raINBpBiD3oUFQ1XYGW/Zp2RhaXG6yDimMXi5D72O6RrVUVzWIez4pT+i G8XClAWM9IH4fivWPvAAo8hFE1ZRMxHldeY+qO+AiWmYete7o27QeR5f7 HjVWxWDfT8utAkZHI4rWhi6CTOi5nz1M89TZV33bxlB0EK7I9Da+5qu54 DLXwKuyb53AruBjenTb83AMoym1ttgZWABcQCzm/mSfqT09ZwvHakvgcR Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10858"; a="448332827" X-IronPort-AV: E=Sophos;i="6.03,210,1694761200"; d="scan'208";a="448332827" Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Oct 2023 06:35:10 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10858"; a="1000209164" X-IronPort-AV: E=Sophos;i="6.03,210,1694761200"; d="scan'208";a="1000209164" Received: from ahuge-mobl.ger.corp.intel.com (HELO box.shutemov.name) ([10.252.40.233]) by fmsmga006-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Oct 2023 06:35:03 -0700 Received: by box.shutemov.name (Postfix, from userid 1000) id 6EDC110A196; Mon, 9 Oct 2023 16:35:00 +0300 (+03) Date: Mon, 9 Oct 2023 16:35:00 +0300 From: "Kirill A. Shutemov" To: Baoquan He Cc: Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , x86@kernel.org, "Rafael J. Wysocki" , Peter Zijlstra , Adrian Hunter , Kuppuswamy Sathyanarayanan , Elena Reshetova , Jun Nakajima , Rick Edgecombe , Tom Lendacky , kexec@lists.infradead.org, linux-coco@lists.linux.dev, linux-kernel@vger.kernel.org Subject: Re: [PATCH 10/13] x86/tdx: Convert shared memory back to private on kexec Message-ID: <20231009133500.su4ylwpbnaiyln4d@box.shutemov.name> References: <20231005131402.14611-1-kirill.shutemov@linux.intel.com> <20231005131402.14611-11-kirill.shutemov@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=2.8 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, RCVD_IN_SBL_CSS,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on fry.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (fry.vger.email [0.0.0.0]); Mon, 09 Oct 2023 06:35:29 -0700 (PDT) X-Spam-Level: ** On Sun, Oct 08, 2023 at 04:35:27PM +0800, Baoquan He wrote: > On 10/05/23 at 04:13pm, Kirill A. Shutemov wrote: > > TDX guests allocate shared buffers to perform I/O. It is done by > > allocating pages normally from the buddy allocator and converting them > > to shared with set_memory_decrypted(). > > > > The target kernel has no idea what memory is converted this way. It only > ~~~~~~~~~~~~~ > > sees E820_TYPE_RAM. > > I finally realized it means the 2nd kernel of kexec rebooting. Maybe we > can call it 2nd kernel always, it works for both kexec and kdump > jumping. Okay. Will fix. I am new to kexec and I don't know proper terminology :) -- Kiryl Shutsemau / Kirill A. Shutemov