From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by mx.groups.io with SMTP id smtpd.web08.5888.1635386399026951594 for ; Wed, 27 Oct 2021 18:59:59 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@intel.onmicrosoft.com header.s=selector2-intel-onmicrosoft-com header.b=mKyPq5rZ; spf=pass (domain: intel.com, ip: 192.55.52.136, mailfrom: jiewen.yao@intel.com) X-IronPort-AV: E=McAfee;i="6200,9189,10150"; a="210382507" X-IronPort-AV: E=Sophos;i="5.87,188,1631602800"; d="scan'208";a="210382507" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Oct 2021 18:59:58 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.87,188,1631602800"; d="scan'208";a="537794999" Received: from orsmsx605.amr.corp.intel.com ([10.22.229.18]) by fmsmga008.fm.intel.com with ESMTP; 27 Oct 2021 18:59:55 -0700 Received: from orsmsx605.amr.corp.intel.com (10.22.229.18) by ORSMSX605.amr.corp.intel.com (10.22.229.18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.12; Wed, 27 Oct 2021 18:59:55 -0700 Received: from orsedg603.ED.cps.intel.com (10.7.248.4) by orsmsx605.amr.corp.intel.com (10.22.229.18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.12 via Frontend Transport; Wed, 27 Oct 2021 18:59:55 -0700 Received: from NAM10-MW2-obe.outbound.protection.outlook.com (104.47.55.103) by edgegateway.intel.com (134.134.137.100) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2242.12; Wed, 27 Oct 2021 18:59:54 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=PrvxTN7WinvZ8ZqjPcPvC2vObBBJJ1kLMUlMhevglVTGEA2zfjp7eBAlIOfjjwgmbr+HS2842D+1di9bRrXi5Vjx7dbmzAGkfKmgNTQYVKchQJIFyFn3+BG28EXQ8S/qN41Fip2uoAZXuo5EsAjRy/3HSI/phkn94WDHOkft5XMXldvadSVOjU/g9KoEedSUdbBdzATVQo2kOA+U+PsDDLwvd1yrzdPrdG9Wjt3mPuYetV1nw1bejx5Tm0Qn2NbzophPs5tbVrdfZycorxVPiqCUFJ92F2mB6rE5dSJ60FR+nXlaZlMWKnjkwIYkU2j091Pk1V2nGY7amr0ZO2TlIg== 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=RfTFrup2nZX8hBArZ3HNrGq2XUdWg3aMR57DQnZOp4s=; b=ZONIs5DkGbe0CgS5V86yv2kuZry1s0yLywakXmOssLxhiwDfGTpC0wDaLdBrptl+U0Ao2G9XSWXYkFeue7MUNAEITHSpg6JGx4HSnfh2uETzVRl0bIC50XQqqTXhQhYBk5ErMRpXs5CA57Xk+QNPbIrry6lnL4zRxwoA7Vq3hqFKgSoOlgbsbA9iylr/ns7CR4shxc2BlIRmWZMtwPcp9S319Xdk3alhvPkwaIevoGm8JwhXoplHaECJZpz92LbZPRqwHSq5eJHmz7rl/QmoUuNIBkPS5XWBYKJxJcJ4mLE0oDu8tBcmQyupUE/dSdhd9abwov0jinhlr4/PE98IuA== 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 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.onmicrosoft.com; s=selector2-intel-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=RfTFrup2nZX8hBArZ3HNrGq2XUdWg3aMR57DQnZOp4s=; b=mKyPq5rZlqbk1VEV+dR24H7l1QDh4fOm3i7bgv1MCoHS5APKXGi24k7Q+Oc6aPLW53azcE9uG06zQFOnSH9ZER/AzY3RFra+CQX6GriRlRwd+ljK+xXqGWOTAlUVnxYozgCpKlv/w8A/SvToc5V2Pv+CC3wFaULA6PGs0o0A9+o= Received: from PH0PR11MB4885.namprd11.prod.outlook.com (2603:10b6:510:35::14) by PH0PR11MB5030.namprd11.prod.outlook.com (2603:10b6:510:41::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4628.18; Thu, 28 Oct 2021 01:59:54 +0000 Received: from PH0PR11MB4885.namprd11.prod.outlook.com ([fe80::c5cb:e37a:9f3:8f80]) by PH0PR11MB4885.namprd11.prod.outlook.com ([fe80::c5cb:e37a:9f3:8f80%5]) with mapi id 15.20.4649.015; Thu, 28 Oct 2021 01:59:53 +0000 From: "Yao, Jiewen" To: "kraxel@redhat.com" , "Xu, Min M" CC: Brijesh Singh , "devel@edk2.groups.io" , Erdem Aktas , James Bottomley , Tom Lendacky , "Dong, Eric" , "Ni, Ray" , "Kumar, Rahul1" Subject: Re: [edk2-devel] [PATCH V2 12/28] UefiCpuPkg/CpuExceptionHandler: Add base support for the #VE exception Thread-Topic: [edk2-devel] [PATCH V2 12/28] UefiCpuPkg/CpuExceptionHandler: Add base support for the #VE exception Thread-Index: AQHXuZrE7gBtLlCCUUGhb3hSRuaAb6vPND8AgBWluZCAABOKAIAAAekggABE0wCAAB0zgIABQVaAgAE37jA= Date: Thu, 28 Oct 2021 01:59:53 +0000 Message-ID: References: <24d3a351f21bff1a4b20490313d039e403b1453c.1633401643.git.min.m.xu@intel.com> <20211012102716.wr6bao42f5hviz5z@sirius.home.kraxel.org> <20211026061148.omqerrswnpgs3jin@sirius.home.kraxel.org> <20211026102458.pvzp5nxyegq7ftuu@sirius.home.kraxel.org> <20211027071935.a4l3aiiu6uaaqdvl@sirius.home.kraxel.org> In-Reply-To: <20211027071935.a4l3aiiu6uaaqdvl@sirius.home.kraxel.org> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-version: 11.6.200.16 dlp-product: dlpe-windows dlp-reaction: no-action authentication-results: redhat.com; dkim=none (message not signed) header.d=none;redhat.com; dmarc=none action=none header.from=intel.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 1f7ff8d9-88e4-433a-ecc0-08d999b6a289 x-ms-traffictypediagnostic: PH0PR11MB5030: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:8882; x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: YUhAM39BL/pyhAxCPKikcaJeZR6BYszgURbb+jlMo+7Ke7SSUeG8kYvqWanv6dmH5s/RNTF2ZehzHkJuAXbzqogoocbf6kjGi5SjJo/LLwGE7bVQnf3H8G0UE4JIrDOjepc/RxcfdBH3w3A1+O9KHmHTbAIqb0qIkuyJcUAPBJLHX8bPmBlN9657JQ5AnfDzAPgRU+3zOQpvRYZ2KgZbJl6DVyRatEMBUYzOwML1/VdzFKaLkp6HgAMp3N21+dX5uFAgkZI80NF6f74F43zH7CjtstxihPoiDE8RI2ASNUzqvTTM6UC+8v05kE6JPA2hOzZscPJfMB4k1wlRsaOkzZaynlZ3YrU4VPdPS2jovwOHWKRpxmfg0oubSoSZe32L/2QoI7bMuWB06JYflzdTnpBWNkj3NS8Yr1yzOfQp7ksTRUDLWbotWwTqw2akDQHmAq0T4OY+RDUS4H36wNg5ta+94KORh/72T2K9iFUYRcymcQFn65nHoX5TfzyNLsh8qtbdM8n/r90zdifnn3qUfV8NIJY6YXJCXl/zEz/0ayaGitrfRqGBeiNm7r6ScHnth0y9a5+CxCWYPG1W3G9CqrW6nHVJzc7vGcDUOaqRCMTpiWxSdSQL/YicXeZ7hNM7fp6Vmf+vGIQtISD4CQYu/gN+u65ESwkIB1Nw5ZL6P+cw9iYAuM7EQnnL+z6XtC2XhcSjqw3SOgTqWSj9lI81sA== x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:PH0PR11MB4885.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(366004)(8936002)(316002)(2906002)(186003)(66946007)(66476007)(66446008)(52536014)(55016002)(66556008)(5660300002)(54906003)(38070700005)(7696005)(64756008)(508600001)(122000001)(38100700002)(76116006)(33656002)(9686003)(8676002)(4326008)(71200400001)(6506007)(53546011)(26005)(6636002)(82960400001)(86362001)(110136005)(107886003)(83380400001);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?E/a2fNSWB3RqqJDvdqO9e5JMIMPiSbJ++y96VNWAUuNX0VL6zPtpzQ77PX8J?= =?us-ascii?Q?b63pshffRDT9voWR5mBgicXCRAoBOatrnJojquCMO8XvVffqE+Fiue7bpkF0?= =?us-ascii?Q?CEmfgj/cwoL72mBYI6Huz0exxbCcMmnEnpkVdAzG/XEC0PuGeUr7wipzUkkI?= =?us-ascii?Q?1metses2ClhiuqheUY/OwtbfS2kxheNKxjbeT+rGkPbrNpIwezFYcAinn2is?= =?us-ascii?Q?WAdJa3F2CF0T/HhozOVH1Q9HU8mCT8fmrCq6I3m7BBzj9+m8L5I4EwjRDA93?= =?us-ascii?Q?Y7Eh7TMHS9JiCFwZAbuoysMJSkqrSE/PakNN7e1aF7TArNWr7SJ6AeX8Vb3b?= =?us-ascii?Q?1tdR67R4ppGH0lx3SYz4sSBZuzlVrc1hM8t0GsGxIRPBcqQpbVVT2R5GO81M?= =?us-ascii?Q?wEnXp73rqjGboQCIJFH600z2HdwS/KIhNKF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=?us-ascii?Q?eOtF+HHE27zgCw/q3K6YgdZ5Uw9HLhlPtXfd8nZOCRAiP7FkIGWetVkL5Rx/?= =?us-ascii?Q?DtSSnvG6RrLh0YaoBElC2wPH7cF6sR8BLPk9IrDJRd9eRAIM8rmSR9myWE+B?= =?us-ascii?Q?tp6mhW5S+FxW/v2aI9zHhTsCA6smEPDy8xm4tOlEFLjKMWG5U54+fHBnMEuL?= =?us-ascii?Q?FG4MojR3Z2ve/4P2c3RYEQ0GfE/P3dPrK3nxTELh9sdClNsLHiKB18L6lKO7?= =?us-ascii?Q?xrW9m0DBOleKW2CBVelLrDQxIwTDcGsRQbt5IIlz6MVkz8W39PHXGfLuCI48?= =?us-ascii?Q?K7l6qaAoA3tPcIYEVP6Wals=3D?= MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: PH0PR11MB4885.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 1f7ff8d9-88e4-433a-ecc0-08d999b6a289 X-MS-Exchange-CrossTenant-originalarrivaltime: 28 Oct 2021 01:59:53.8486 (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: fiWF7v7Pxe8FMSICmyyiqJWOrlBUUqdBzr4aPRq0L+9AK2lLs5yWh04YPeYBBMEf0fki0yOVdSa4zepG227NRA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR11MB5030 Return-Path: jiewen.yao@intel.com X-OriginatorOrg: intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hi Gerd I tend to agree with you on the direction to use one TEE specific Exception= lib. However, I have naming concern. The VMG is very SEV specific term. I don't believe it is a right name to co= ver the TEE exception lib. If Brijesh agree to merge, I think we should rename it to a neutral name, s= uch as TeeExitLib. What do you think, Brijesh? Thank you Yao Jiewen > -----Original Message----- > From: kraxel@redhat.com > Sent: Wednesday, October 27, 2021 3:20 PM > To: Xu, Min M > Cc: Brijesh Singh ; Yao, Jiewen > ; devel@edk2.groups.io; Erdem Aktas > ; James Bottomley ; Tom > Lendacky ; Dong, Eric ; Ni, > Ray ; Kumar, Rahul1 > Subject: Re: [edk2-devel] [PATCH V2 12/28] UefiCpuPkg/CpuExceptionHandler= : > Add base support for the #VE exception >=20 > Hi, >=20 > > > How about adding the tdx exception handler to the existing library, s= o we > don't > > > have the churn of adding a new library everywhere *again*? >=20 > > Do you mean add the VmTdExitVeHandler.c/VmTdExitLibNull.c in > CpuExceptionHandlerLib, then include the corresponding source file in eac= h > *CpuExceptionHandlerLib.inf? >=20 > No, I mean extend the existing VmgExitLib instead of adding a new > VmTdExitLib, i.e. place the tdx handler in > OvmfPkg/Library/VmgExitLib/TdxExitHandler.c >=20 > take care, > Gerd