From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by mx.groups.io with SMTP id smtpd.web11.16099.1680143195461675308 for ; Wed, 29 Mar 2023 19:26:36 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="unable to parse pub key" header.i=@intel.com header.s=intel header.b=aVc3g9zg; spf=pass (domain: intel.com, ip: 192.55.52.93, mailfrom: ray.ni@intel.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1680143195; x=1711679195; h=from:to:cc:subject:date:message-id:references: in-reply-to:mime-version; bh=DM9DrUc/RulC039KwBUYpvQQMJzkorkBZQj34/pNBiY=; b=aVc3g9zg7MElG2ejUecTYDvoWPsxudxj0Oyl65QJtyafsZuMkTsqruoM GnjJyrXlhernQlckIQ7paoNSvfhfAgIToQHx92lpun9oRzhIg0irnqw43 22ExOHknpv3PKIQOA9Z5uZEeNP3LXcMDNPIilcwYLyOGZmFS7N487ottx 5QMT0+0gXesW9C4Lxj3rNDQVl5ysScbl12ez/EtnxCiKTpnlTHagb/DtF fkEV2GKxvi8r/nxul9E90LM9NiPBVAbJFbkSN6AJGmPDxWmM8mbGCMpKd 9uxzDTQm4NjdbnYvof1mzNshC+KRrgXlNjsiCsk+Zb5Zw9CEDG7drWOH5 A==; X-IronPort-AV: E=McAfee;i="6600,9927,10664"; a="338551000" X-IronPort-AV: E=Sophos;i="5.98,301,1673942400"; d="scan'208,217";a="338551000" Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Mar 2023 19:26:31 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10664"; a="661830899" X-IronPort-AV: E=Sophos;i="5.98,301,1673942400"; d="scan'208,217";a="661830899" Received: from orsmsx603.amr.corp.intel.com ([10.22.229.16]) by orsmga006.jf.intel.com with ESMTP; 29 Mar 2023 19:26:30 -0700 Received: from orsmsx611.amr.corp.intel.com (10.22.229.24) by ORSMSX603.amr.corp.intel.com (10.22.229.16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.21; Wed, 29 Mar 2023 19:26:30 -0700 Received: from orsmsx603.amr.corp.intel.com (10.22.229.16) by ORSMSX611.amr.corp.intel.com (10.22.229.24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.21; Wed, 29 Mar 2023 19:26:30 -0700 Received: from orsedg603.ED.cps.intel.com (10.7.248.4) by orsmsx603.amr.corp.intel.com (10.22.229.16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.21 via Frontend Transport; Wed, 29 Mar 2023 19:26:30 -0700 Received: from NAM10-DM6-obe.outbound.protection.outlook.com (104.47.58.101) 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.2507.21; Wed, 29 Mar 2023 19:26:29 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=WUcpBuIgRBKjOR+G5QfRkM/zwlkl9udiVX/QzEdHtvZV2UuwvC1HKh53i/HX1kCmqLNBVECFoJOpL+VAREFwXBvXgXUAosjqKFZ0vn72ZSwlR7lZS+yGS563gQHqPJ+gD9aXVEZnrJmAxxzlN4MBgl5Z4YWnG7NfjgVT4QDN31WciY7DdaJTl/J8LvarMeZezR1pEJzS/HSLRte0o9/S2RJFUJl34KbNz/wqCUOYM4JtZk5gbblRDXGUkf+r8t1FfS1XQ06sZeK9WokenU7/R3OQieb9zNm+GvGrgHAy3aahN3F+MoFq2zNv22sA4+/L+rYjuqaV2IkqveIfELr0cg== 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=tI7EcTh36PMY2TpyCb6Y6DztFimM/6ZhjeWkfH+5eTE=; b=S5QOtlgyy9nb6vlr112YsL2V+Zb68CXdyOzSYHZ+JrP0KSGjzI0xSCtbyPU8BLyQ/0AyA0d0201UMuB7vhbFZ6/rClRGmjb4bersHvHObpbn7PzBosF9ZJ9++TS8Kj1Cju2b5aKi+7Yr5H45QOuGMc7DgWsI9ywHW22TB5zxVJv0y1onyyOjyZhsilBRRThWJLvfUT5DGqHCLTIZWSGYRb0FzrmdQT+6YlbJbhD1efiV6uf/w6uSSkqg+ZB/5t1jd+KSyxZppZWpJsLqc2EG54B3I0GQWuo0tbh62Tr5QjScswp7mQzy/bfWw7/1LZTBN42eo97Ba2MCTc9lczRRnw== 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 MN6PR11MB8244.namprd11.prod.outlook.com (2603:10b6:208:470::14) by MW4PR11MB5892.namprd11.prod.outlook.com (2603:10b6:303:16a::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6222.35; Thu, 30 Mar 2023 02:26:27 +0000 Received: from MN6PR11MB8244.namprd11.prod.outlook.com ([fe80::ae07:e96a:4a24:8a69]) by MN6PR11MB8244.namprd11.prod.outlook.com ([fe80::ae07:e96a:4a24:8a69%8]) with mapi id 15.20.6222.035; Thu, 30 Mar 2023 02:26:26 +0000 From: "Ni, Ray" To: 'Gerd Hoffmann' , Tom Lendacky CC: "devel@edk2.groups.io" , "Ni, Ray" Subject: Re: [edk2-devel] [PATCH 0/6] Substract TME-MK KEY_ID_BITS from CPU max PA Thread-Topic: [edk2-devel] [PATCH 0/6] Substract TME-MK KEY_ID_BITS from CPU max PA Thread-Index: AQHZXFDgJtZZxfQaVEqr06ue07EIf68QRGOOgAJgZlA= Date: Thu, 30 Mar 2023 02:26:25 +0000 Message-ID: References: <174E9488256AAAA5.22739@groups.io> <17509A92F1FF60E5.28404@groups.io> In-Reply-To: <17509A92F1FF60E5.28404@groups.io> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: 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: MN6PR11MB8244:EE_|MW4PR11MB5892:EE_ x-ms-office365-filtering-correlation-id: 6f9ef28e-6fe7-4e61-0fba-08db30c6295d x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: 5ic6er/WotlG2/geUilNiJ5Pv+x5C0LBmJw98UTl3lAiAZ55Dn9ToTM5tc8mdioU/z+9lT+Nll80Ffi2gBsf0tsnNz8C9rbXZ65fI/Sm0SMl2ww5d5ge+UTGQz4wJLA3A2tn4VMYrWfxpWi1GfDd3U9PnWWPioenh1ae+sWcaOhHrb7x9t5eMsOQ0MU+hnPDwErkNhOyabmgY35ZzYsej8DtCtqG8NSR8RvXXHyXyywIYnRcW71aUAl8CTfM65uJSXA577EbKWnKoBEvXHRW0UNlHmMj/YEBaro7pHaaAX6QCtv9beVCHHwcjR/cNKVkVqYRvoOeK97PjfKz9+xcahnWfXotJcVshM6T31ckTh7X8tLwqTZM8VD0v0Uo7Ux5qT1pfQNRk5yGi/5mgV5x/9LJANOkRb5ykYiPMn4XG8rOGy6QeGDVJT2V+erMeAD8cqjjl4H6Yh/bACx8w2HFORvXsN/jaC9Kcwo4EG2HS45YI2pqGf5iJfNW6hq31Uab6QTqjHi+Dm51+oUpjwJdhKdlpLtcVC6Kucrb/YL86mhz2ldffKAMZqhpkmsRuqz31Wyb2CJBIVN71y4X7HevtERPiYmSv1nu4VkP5ZoYYkVsEh16DIscx7wfpTVVGpoYb0C4ydxLsWYKM16PVgSRhw== x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:MN6PR11MB8244.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230028)(396003)(39860400002)(376002)(346002)(366004)(136003)(84040400005)(451199021)(83380400001)(76236004)(26005)(6506007)(9686003)(53546011)(82960400001)(186003)(86362001)(122000001)(107886003)(38100700002)(166002)(38070700005)(41300700001)(52536014)(478600001)(5660300002)(71200400001)(8936002)(66556008)(76116006)(55016003)(66946007)(7696005)(33656002)(110136005)(4326008)(8676002)(66476007)(64756008)(54906003)(66446008)(316002)(2906002)(66899021)(1406899024);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?TrgrvUuZjpzHPyUt0egRo31IUG0CfTBU7cdkCXwaoC0HdUTWdBQgpo2lMEGx?= =?us-ascii?Q?M0Ad2oTIbQx2SuOOj06yVHl8g7fO5ZhMD7WpMuYYpoZZk58chX2fSO8D/4NX?= =?us-ascii?Q?y8gfRVw4PwudGcz1m+PZQ7KwIMWLAaflAYbcgLUt6ydslXnrfy3gEl+HpLN8?= =?us-ascii?Q?uLuz/bZlDtaYuqzu5cTAgJiCvsWR+zTOtiRAdOawRt53Xyq2kx0X+G0C1Ih9?= =?us-ascii?Q?san/kueg1C/kHm3IdfLd4AOTXZTpQ2GYyO+N+BkZn9KoiVzrq5haUGGk+aKd?= =?us-ascii?Q?AwowgpAjnRhOCqJVchJVVInJNpmvAtFkbrcRf49XCN47E2Np0rEkNM+oHXD6?= =?us-ascii?Q?jMeuhWKgAYgyAuslAAVt5vdjIMDTgE2LuffHwT2MD1v1fbIqEqaCE9BTCND2?= =?us-ascii?Q?Ky8G9qLVatBuxI/nImgGYVuVEusGdCOEhKJklVW1Vt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uo6tfv3YVLWKAMKph5iRGUuWUU7jrhaD2zIXk1hqhu/Qht6sk3j6+pl2?= =?us-ascii?Q?jDImrs4lJJG84AXbuEirzGlunJLSxxdTjSf45RB1grmFpQlz2G4jyYghbpKV?= =?us-ascii?Q?nkrAZOY9m1K9IDXcl6ky+m2qsgHB0F5szIr/QCa6+0bUHIzpuymRPtdRDTf6?= =?us-ascii?Q?RCSAppx4qwyCDxz5gk8keTVodDtAmOKUjw1LW07LrhRpz77/Lc6barGscFDl?= =?us-ascii?Q?XQ3vhoSaWotFO+VKQxY=3D?= MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: MN6PR11MB8244.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 6f9ef28e-6fe7-4e61-0fba-08db30c6295d X-MS-Exchange-CrossTenant-originalarrivaltime: 30 Mar 2023 02:26:25.8121 (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: rGhBhQ2STVvNmu1XZ6Mj2nrHok/hdzM+0qFOG/0ule0XfYzXok3F+Jd6eOAoqQVW5A8mh/NBNQKp1JlNODxnxQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MW4PR11MB5892 Return-Path: ray.ni@intel.com X-OriginatorOrg: intel.com Content-Language: en-US Content-Type: multipart/alternative; boundary="_000_MN6PR11MB8244731906284880899B05CA8C8E9MN6PR11MB8244namp_" --_000_MN6PR11MB8244731906284880899B05CA8C8E9MN6PR11MB8244namp_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Tom, I would assume this won't break any AMD system because the CPUID bit doesn'= t declare this feature. Gerd, This is needed by Intel platform for TME-MK. Can you help to analyze if it = has any impact to OVMF? I assume no. Thanks, Ray From: devel@edk2.groups.io On Behalf Of Ni, Ray Sent: Tuesday, March 28, 2023 10:10 PM To: devel@edk2.groups.io Cc: 'Gerd Hoffmann' ; Tom Lendacky Subject: Re: [edk2-devel] [PATCH 0/6] Substract TME-MK KEY_ID_BITS from CPU= max PA Gerd, Tom, Can you please review this patch series? thanks, ray ________________________________ From: devel@edk2.groups.io > on behalf of Ni, Ray > Sent: Wednesday, March 22, 2023 7:56:44 AM To: devel@edk2.groups.io > Subject: [edk2-devel] [PATCH 0/6] Substract TME-MK KEY_ID_BITS from CPU max= PA Ray Ni (6): MdePkg: Add TME-MK related CPUID and MSR definitions UefiCpuPkg/MtrrTest: Only claim CPUID max leaf as 1 UefiCpuPkg/MtrrLib: Substract TME-MK KEY_ID_BITS from CPU max PA UefiCpuPkg/CpuDxe: Refactor to use CPUID definitions UefiCpuPkg/CpuDxe: Substract TME-MK KEY_ID_BITS from CPU max PA UefiCpuPkg/MtrrTest: Add test cases for TME-MK enable case .../Include/Register/Intel/ArchitecturalMsr.h | 106 ++++++++++++++- MdePkg/Include/Register/Intel/Cpuid.h | 9 +- UefiCpuPkg/CpuDxe/CpuDxe.c | 38 ++++-- UefiCpuPkg/CpuDxe/CpuDxe.h | 3 +- UefiCpuPkg/Library/MtrrLib/MtrrLib.c | 24 +++- .../MtrrLib/UnitTest/MtrrLibUnitTest.c | 18 +-- .../MtrrLib/UnitTest/MtrrLibUnitTest.h | 3 +- UefiCpuPkg/Library/MtrrLib/UnitTest/Support.c | 126 ++++++++++++++---- 8 files changed, 278 insertions(+), 49 deletions(-) -- 2.39.1.windows.1 --_000_MN6PR11MB8244731906284880899B05CA8C8E9MN6PR11MB8244namp_ Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

Tom,

I would assume this won’t break any AMD system= because the CPUID bit doesn’t declare this feature.

 

Gerd,

This is needed by Intel platform for TME-MK. Can you= help to analyze if it has any impact to OVMF? I assume no.

 

 

Thanks,

Ray

 

From: devel@edk2.groups.io <devel@edk2.gro= ups.io> On Behalf Of Ni, Ray
Sent: Tuesday, March 28, 2023 10:10 PM
To: devel@edk2.groups.io
Cc: 'Gerd Hoffmann' <kraxel@redhat.com>; Tom Lendacky <thom= as.lendacky@amd.com>
Subject: Re: [edk2-devel] [PATCH 0/6] Substract TME-MK KEY_ID_BITS f= rom CPU max PA

 

Gerd, Tom,

Can you please review this patch series?<= /p>

 

thanks,

ray


From: devel@edk2.groups.io <devel@edk2.groups.io> on behalf of= Ni, Ray <ray.ni@intel.com> Sent: Wednesday, March 22, 2023 7:56:44 AM
To: devel@edk2.groups.io= <devel@edk2.groups.io> Subject: [edk2-devel] [PATCH 0/6] Substract TME-MK KEY_ID_BITS from = CPU max PA

 


Ray Ni (6):
  MdePkg: Add TME-MK related CPUID and MSR definitions
  UefiCpuPkg/MtrrTest: Only claim CPUID max leaf as 1
  UefiCpuPkg/MtrrLib: Substract TME-MK KEY_ID_BITS from CPU max PA
  UefiCpuPkg/CpuDxe: Refactor to use CPUID definitions
  UefiCpuPkg/CpuDxe: Substract TME-MK KEY_ID_BITS from CPU max PA
  UefiCpuPkg/MtrrTest: Add test cases for TME-MK enable case

 .../Include/Register/Intel/ArchitecturalMsr.h | 106 ++++++++++++++-  MdePkg/Include/Register/Intel/Cpuid.h     &n= bsp;   |   9 +-
 UefiCpuPkg/CpuDxe/CpuDxe.c       &= nbsp;            |&n= bsp; 38 ++++--
 UefiCpuPkg/CpuDxe/CpuDxe.h       &= nbsp;            |&n= bsp;  3 +-
 UefiCpuPkg/Library/MtrrLib/MtrrLib.c     &nb= sp;    |  24 +++-
 .../MtrrLib/UnitTest/MtrrLibUnitTest.c     &= nbsp;  |  18 +--
 .../MtrrLib/UnitTest/MtrrLibUnitTest.h     &= nbsp;  |   3 +-
 UefiCpuPkg/Library/MtrrLib/UnitTest/Support.c | 126 ++++++++++++++---= -
 8 files changed, 278 insertions(+), 49 deletions(-)

--
2.39.1.windows.1





--_000_MN6PR11MB8244731906284880899B05CA8C8E9MN6PR11MB8244namp_--