Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp8763677rwb; Thu, 24 Nov 2022 04:06:16 -0800 (PST) X-Google-Smtp-Source: AA0mqf5BHvplFXG2qXlaN6K7jGxO66s7xWWMoCIiXqgJP5Kdc1uHqWWGK/N6NZ6GxF1Mnp2ffQ/l X-Received: by 2002:a17:906:b04:b0:7ad:e1d6:280b with SMTP id u4-20020a1709060b0400b007ade1d6280bmr26985511ejg.512.1669291565942; Thu, 24 Nov 2022 04:06:05 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1669291565; cv=pass; d=google.com; s=arc-20160816; b=snUatiassX2Qn4z9fV4N2Is3GmxSOllnbdZRhAos+/PKXuRIDPZP4ELDRDR49qjCaf hvJ0HzMv3Kb3/vMSdrmV3KtfqEJksHaC/xhHywkhq8EvfYs+dE8TBPACSU/NMzOeMEXc 2h1WXFCVkrEGe89DMmhVwoCQadd5AZDAtUmvP2I7flHxz8BwQ2AqArp4UA9k/Dr6iBPo c+eiM3c2c4uQVFWuhyewI07FB0pdgEN1TWa3B59C/f1lKrqOdBzXHryX7Qbw9QhaAG47 G16G7rxcBenGCFbscwvRdqBRJkKHXNwuJNy26Y2LJkcEaMy9wOg73Gv40CyMjo/R6b4O hR+A== 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=9CQBWZORcCWerU30XLWc6j/RDISvwfeJxuXGechJBWs=; b=aChh191oBM+bvHl1t2Dm/2f/3fg+7bv2vrvw/VKXlfoUntTd3OsC3yibF7cGucNQ17 +6BZJL/WGnsunEuP67BabayEvojYre7Ljlwli7upFBjhwESOcHqYG2KnMkw5uU0SBHbv WwZAHW2RvtWkSmuzNCbBYUGOo0WRkfUI59bY1sTmIvHfT267BuDDQuYo3DncLgJUf/hb HXHzUaMDUAkEgndXSNcn1xW0zrGZxD2GakGYi5kstwr0SKuzCBG9de3nj2zjAsFrFJoF 3IXnQtYhdUCpx4t9qlQ4qKfX8+zwp7tTQ/1lzUDwsO413s4aBqSpXcf+I1Y3zfEsfFBc loNA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=T8CihzT0; 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 j11-20020aa7c40b000000b0046453c39abdsi783820edq.104.2022.11.24.04.05.44; Thu, 24 Nov 2022 04:06:05 -0800 (PST) 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=T8CihzT0; 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 S230108AbiKXL3q (ORCPT + 86 others); Thu, 24 Nov 2022 06:29:46 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35398 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229770AbiKXL3o (ORCPT ); Thu, 24 Nov 2022 06:29:44 -0500 Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 71714BF52; Thu, 24 Nov 2022 03:29:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1669289383; x=1700825383; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-id:content-transfer-encoding: mime-version; bh=9CQBWZORcCWerU30XLWc6j/RDISvwfeJxuXGechJBWs=; b=T8CihzT0zUaSTCFHkamAqLxNXr9ZY071Jdir2V0pm075G9TdKd4+njzM rcJPEo3snJ4XuC6ONifVLjd7+MfonNVPqIG59VCt8NWpbZn8yL3dSkN9I lw80ajKInL+9szSTJgRkvnDfYn1Rz/JARxkpL3ofPekZn+r80k6tb9YJA arZ+r/A3JPjX3yficHGJ7JLWkhYwNJLa5ZRavavEzui7XncrLlDzVz8Xy byPUcL8BvmgduMJYqqzee5FPVwsX8tTzlpFBBXfeziG8n9Kr2H8ztseW/ 3jT2nVCqmKGV231QGiRynZTMx6RTIEPUvfXomRlLYBxxos74rlSvvuPtu A==; X-IronPort-AV: E=McAfee;i="6500,9779,10540"; a="301844295" X-IronPort-AV: E=Sophos;i="5.96,190,1665471600"; d="scan'208";a="301844295" Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Nov 2022 03:29:42 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10540"; a="887341976" X-IronPort-AV: E=Sophos;i="5.96,190,1665471600"; d="scan'208";a="887341976" Received: from orsmsx601.amr.corp.intel.com ([10.22.229.14]) by fmsmga006.fm.intel.com with ESMTP; 24 Nov 2022 03:29:42 -0800 Received: from orsmsx610.amr.corp.intel.com (10.22.229.23) by ORSMSX601.amr.corp.intel.com (10.22.229.14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Thu, 24 Nov 2022 03:29:41 -0800 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.2375.31; Thu, 24 Nov 2022 03:29:41 -0800 Received: from ORSEDG602.ED.cps.intel.com (10.7.248.7) 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.2375.31 via Frontend Transport; Thu, 24 Nov 2022 03:29:41 -0800 Received: from NAM11-CO1-obe.outbound.protection.outlook.com (104.47.56.171) by edgegateway.intel.com (134.134.137.103) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2375.31; Thu, 24 Nov 2022 03:29:41 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=DI+tN+UweaOTbq9yfU6gtt2lXihBUVVBcyjZ6rL8HrQMgVhAuCZGR/aZJQttW2BBZd0/oQvR8LSS1aypuih2aKIgUoizWq13NMAto0l9YBwSD7S5lYJKa7JYKOHB16oLvxdfZjGNVd5iN12a/VIqZLIbXX8IMh0ryUlbS6bC6trxLyYYNIxdXbzFZObwgwH+ooipe7qteMmQxIHEVfmbYPsG8tVMY4I1VTUuoHPe1cL5uOpo/gm87k42mqJg5BeZ8QlOaTDYoVHzmjDyhTgNuymp8N0+TZotDxaBr13KngcJcnzt7U5fARuOVmnFg/76XjpX+RfJbj/dsIGS/o/x/g== 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=9CQBWZORcCWerU30XLWc6j/RDISvwfeJxuXGechJBWs=; b=NbtsH4ao2UHFytiBn78PdyvwcBUKkxK5xonfgJBBEnD02sSX/YJpxx6NH2aJB6MkKlb5qGZmJBp1hvfjgSOsbdEALBCNLzFtCHDO2qNaAhKwLHvi2std80hrXckO+5EALKaUd/cfWKF8flr9pPMuba8gI2gSGk6QJxeqPE86ASQtB2HgtESC6gQHkH56ajfLiUDmymB+zc001zdmky7LODcvTEE4Lk1w8rNB9bySot47KfuM1F9bsVW+vK0ccU2aRiSGACsnlBCdczZfI6OfCP9yWjeIQfb0nyOid7Bb1PXQ4IVg/VzgZEfBEeJts/bljKRYaU5UWtLDmOVVFlC7Hw== 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 SJ1PR11MB6107.namprd11.prod.outlook.com (2603:10b6:a03:48a::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5834.9; Thu, 24 Nov 2022 11:29:36 +0000 Received: from BL1PR11MB5978.namprd11.prod.outlook.com ([fe80::2fb7:be18:a20d:9b6e]) by BL1PR11MB5978.namprd11.prod.outlook.com ([fe80::2fb7:be18:a20d:9b6e%8]) with mapi id 15.20.5834.015; Thu, 24 Nov 2022 11:29:36 +0000 From: "Huang, Kai" To: "kvm@vger.kernel.org" , "Hansen, Dave" , "linux-kernel@vger.kernel.org" CC: "Luck, Tony" , "bagasdotme@gmail.com" , "ak@linux.intel.com" , "Wysocki, Rafael J" , "kirill.shutemov@linux.intel.com" , "Christopherson,, Sean" , "Chatre, Reinette" , "pbonzini@redhat.com" , "linux-mm@kvack.org" , "Yamahata, Isaku" , "peterz@infradead.org" , "Shahar, Sagi" , "imammedo@redhat.com" , "Gao, Chao" , "Brown, Len" , "sathyanarayanan.kuppuswamy@linux.intel.com" , "Huang, Ying" , "Williams, Dan J" Subject: Re: [PATCH v7 12/20] x86/virt/tdx: Create TDMRs to cover all TDX memory regions Thread-Topic: [PATCH v7 12/20] x86/virt/tdx: Create TDMRs to cover all TDX memory regions Thread-Index: AQHY/T3Ol00T/K+q7EGCwmf+srRgpa5NHxeAgADWewA= Date: Thu, 24 Nov 2022 11:29:35 +0000 Message-ID: References: <4db59b4a87f0309c29e61a79892b9fa6645754a8.1668988357.git.kai.huang@intel.com> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: user-agent: Evolution 3.44.4 (3.44.4-2.fc36) 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_|SJ1PR11MB6107:EE_ x-ms-office365-filtering-correlation-id: a0a19896-1335-4fdf-c562-08dace0f2a85 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: rDdpXig6fdh/6wZt5WdrI5ANgCViDYy8/48Xc8FvYdSGe7wx99hS7ZXl44LaHZS7kzpWHBQiLIPurKlsE1POUJWkjNLo+GNojvJUdhKLMDsT3PzIfybReOsHK9JEjKRf7TT+sm9hySQIClx7cbM87Qiovc5JbK8cHsnJlDHJONszzze3bqzsEFOTQnvNZMZq0FlvjjN3khxef7SVTA4Vufl29vZR4aoxuVG203gszYfqAYWg0lVSCQXwzvJq/+ZkNVoyUO3LNybBjVTygodhq9lRQRkyQ8cNEMlUA7kzTFZREVY8kAe6Mq6mt/E55z46d/kjKtVzZKt7b3MPBx/rTNkp3rShT9pnQ2Ketxtq+TPBwEBRiqY93JfEykUx98M4iD/AN4f9T0MoBF/cNa5iBliuP5fCef/e+7RqQh7IodoB3+qgOnCXvyThbP08fvQ7L0cVsCZD3WboL05OBqi5qZ8Y4KSNI2/pqJvMbOzEvwlo1QP8s2r+nrlMvIS+dK9HTSDAAGil6PGaYysa4ZyItro5psKnx9lm7EZXDqXM/hMImr/nlnZ8B/wVGwBTvtb364vPx8+qoCcEoXQxg/Ee3wFiOf1vNbH9ZUrjwBCCMzQD0WvkdbiGTFx9YZEMV3VVB3p4ed9YjC8ZunRJBb4Df11+LZ70/M4MJyO88BduvqfEzlE55H/awtZJUgN58jTxfaOL7Glew7WCjy/VwY5SOA== 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:(13230022)(376002)(366004)(136003)(396003)(39860400002)(346002)(451199015)(64756008)(122000001)(83380400001)(66476007)(82960400001)(86362001)(76116006)(6512007)(38100700002)(316002)(66556008)(26005)(66446008)(7416002)(2906002)(36756003)(2616005)(186003)(41300700001)(5660300002)(4326008)(91956017)(8936002)(71200400001)(38070700005)(66946007)(8676002)(478600001)(6506007)(6486002)(110136005)(54906003);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?utf-8?B?WDB5VUNyQzhzV1E4TndVaHBWOTlHQW5tald1L09CanUyZXp1NGp4V3Bjdldq?= =?utf-8?B?RnphRDdPQnd6YUxGTVJYcTR5OGZ1ZTdhZ2tDQklmdEZQdC8rOFdBZ05JTEpi?= =?utf-8?B?eVV2ekYxazN6aDQ0cm1FVnlOWWc1L1lCaFNzRVBDaUpvbnAwNDlNNy9USFRV?= =?utf-8?B?dCtHd0FZZldNaHgyQXJXSnl1blpVcnhJVGhzYmpGZk5Yd1REbVQ1dlRvMFg0?= =?utf-8?B?U01STGQ3ME8xL0hjUk5mSWNGZkdtditxWkM2OTFHZEpyQ0hLWXhpNG5IOERV?= =?utf-8?B?dnE2SjBvR21NdXc2UVZ5ajZCMUtsMTNVSnZrd2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F4ekJFZVljMkdWSmRNU0JCNEFSU1BZMTRNQ0JISzFIc1lnL3IranZVQlFT?= =?utf-8?B?d2c9PQ==?= Content-Type: text/plain; charset="utf-8" Content-ID: <60E54E6A51DDF2469FCCEACD37319BCA@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: a0a19896-1335-4fdf-c562-08dace0f2a85 X-MS-Exchange-CrossTenant-originalarrivaltime: 24 Nov 2022 11:29:35.9431 (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: gAj5CWSx8fB+HwGy386FiRmoLSBo925EXuHHU5dKNe1ICVReUn09JLjOwB7W7OQ5RU/Taw39Ik9iVsWKtSVYCA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ1PR11MB6107 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, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE 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 DQo+ID4gK3N0YXRpYyBpbmxpbmUgdTY0IHRkbXJfc3RhcnQoc3RydWN0IHRkbXJfaW5mbyAqdGRt cikNCj4gPiArew0KPiA+ICsJcmV0dXJuIHRkbXItPmJhc2U7DQo+ID4gK30NCj4gDQo+IEknbS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