From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by spool.mail.gandi.net (Postfix) with ESMTPS id A2DE6740037 for ; Tue, 21 Nov 2023 05:32:20 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=kAzhyWAmYOUpaOrlYjR+NFFyZ5wvycQnt0WKDWU3Ius=; c=relaxed/simple; d=groups.io; h=ARC-Seal:ARC-Message-Signature:ARC-Authentication-Results:From:To:CC:Subject:Thread-Topic:Thread-Index:Date:Message-ID:References:In-Reply-To:Accept-Language:MIME-Version:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Language:Content-Type:Content-Transfer-Encoding; s=20140610; t=1700544739; v=1; b=aZHZXaeT1OyXyBMUmizmSqWVbILa5q6bwp9aL/TMjOVSPmpyM0IMqc9uW9CQQMTU3C3Mxt8L 8qJPvRKZ6IyzbOd9LJY9uOLir/ZLyVXw2MbTJspO7RhRrIHrtPI2CBeoccnhJnBPshMmc6BaLL4 CgvhKHcUdKhoE8YEghtiqjoU= X-Received: by 127.0.0.2 with SMTP id Suj5YY7687511xBzrfOCnnCD; Mon, 20 Nov 2023 21:32:19 -0800 X-Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.115]) by mx.groups.io with SMTP id smtpd.web11.29122.1700544738578713929 for ; Mon, 20 Nov 2023 21:32:18 -0800 X-IronPort-AV: E=McAfee;i="6600,9927,10900"; a="391544850" X-IronPort-AV: E=Sophos;i="6.04,215,1695711600"; d="scan'208";a="391544850" X-Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Nov 2023 21:32:16 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10900"; a="939988662" X-IronPort-AV: E=Sophos;i="6.04,215,1695711600"; d="scan'208";a="939988662" X-Received: from fmsmsx601.amr.corp.intel.com ([10.18.126.81]) by orsmga005.jf.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 20 Nov 2023 21:32:16 -0800 X-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.34; Mon, 20 Nov 2023 21:32:15 -0800 X-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.34 via Frontend Transport; Mon, 20 Nov 2023 21:32:15 -0800 X-Received: from NAM10-MW2-obe.outbound.protection.outlook.com (104.47.55.100) 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.34; Mon, 20 Nov 2023 21:32:05 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=OocWcTmCFnxwOA5JNtDEBeZecU3uhoSns35bg+6ml11UWLm7IV0S4NmQAOFvRx9sR4kQXXZGS38i8IDrv+/o3Px2EFnsWHuqoZCvFJzlp0ZqcDyrmuzlvAanMy7mnt7rSyWSqY6rsZLPBC7q7GLUyW7WVU1YNVQFNjjXhsOgjSaoqzHqke47KDrLq8Lp9PeGx+/+itejr7xkTGhHaxGtBVkHzHmzjDiF+HlYV76ZcIIzLLmKG9uxF8votAtb0W8z7l/chV9cM4ATc1Ns4CuWaoW3SBZQLgs8i8KONtPorN/YEKh8rUkVf6usOcXmhz8G9AOi+DPsBmHbBYkgqeMWaw== 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=zlTNhpsNPCzjlKEVrJEvPQYCrhT9Bkmo197vAX8BAxw=; b=dq6+/xL5YL143v51Ie5DsUvH9x5Y0ewNjTGNVHCJ5G/6WAxrDpXB0r9q6879xsSeFc6YnYyUKUpeSB/oFuT3PGT7iTch0LCjrbiMFRITE2Sy9c8TMPK29MKqCX3BEh16b7Hp3zbbPhjK5iSXW1hR3xLYwC9J08vqp9xoVhE3dba/D+s6TdlYEr0GfngeRQ7SmKt37aS8IrifgeAJ4BGqGMjugUUAvX4TLOJezNBJKKCrxE/OFG3EpFyhu1PMq7avLFQPOl2KgWO3JIdTvAneHYVRTd0nLsQ+7YKx+H5W7ySBGZ893+TR9uoeTNjcv1nSh9tfGn4IQvKWLsBzhO0AxA== 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 X-Received: from MN6PR11MB8244.namprd11.prod.outlook.com (2603:10b6:208:470::14) by DM6PR11MB4627.namprd11.prod.outlook.com (2603:10b6:5:2a2::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7002.27; Tue, 21 Nov 2023 05:31:58 +0000 X-Received: from MN6PR11MB8244.namprd11.prod.outlook.com ([fe80::b614:1f5e:8b0c:9858]) by MN6PR11MB8244.namprd11.prod.outlook.com ([fe80::b614:1f5e:8b0c:9858%4]) with mapi id 15.20.7002.028; Tue, 21 Nov 2023 05:31:52 +0000 From: "Ni, Ray" To: "Sheng, W" , "devel@edk2.groups.io" , "Kinney, Michael D" CC: "Dong, Eric" , Laszlo Ersek , "Wu, Jiaxin" , "Tan, Dun" Subject: Re: [edk2-devel] [PATCH v5 1/6] MdePkg: Add macro definitions for CET feature for NASM files. Thread-Topic: [PATCH v5 1/6] MdePkg: Add macro definitions for CET feature for NASM files. Thread-Index: AQHaF3n1VUf431a/8EWIcLESTXsYsLCEFaNg Date: Tue, 21 Nov 2023 05:31:52 +0000 Message-ID: References: <20231115041216.2016-1-w.sheng@intel.com> <20231115041216.2016-2-w.sheng@intel.com> In-Reply-To: <20231115041216.2016-2-w.sheng@intel.com> Accept-Language: en-US X-Mentions: michael.d.kinney@intel.com X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-publictraffictype: Email x-ms-traffictypediagnostic: MN6PR11MB8244:EE_|DM6PR11MB4627:EE_ x-ms-office365-filtering-correlation-id: f59cc10b-9085-4c83-5a86-08dbea532abd x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam-message-info: t5gj/icGho4+Bbl99LUuKFliduYxeKuFlfLLBMSGIeDop/uG2gQWyPQMkos+18AsJP36IuQ98Y25KPC/3O7rDgcmUd32qvRJ/KZYYqJIVL6nbjXGqnCUBZhXIX06oszVTS1Jq5ZDrEmemApQ3DGvhHlMLeCv5NS0s4r6p1AZPfCp4G1mWeEDhod+l/ldF5HFK6612BM+Nls65cgsDqPz3305Bji8F8KaIM12t7/LZ8D+1tQ7V3oj2f9x7I376V3gC7/Cs8vtgIkOoFms+rzh+9u112FyrxjgEygf5Q3Srp94iCEaWwQGTzG2rQYTfsSnWslAXCcSV6u5C/QW5SsJhdszvj2yFYNw5duVtnbBzTC9JEVIckjShp2vZcjpAjbJnSagt9gW/zvALLy3Vq4WYrX3uOASqiG3MkIGx4SJDJNJ0/8J3JRrmgYASu4uRqwjWl4cFe94Bp2asZbVz/pI5em1O3aClizULjdQu1y8bBryIuindCLoSLUYZ2Q9UzyDFb+9vnDOMZIRDNDHKuRX8e70fF5bGMeVDAhh9jBJ8scBTiEDEwuPHcHc/U8AYY82NWTVV0RqnCSUHHqBq+79jSzOBpOZotqiW4Jq+xmKm4qra8NFHmc4BB7Uhe4lT2Fp x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-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3Doi0dqW/PImXemkZnPclbLfmK+RqI371iy3uvRxCFNr57?= =?us-ascii?Q?mdGZzbDZsTi8DRxX7dbLXeV96eGAKTjaAzUP43vhdND2+rp5HB8mKoJfOdAs?= =?us-ascii?Q?X41D2agTI8TeQmv8Kcgq5FuPk3aWK7hG6i3Xa9B2iJGRVHsxvZ6VkxObw+ZP?= =?us-ascii?Q?QAd6gbqsUfb7Ze9ZDJ6P7fF5RnFH6PwW3oBNhCfJktiUjA9rtk5/2HKeRLtU?= =?us-ascii?Q?ais6zbraM2XBCs0FexNoM4ArCw9Vuju/tsLVAz6l+r89zTBU+RG8zfj8SeGs?= =?us-ascii?Q?aj4hW9eXZZdrxu2L6C5zZgJ0P9FLlnnJLf6teFOqPSNuLgyWaZoXcQNg2fX0?= =?us-ascii?Q?KjooB/ql/8mw2dDHbLZ2tm61pp3bZGvyzoLYHaUW575ZFzwL7dFuG7zrfmD/?= =?us-ascii?Q?QVg+ciwAJgo0WcyYbsEEUNKqviZTau1f2wB76QriV4rfg4elGN1ZpjVkTk6/?= =?us-ascii?Q?Z7y4d/1Q8AmpcP7A2nAzuCU4XU/6oPvnwuybCGwFKyAfchc0VNxxmSF7vQi9?= =?us-ascii?Q?X1lzKRd+zP/do9DEaHP0xzGpc99GrvZRi5gGaM0GIpRTQn05Rf4FLZTVjXTU?= =?us-ascii?Q?RtqqvHAJB3ZcOckx7AIiI7HCqFudmXCKSIAwvqSF/RbRAojj+HKgV2nVfI7f?= =?us-ascii?Q?1yf43xqCC6jDKuZM6jNHHkSAYAA6Z7v9mtRo0F+qS+KoCYuIYBOgT9vPy1ko?= =?us-ascii?Q?oV7CpCDZq/ICPr1TWnA=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: f59cc10b-9085-4c83-5a86-08dbea532abd X-MS-Exchange-CrossTenant-originalarrivaltime: 21 Nov 2023 05:31:52.3006 (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: RploBZxXh6IRn6hKJ7d355r4oHYLK1aPvYQl2K0SI2gCDXy0//Cv8LP0EA3lBfj7wOPlHcCzmg8EEUXcztemSQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR11MB4627 X-OriginatorOrg: intel.com Precedence: Bulk List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,ray.ni@intel.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: FuNhbjgpk6wHxUOoenB3XxbRx7686176AA= Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20140610 header.b=aZHZXaeT; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=intel.com (policy=none); spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce@groups.io; arc=reject ("signature check failed: fail, {[1] = sig:microsoft.com:reject}") > --- > MdePkg/Include/Cet.inc | 26 ++++++++++++++++++++++++++ 1. I am not sure adding "Cet.inc" in MdePkg/Include is ok as Cet.inc only c= ontains definitions for x86 CPU. Is it better to add the macros to existing Ia32/Nasm.inc, X64/Nasm.inc? But that would cause duplicated macro definitions in the two INC files. So I am not sure which way is better. @Kinney, Michael D, comments? >=20 > +%define MSR_IA32_U_CET 0x6A0 >=20 > +%define MSR_IA32_S_CET 0x6A2 >=20 > +%define MSR_IA32_CET_SH_STK_EN 0x1 2. can you use "<<" such as: %define MSR_IA32_CET_SH_STK_EN (1<<0) >=20 > +%define MSR_IA32_CET_WR_SHSTK_EN 0x2 >=20 > +%define MSR_IA32_CET_ENDBR_EN 0x4 >=20 > +%define MSR_IA32_CET_LEG_IW_EN 0x8 >=20 > +%define MSR_IA32_CET_NO_TRACK_EN 0x10 >=20 > +%define MSR_IA32_CET_SUPPRESS_DIS 0x20 >=20 > +%define MSR_IA32_CET_SUPPRESS 0x400 >=20 > +%define MSR_IA32_CET_TRACKER 0x800 >=20 > +%define MSR_IA32_PL0_SSP 0x6A4 >=20 > +%define MSR_IA32_INTERRUPT_SSP_TABLE_ADDR 0x6A8 >=20 > + >=20 > +%define CR4_CET_BIT 23 >=20 > +%define CR4_CET 0x800000 3. %define CR4_CET (1<=20 > -- > 2.26.2.windows.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#111512): https://edk2.groups.io/g/devel/message/111512 Mute This Topic: https://groups.io/mt/102599349/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/leave/12367111/7686176/19134562= 12/xyzzy [rebecca@openfw.io] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-