Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp19939831rwd; Wed, 28 Jun 2023 17:09:26 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7EoSR21yW5EVvMS1g1iKObtbou1NavesQdU1U7kVPvVRsAu/ZkitVMEAkj6EfUtVpt5Uw1 X-Received: by 2002:a17:902:a403:b0:1b2:46ab:a9e1 with SMTP id p3-20020a170902a40300b001b246aba9e1mr8463061plq.28.1687997366347; Wed, 28 Jun 2023 17:09:26 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1687997366; cv=pass; d=google.com; s=arc-20160816; b=myxkJrS51DbgX8Sr+E/61MaaRoI+L7oxQDjrW+5FqmrxP7QNa506JPEoDJ2N1SVPiP JNNl47BWwLCs3OUfn/zitIHhHrVTrOyB+t+GAs0CwEsXqqaRNX4+zwA7tBTIoqCL8pzn tKpqk/HeItVM5znaSx8K9JKRh1ZRO7FNvxDdyRMP6mfluj4EfhelSi4hcD2eN8fV7DBD EElYsGCzegTU6tHiDdrzSh/a0MP7ET1URa+wYYs1WUSzmWFES0q7PecQyywEAX0noD6T ilVmDhFIMoWIHv7DNvW/GvAQsiGALoHCBZ3yKhzWP5v3SXp5Uz6ZmGVAR8grlBB1s7Hq EMiA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :content-id:user-agent:content-language:accept-language:in-reply-to :references:message-id:date:thread-index:thread-topic:subject:cc:to :from:dkim-signature; bh=ZyoBup75/wc1NZ97AWpyIMWLik0sOJasT/e4lhsosnY=; fh=dNN5n/7ZmJ5fkVFnMJtPA19/+0NpmpVoUeokYKVv8ss=; b=nmQ1bvLs0afKghrJ4GRUNFi3FbgO2zz8v6FWO+YzrX4K3RSKCFJCFJybAPWZWZVR5M ivBFZWdVV7nSRhmE/VWGE0JnYtY6wuYoTlv+FRpFVFGEzMcO4etaX3pwYDect00aeZXk STLu0AdqzNAxILHYpjGKzq5KnMwOjH4naz6pE2xt0O9AtaTnLCENCXT9o5d2BIVaUdBE 7WOATWKLJQo7JnL+wK2QcO5mT612psqYAHuXvYF4svZZp9LK4qBnXlAeH+Mw7T3kVXfo S08/S8K6Gm9MoHc8PwwgfyHIEc/fn21n75FfgVwh2sIHjNob1aZBlaOHZMPuRuSBEuCW oT2w== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=Qx7XO2CT; arc=pass (i=1 spf=pass spfdomain=intel.com dkim=pass dkdomain=intel.com dmarc=pass fromdomain=intel.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id w21-20020a170902d71500b001b0044f186fsi8962611ply.41.2023.06.28.17.09.14; Wed, 28 Jun 2023 17:09:26 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=Qx7XO2CT; arc=pass (i=1 spf=pass spfdomain=intel.com dkim=pass dkdomain=intel.com dmarc=pass fromdomain=intel.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232017AbjF2AIm (ORCPT + 99 others); Wed, 28 Jun 2023 20:08:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52390 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231919AbjF2AIh (ORCPT ); Wed, 28 Jun 2023 20:08:37 -0400 Received: from mga06.intel.com (mga06b.intel.com [134.134.136.31]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2FE2210CC; Wed, 28 Jun 2023 17:08:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1687997316; x=1719533316; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-id:content-transfer-encoding: mime-version; bh=ZyoBup75/wc1NZ97AWpyIMWLik0sOJasT/e4lhsosnY=; b=Qx7XO2CTPKfmNfCxcKDoIMVh3NP8/MWW2VqdDK9nXGkJifmePrtiDHoc NWfpL7jxP+J4lp/4Jyf3aGiZUOnX8wXF+LSXNBYAcumVYYR1KGt+M+gD+ 9em3rfTDmSUCl3X8ziIAhcMHujPWV1CrqVLvvsPSjRU9eCnO/O0QVZRgQ feAC2cfElh89qHMwcFu6OgPP292QEibrpuZHVVWoWIH5HKcTv9O6faVy7 Ag9K7ao5EdhHxq8CLifeV303JdOfW1jJn3dI8WamfUn9r0ghekuB8t45b o36KUAHV8cndQsgF7bmHSJxVGKNrSC3R4nsurxewFIg0ZK2EYMOZWmiEJ A==; X-IronPort-AV: E=McAfee;i="6600,9927,10755"; a="425661162" X-IronPort-AV: E=Sophos;i="6.01,166,1684825200"; d="scan'208";a="425661162" Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Jun 2023 17:08:35 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10755"; a="717166298" X-IronPort-AV: E=Sophos;i="6.01,166,1684825200"; d="scan'208";a="717166298" Received: from fmsmsx601.amr.corp.intel.com ([10.18.126.81]) by orsmga002.jf.intel.com with ESMTP; 28 Jun 2023 17:08:34 -0700 Received: from fmsmsx610.amr.corp.intel.com (10.18.126.90) 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.27; Wed, 28 Jun 2023 17:08:34 -0700 Received: from FMSEDG603.ED.cps.intel.com (10.1.192.133) by fmsmsx610.amr.corp.intel.com (10.18.126.90) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.27 via Frontend Transport; Wed, 28 Jun 2023 17:08:34 -0700 Received: from NAM10-BN7-obe.outbound.protection.outlook.com (104.47.70.108) by edgegateway.intel.com (192.55.55.68) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.27; Wed, 28 Jun 2023 17:08:33 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Z1zj3vHBnbWcm0akx8EnJLacs8FYtMJE1eo/bvfBF8wqYUVyOW3REWNmTgwq3HPUiYMqBxIYnBPLiYf7GCRkjK+JA8w0l9x2a3in6Qxskxim1AXqX7Y/+FGZ4q58J3b/oKq+gNjTjuuvkZ+XzwkKKNe3q3v66JzSXUNrFC/qZeisyclRuRDM1+POwy4tl/rznYVKSwnyX9TVwG68nd1heEoHB+FfUzzFp77+xzcx78eQF6elQ4BWPIm7tn/ERXR01qWFkfTV9m/l6lEinf7wiPilwzldblhwkD9xWCBV37zij6TXHP5rOZ2xEl5eF5OPP/+KvhmK62S6JjKgP78v5w== 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=ZyoBup75/wc1NZ97AWpyIMWLik0sOJasT/e4lhsosnY=; b=V6NSKdjyjRB91el4bC4qTQ5E28rOA6d1RK7Ywmc8nm//kE4C+ROU3cB3fn3+RjanBt3Xle0Z8N0ICvvie8coketsb5rx0RyMDZon3AjqPIRrVtlp/2lEP+fn/DnyZj7/ENR7aOjv5CiDGM/Q7F23k4/2e8I3HDT6nVLpZ0ac0VNOcjK+RwSSxF7lcOQZYddfL65H2x4ILTOgB0n5CLOFJAIMkndGtHNZ7JG6wIy8xh3pFfGmBL1pvoAcjC1+CsImloGLmvOYMVnGkoW6Fn45KQdNSYT+QMusYnP+yH+JdYH14fweKkjH7vrp0JHrnPiSLvQMfllsHc1vLFi9bPHuCQ== 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 PH7PR11MB8250.namprd11.prod.outlook.com (2603:10b6:510:1a8::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6521.26; Thu, 29 Jun 2023 00:08:29 +0000 Received: from BL1PR11MB5978.namprd11.prod.outlook.com ([fe80::19b7:466f:32ac:b764]) by BL1PR11MB5978.namprd11.prod.outlook.com ([fe80::19b7:466f:32ac:b764%3]) with mapi id 15.20.6521.026; Thu, 29 Jun 2023 00:08:29 +0000 From: "Huang, Kai" To: "peterz@infradead.org" CC: "kvm@vger.kernel.org" , "Raj, Ashok" , "Hansen, Dave" , "david@redhat.com" , "bagasdotme@gmail.com" , "Luck, Tony" , "ak@linux.intel.com" , "Wysocki, Rafael J" , "linux-kernel@vger.kernel.org" , "Christopherson,, Sean" , "mingo@redhat.com" , "pbonzini@redhat.com" , "linux-mm@kvack.org" , "tglx@linutronix.de" , "kirill.shutemov@linux.intel.com" , "Chatre, Reinette" , "Yamahata, Isaku" , "nik.borisov@suse.com" , "hpa@zytor.com" , "Shahar, Sagi" , "imammedo@redhat.com" , "bp@alien8.de" , "Gao, Chao" , "Brown, Len" , "sathyanarayanan.kuppuswamy@linux.intel.com" , "Huang, Ying" , "Williams, Dan J" , "x86@kernel.org" Subject: Re: [PATCH v12 07/22] x86/virt/tdx: Add skeleton to enable TDX on demand Thread-Topic: [PATCH v12 07/22] x86/virt/tdx: Add skeleton to enable TDX on demand Thread-Index: AQHZqDWtW8hO2PRC3kCMr0lha9GzWK+gMs8AgAC4a4A= Date: Thu, 29 Jun 2023 00:08:29 +0000 Message-ID: References: <104d324cd68b12e14722ee5d85a660cccccd8892.1687784645.git.kai.huang@intel.com> <20230628130822.GD2438817@hirez.programming.kicks-ass.net> In-Reply-To: <20230628130822.GD2438817@hirez.programming.kicks-ass.net> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: user-agent: Evolution 3.48.2 (3.48.2-1.fc38) 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_|PH7PR11MB8250:EE_ x-ms-office365-filtering-correlation-id: 7cbebbff-da24-4ea2-cfd0-08db7834f7f8 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: 8Harg35XoadW/kweEshokEQVxcig8U9qDdF/YZEeUDUEllWT9/I7sPFRul30QG5HG0RhsG56KAVKXu4MgvhOPmYWnN5XAJUzSvAGiHDHaREKDIzgfk5S3vm4HBXDz2qwMsk2Jdcy0jRZ1lNRbXA0oqIF9F1+eZhJMdch0kLUQat9d6wtS/tNOh/ZsJGOUpGGiUVhHwhxCnSsw2Fo1drC2SzQNUrp8CqqJJPspbjGxtX66wuuu7Vgt/iervFRTpHLdUkZCBW//g4cVxPKjw/fGQ4A86w5G5qeHWIGtljkac+oVik1cSg2jeBPQABlEl5zrAKCK+P4pSIC9bQI78XDJI3BD/EOmirY+aeXCuizSbNKI8K3vscQLAgD45UeS8xy9VedgW0zE0HndiGyCBH55MWEFWiSKphNCOYaIo9Nk1nwMLUioT/qWR2ozSH7wLPmSeM2pPyEWh5ZBZ0BxC7JGixyOqIFf8V2bdX3vA5bTdes6OawhlPdSCsUzVZZkW1rVnih08N7dqy4ioUUiJwBFuKbuHcR4BhDiBP4a2CMUVXxCIMtDBb6Y4BJ6SfhS5cXUgN8PkPJM176kyTGkTQ2UWlhU72NdV84wX+PuajnaszXL0nS/8y1HiFjFpw39/42 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:(13230028)(39860400002)(136003)(376002)(396003)(346002)(366004)(451199021)(83380400001)(8936002)(6486002)(316002)(71200400001)(8676002)(54906003)(4326008)(41300700001)(36756003)(122000001)(86362001)(82960400001)(38100700002)(64756008)(2616005)(7416002)(6512007)(5660300002)(66556008)(66446008)(66946007)(66476007)(478600001)(6916009)(2906002)(91956017)(186003)(26005)(76116006)(38070700005)(6506007);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?utf-8?B?QjErZHNBK3grdDd5V0NEYVczUWViY2VOanlnTi83bEZnMHN2eDc5SHRyb3Rz?= =?utf-8?B?czRGSUw0KzFlT1ZYMG9YVHVCbVFuVUdQRCt1UENQTkVMRUxwWWs5cmFod1hr?= =?utf-8?B?Q3ZxYzA5TWhadWlGYktZN01NZjdKS3RtU3VlUWhzYWhDVjRaaW8xWmV0WE9a?= =?utf-8?B?enNTRWU0S0hOOHlqb04xZkNlTjVkcEdsTXNSNTJ5TERjTVBnWWNTRzU5V2l1?= =?utf-8?B?VEUxU0g5all5Z3hsbENjMndBOGxXMnBPdUZPQyt3UDBiUUFVaTVxbE1sSXZY?= =?utf-8?B?N25DckxqcnlEV1E4czNkd09TcElJMEhlemFtVWdETlpENENmazhh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1WY1FmN0dEY3Zv?= =?utf-8?B?Z0E9PQ==?= Content-Type: text/plain; charset="utf-8" Content-ID: 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: 7cbebbff-da24-4ea2-cfd0-08db7834f7f8 X-MS-Exchange-CrossTenant-originalarrivaltime: 29 Jun 2023 00:08:29.6621 (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: kACK5t7lu3COcwodqbK5RFQb+9JiHxwPCNRs1KA+h+Zp90p7Xw4qptj1mqJDtHSM0wvIh1c2EzOXoaZpLUf9wA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH7PR11MB8250 X-OriginatorOrg: intel.com X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org T24gV2VkLCAyMDIzLTA2LTI4IGF0IDE1OjA4ICswMjAwLCBQZXRlciBaaWpsc3RyYSB3cm90ZToN Cj4gT24gVHVlLCBKdW4gMjcsIDIwMjMgYXQgMDI6MTI6MzdBTSArMTIwMCwgS2FpIEh1YW5nIHdy b3RlOg0KPiANCj4gPiArLyoNCj4gPiArICogRG8gdGhlIG1vZHVsZSBnbG9iYWwgaW5pdGlhbGl6 YX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