From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by mx.groups.io with SMTP id smtpd.web11.15076.1678696144777010594 for ; Mon, 13 Mar 2023 01:29:05 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="unable to parse pub key" header.i=@intel.com header.s=intel header.b=KWwJZs+F; spf=pass (domain: intel.com, ip: 134.134.136.65, 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=1678696144; x=1710232144; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=jzy4v3yymV6eDRFzk39bn55LB8MEaTL9IuOKCjx7AZY=; b=KWwJZs+FGf1gc1gSsEeY8M3YYeo5TcLvikBe92G6paT03QOz9yagBt+o GrXx0TkqUyuJkjOLNaj7xYVvDF5jlEHz6W/BLx37CVTxvJycnIFNofO4x sylrq9uzFgk9+zuJzKOzx5oD6PWfgNQZ48LB9uE91ONLBNjtA7fA0S65d KtivSZzUj25lkVNWLLw06yzsnoTFv3/7i59Bk1T+hQ0x4FSV7lq+kRDGx CRQKMfvvBPSMzdNJTGt+LGSvyHQ2tMPckw2sWPzm4Bt5D89QVdmVCp+mM TR+ljzVNh7nha2ym6ZV3xLweGwdgi/RXoLjrLhsoCaCuaIgeikxjbQw7+ g==; X-IronPort-AV: E=McAfee;i="6500,9779,10647"; a="339461240" X-IronPort-AV: E=Sophos;i="5.98,256,1673942400"; d="scan'208";a="339461240" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Mar 2023 01:29:01 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10647"; a="742781509" X-IronPort-AV: E=Sophos;i="5.98,256,1673942400"; d="scan'208";a="742781509" Received: from orsmsx603.amr.corp.intel.com ([10.22.229.16]) by fmsmga008.fm.intel.com with ESMTP; 13 Mar 2023 01:29:00 -0700 Received: from orsmsx612.amr.corp.intel.com (10.22.229.25) 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; Mon, 13 Mar 2023 01:29:00 -0700 Received: from orsmsx610.amr.corp.intel.com (10.22.229.23) by ORSMSX612.amr.corp.intel.com (10.22.229.25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.21; Mon, 13 Mar 2023 01:29:00 -0700 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.2507.21 via Frontend Transport; Mon, 13 Mar 2023 01:29:00 -0700 Received: from NAM02-BN1-obe.outbound.protection.outlook.com (104.47.51.40) 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.2507.21; Mon, 13 Mar 2023 01:29:00 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=iFh5uMQWZG34pLKA7TC82YHZW+88UUAmsLnrp6I/O/sEfjE3bs8iSTnTVE7a90o3MlOwK1uCe12mG+wXJUPtcCcL+5WAFcoKPZQYIoNnCh/pOzFQ8SGhh700sbmBqK2rjTdKZnFZvmwIfH76f0RLVbETGHl3JH0yD/pQRuLQk7V9/uFwaxeJwVD0e2gHIWOc74irHJ1hApsR8PmyMRfH4MJH4//uBO6TfNa9yYINj+M1f7ALQ17yc8ffYEzFmlQeDT2LIQHT6H2fz5HVWSXbxBYRKHKwuVMQj8Cufq3ddISqs6bzZkGX4xAsFFHeQ82t1mfA0q7TVZvV8DcyQA5Olw== 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=68a4BRyNuQmTztCqFDKKeyYnb9D+Y984SPseu/YDhP8=; b=H/1DXOweCtDbp3PWnLQY9PhTyBQnlXygGGf8Nud09hKB/8w5Vr0L3aJq5AHSGA43QZ7CWYL7c0WhefJcQl6zQZfQEjTt4hb2lJT57nic2fCwElQo1uVyjsl+3WcBtt+godU+NnZWWskvo44ixy4hoWs6TNGNxDXi12NTm2X/oJgEoaNxOsucVBoPfThBpo4SRLjW9q6hBaLAHoj2E0GfP6ytu42wXu/N5p+WL+AsMxQi1S9kGvK3Pw/iSvpPtUnYHd3V8TgjAQiECIIIYjG/9L1pfWPNYoN9PyiByzgJ3bFVRpcYyO4c1z4ARB8RSFcAqTaH5zmlP1LBB1Gbyrfchw== 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 PH8PR11MB6562.namprd11.prod.outlook.com (2603:10b6:510:1c1::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6178.24; Mon, 13 Mar 2023 08:28:57 +0000 Received: from MN6PR11MB8244.namprd11.prod.outlook.com ([fe80::ae07:e96a:4a24:8a69]) by MN6PR11MB8244.namprd11.prod.outlook.com ([fe80::ae07:e96a:4a24:8a69%7]) with mapi id 15.20.6178.024; Mon, 13 Mar 2023 08:28:57 +0000 From: "Ni, Ray" To: Tom Lendacky , "devel@edk2.groups.io" CC: "Dong, Eric" , "Kumar, Rahul R" , Gerd Hoffmann , Michael Roth , Ashish Kalra Subject: Re: [PATCH 1/2] UefiCpuPkg/MpInitLib: Ensure SEV-SNP VMSA allocations are not 2MB aligned Thread-Topic: [PATCH 1/2] UefiCpuPkg/MpInitLib: Ensure SEV-SNP VMSA allocations are not 2MB aligned Thread-Index: AQHZU3JgxhtxD3M75Eyw6MY5Iv5jPq74WLUg Date: Mon, 13 Mar 2023 08:28:57 +0000 Message-ID: References: <0ae6206c682709f09214222bd597d4aa6578c56a.1678467840.git.thomas.lendacky@amd.com> In-Reply-To: <0ae6206c682709f09214222bd597d4aa6578c56a.1678467840.git.thomas.lendacky@amd.com> 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_|PH8PR11MB6562:EE_ x-ms-office365-filtering-correlation-id: 7d5ca3dd-e4bb-4e35-f285-08db239cfd69 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: CbEW4dw1BU04Sy/E/ulN/gzFmBrm+bGQuDGXIZjWUREO1hlq6C/3J6/oVfw5BgvW0hr/wsVdCmPc4cvFhZDjbaAXmmlwcotDJETJra69nLPKjrYXcJGhTEMsprHsLwlJ02DlyLexiLg3ilIbV9GkTSZk3MbkyKgd2wx2srPHtufmsu7aF8Ge7VHbwgdv/CXLjZwXlZFQW+PhzFKNszLEygF92XkEDABQ87i+YG2hvJMP1saKms78BhxRG3yWn7hjRRgfwDzShRT4e3Rui7rB3l+9DXj7cZSbKILUL6gevs2Guwep7lAAhkqvPPqFawc4yrMwlElVcwbyvTgY1hjzheWvImjIAvW/Bn1bXHBAT3Zaoeus5rDpJf+FF3F3F4IwYs5Wc/1DSDR5LQ11sVMMGQDZWVqtIWDnVOnhJ6KAWe7KN09VXxb8lTjxgo9HuhnVWJeqmBVbvOrp+AAYeOoC6leV1azPQkYlub8RvNrYPihb5oU7QgfT7+dUjdnZyl2gDBBt/CtJPWH1LkwQPskNZ1+mlOOYFTeN2oAe/BeHePCBGN/I8xDBdawANv8CH6oCsDT0Z8zlNlVFl0fWT6jvIrQ5IV/lXHiC+LS7qk+RvBKeopHSlEFJuPgU+2FOlMXhgwETs2oOML+4eZPW/Ycad1jMbWZsKaYGCqlKZhpr7D7jj/SB5KyI1l2ZRYb/LjAn8uN9GKaVo2389fhxmD7S7Q== 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:(13230025)(6029001)(346002)(376002)(39860400002)(396003)(136003)(366004)(451199018)(5660300002)(52536014)(186003)(478600001)(7696005)(9686003)(26005)(71200400001)(6506007)(66446008)(38070700005)(4326008)(66476007)(66556008)(66946007)(64756008)(55016003)(76116006)(33656002)(558084003)(8936002)(8676002)(41300700001)(86362001)(54906003)(110136005)(316002)(38100700002)(82960400001)(122000001)(2906002);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?FJo/xztZIaLdbJ83yorBfsh7pu5kBQAeIBt/S2jvt1IEYFP+EDfXGSkg8hvR?= =?us-ascii?Q?KfuqsvonXYMurtRzUjUyVT3V1zDJdyCeQSG06Ur9GlvRthnEaT3cw65WhnST?= =?us-ascii?Q?i1Rjt5Bl7YS2PBaTGn+C6P/tN3vqftIYkLx9qj+TwPYDxk5/6iutcp9CQFlQ?= =?us-ascii?Q?97aGcjBcanM47w8Vi1U14PgxldlEpu3PWcRWjUsdaTQuKpOA2yxRnBNietXx?= =?us-ascii?Q?mBO8+dRdMq2BQeiTeBL9EZTXDLY8HEZz1WpSwMbgrH4nbSscZSF8zJz3uXLm?= =?us-ascii?Q?XWjYmsn/w6U+wAvtBG27bnei/tlCuZjWEIqZ5iHn+cdSW9gE/m+lMH2x01B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Hqgv/dw3y0I7sf4aH2TtiwG/2enfTD?= =?us-ascii?Q?hsbt1drk9gNyLU86Fzvbnb0BCWpDrlSuMpOy7+GjCwEezW6NPuemOv21TXAW?= =?us-ascii?Q?KiVzc5thDyYmxc+Ds7ugX5pHvi1EWL2rxjDQNnAsKiIg6amqFukldzbZsJfc?= =?us-ascii?Q?KXJuTGKn4z3/1AZdXGFIFh1qfkj/+AIhfgXnZuOCdl/jOfdspOIjxEKJ9rm1?= =?us-ascii?Q?FKt4Dqr5uf6cPDdTvioJNSRbTSTmd6lFoDIt0rbjvW+NMjbMlJZXhNHekNjS?= =?us-ascii?Q?g/u0P9ft7eeK2ZDr/zwXB/tM1Ryy+YQ9khlG8cC8/H+j9sQ88x7jTpTV1wOk?= =?us-ascii?Q?iqtieahwMS1Q+IPfBgU=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: 7d5ca3dd-e4bb-4e35-f285-08db239cfd69 X-MS-Exchange-CrossTenant-originalarrivaltime: 13 Mar 2023 08:28:57.6193 (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: W94E/om9lgRtCIUIHPKcddd3dAu1eC02W0DI1KAyy04H1FFpzNzHutK/LmFS7sic4vKDAQB6drS/e+Ep3EaiQg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH8PR11MB6562 Return-Path: ray.ni@intel.com X-OriginatorOrg: intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable >=20 > +#define IS_ALIGNED(x, y) ((((UINTN)(x) & (y - 1)) =3D=3D 0)) 1. Can you use the existing macro ALIGN_POINTER() defined in Base.h?