From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by mx.groups.io with SMTP id smtpd.web10.14892.1678697253923914024 for ; Mon, 13 Mar 2023 01:47:34 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="unable to parse pub key" header.i=@intel.com header.s=intel header.b=UIk8FmvS; spf=pass (domain: intel.com, ip: 192.55.52.43, 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=1678697253; x=1710233253; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=66GjoDuHQfdYZItxZ+17Sy1xKGVt3N8YHyrQQy8tdRs=; b=UIk8FmvS1cxnF2LBECH+eMWtzFhp57XjKNeLewT5W+aYI9Kz3SDitvN2 1IN0LKDmkmqipXOzlHDelaC7osLO6wTAIDAy0ExEh+VE/6YCMpMr+DoBS JJfuvb7pcSqZAv/JDqec0uxcEe4NKZiqRa4DU0gWLRBKE5Xn6seq3z2Gv E+vSen9LogT2nY32rRF+9RO16bcNkJa9XGFvwoEtItN1wvPc4c3sesudQ 5OaEXslPTXyhdRJ6mqoCy+ze/VqPk38Y3Ieu2gfaXcOQfnN9RqCrMG1/X /UBLDxMv7L3BWQRdYPvecpznd3DCQQ7t2cLVFcszlUesMJDVj53Le3Ilu Q==; X-IronPort-AV: E=McAfee;i="6500,9779,10647"; a="423359646" X-IronPort-AV: E=Sophos;i="5.98,256,1673942400"; d="scan'208";a="423359646" Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Mar 2023 01:47:24 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10647"; a="1007909236" X-IronPort-AV: E=Sophos;i="5.98,256,1673942400"; d="scan'208";a="1007909236" Received: from fmsmsx601.amr.corp.intel.com ([10.18.126.81]) by fmsmga005.fm.intel.com with ESMTP; 13 Mar 2023 01:47:24 -0700 Received: from fmsmsx612.amr.corp.intel.com (10.18.126.92) 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.21; Mon, 13 Mar 2023 01:47:24 -0700 Received: from fmsmsx610.amr.corp.intel.com (10.18.126.90) by fmsmsx612.amr.corp.intel.com (10.18.126.92) 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:47:24 -0700 Received: from fmsedg602.ED.cps.intel.com (10.1.192.136) 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.21 via Frontend Transport; Mon, 13 Mar 2023 01:47:24 -0700 Received: from NAM10-DM6-obe.outbound.protection.outlook.com (104.47.58.108) by edgegateway.intel.com (192.55.55.71) 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:47:23 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Q+V4ci4gj1/Crzsl3FuUeZpju2yzjvYE385czfysct3N2VTOcCdaBxE69RrPGB8TLVIUg4DmvHBHWD4e7uiwPT9dtQA4CLoXt3YvvcWPfhhtwiuXsbkswoOhy4bHIlSH0dJlXgKHk8/gOU7iKzxyR/uzuxzVp8LU5gyGPcYuowl+ahmfVfuMvr7s2y68T9aOXOxExdzAaLl1iooiPRBlPCzPDnk2PiNWI83tPj5n2CXDKCYrCaCfuFR4Mq7Y9JLU2VpdzEcGRawQKxDqi94AXwhc8rtwacZC5s836qGtMCbpwjup2bHSr8Ai3JZnOF6tr6bUuCuY9oIZzj1MrNfV5Q== 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=QhHd8VtQ3lqlj1U5T+6bgfDG1otBPQnHK1HW05HLXAE=; b=kAiWqKTJDFAi3S9FuD2459XHz73HQfKlyuUm1LPg2VqL3aK3D8JeNECGo2wa2yhj9fyTmlv7IYrkNWfsl7qhfB0xV3KIMbeFmp3dia5aPwKhirAy2T2crRaF9lKeGX5N3EDP5bHAmyxf9KcT5aBkiE8+Obvr7zM0MeMbQrbJnh+6uj+jn1tiKWhqzhBDrsy4Gkcrsumq7xuxnMrwtYps3nPqa18zG5Q6x0I5oKwJgnSrvjYAj2Si5Zn9fYG6VaBf6VLsCunmrgS9X5KN8ulcN3kxd2r5Smb1xqdMf8jCf8Rx8imnOkCOSDr6YQHJuA/AYwoojT0BonKtMgPza3aRSA== 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 SA1PR11MB8253.namprd11.prod.outlook.com (2603:10b6:806:250::12) 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:47:22 +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:47:22 +0000 From: "Ni, Ray" To: "devel@edk2.groups.io" , "kraxel@redhat.com" CC: Tom Lendacky , "Dong, Eric" , "Kumar, Rahul R" , "Michael Roth" , Ashish Kalra Subject: Re: [edk2-devel] [PATCH 1/2] UefiCpuPkg/MpInitLib: Ensure SEV-SNP VMSA allocations are not 2MB aligned Thread-Topic: [edk2-devel] [PATCH 1/2] UefiCpuPkg/MpInitLib: Ensure SEV-SNP VMSA allocations are not 2MB aligned Thread-Index: AQHZU3JgxhtxD3M75Eyw6MY5Iv5jPq74WLUggAAQzgCAAAByEA== Date: Mon, 13 Mar 2023 08:47:21 +0000 Message-ID: References: <0ae6206c682709f09214222bd597d4aa6578c56a.1678467840.git.thomas.lendacky@amd.com> <20230313084546.artxw4yzggxd4rrb@sirius.home.kraxel.org> In-Reply-To: <20230313084546.artxw4yzggxd4rrb@sirius.home.kraxel.org> 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_|SA1PR11MB8253:EE_ x-ms-office365-filtering-correlation-id: ac9afc9f-4f45-4dfe-c51a-08db239f8f98 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: wL6pvO1WM1jPLq+fuABfS2vwWyXbc2aDa1Chq/856celD+7NLsXRDmhfgRqCzyJjc20s88FNC8oESf6rIV2Ctv5kyKSwE6uJexiLi08EeRlZYiTN2foPuzdx0w5QYVqM0CRiMdvuBcC3uD6fMPVZAqR5XAm/d6M7TT64UrlJkEmV+4E1xkFJZLI0IHiy63lbWxP6qQQzXbOT9E27dmKgY6bEIN1CLnvJQokFUEfElZbqw1y0Ne8fiLuoNACYZ3fipjcqzRmmUxZXk+NtTZ3Dy85LL2bm/PioGmkJRfl6gbs/cwYdJE9PtWlM7JR8RCLl8hhspTHRRtBNyUAiVaMLKRcAGN2fs2dsYp5DkRl7M+dVxlhdXW4UTE8A1TaLjbTf1WJNMIQRwOL74SWhWoYtARQTQjfFUzjjtc5dsVoBs9A6HPZSxGeMOkPOudA8Oc0NBcEmgKG0BTLQPFNGHNEn/eT9YGnyQaC4ScetxRtjkgR+PMfuxVg3z4GrmV+lLXj0EBXJW4OujL19YBFVcoHuYJjuHQTCICvG9WN3rwd4EGRjTZBheoxqvsdfk5u71mPn5WR8hLTqVD0eY3FImKOBtRkfQ7WmOW9a9l7jekWuPG4R3r2L7c+DH/CWJm/XzHXhrbAvGUQ1cIdGzeVFIHoUo+X45Sb6rxhkDcppxsYNuaZ7/uvrya/gG0KjnamFzOTywo0LGua5gDH5mXHtJEvlPHbuAl7WUGb6y3Por+YM++Q= 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)(396003)(136003)(346002)(376002)(366004)(39860400002)(451199018)(2906002)(122000001)(38100700002)(82960400001)(66899018)(7696005)(478600001)(316002)(6506007)(110136005)(54906003)(55016003)(33656002)(86362001)(38070700005)(71200400001)(66556008)(41300700001)(66446008)(66476007)(4326008)(64756008)(8676002)(66946007)(53546011)(26005)(76116006)(186003)(9686003)(52536014)(8936002)(966005)(5660300002)(83380400001);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?PT1FbaxAG8OPZkVdN7a8DiIwiiqS7ODASh8ATH8dzZlTufhbip8InAKyqaJl?= =?us-ascii?Q?b+vkrSH0ch+W4zkK0JeUDvpqPm/TF1L8kZlk08k2PKHqsSTu4Fst5K/A8joy?= =?us-ascii?Q?tFLQQ9Ogq35sBaCRaxlDDCMdQpafXXMoOfHFfIE/HCQWeSC8U48lnrGUyrf8?= =?us-ascii?Q?vM830c+fxAAwZ5JcW3KOImJOVklsUDsqFuhzZP+9geZdt8jk8welJYf4j9z+?= =?us-ascii?Q?AmbZPt5+x2jZ5Ivy1UeFVz3Yn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ascii?Q?T8pSpC7UX1MRJpwwEVBFL/3tg6rmcHg6lGxXoXLZPLuybkoy4agKf10j7wtZ?= =?us-ascii?Q?vYuf4Ixbw/PpqKibRQJmdscWurmsyBVHqIO0nJ5mMoYswvm1oHr2/lywCzdZ?= =?us-ascii?Q?S21/0Fd5YY5jJ1UYYJFf7xT5DqJQMYuIheT2QT1ojz9YvMAorld2G81yz9iv?= =?us-ascii?Q?C70fG06gT9wQYS8iuIPOoTrY1ORzVsedix8va6pUtisHhoiEt+7C+6rZrksq?= =?us-ascii?Q?6TUxEgI4FiG4glt0k9VH9/XbzD+gXD5lenksnn16XbS+DsUF3fubDsc/XGFU?= =?us-ascii?Q?P8VvriHdxsZOKMZoOXfcMuJPA+pW9Wpqmz/ZPvvt/olHZLyhkYB/fpF4mzu1?= =?us-ascii?Q?2Mfz8vnyvuAtC8fcAyRMUuGbJum6abUHuwPv8FIvsujq21tfrPi/hK0KLD2J?= =?us-ascii?Q?iR4rBry24qQONQ6zRAQ=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: ac9afc9f-4f45-4dfe-c51a-08db239f8f98 X-MS-Exchange-CrossTenant-originalarrivaltime: 13 Mar 2023 08:47:21.8826 (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: WL+n7HY9Ghxv4M79tCSrfzSdAMhHWz+SGU2Lc2tSECQBkHdjrC4kFfeM258+1hUuElrmoLCjRuCuLvraLo0yuA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA1PR11MB8253 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 That depends on review from other package maintainers. > -----Original Message----- > From: devel@edk2.groups.io On Behalf Of Gerd > Hoffmann > Sent: Monday, March 13, 2023 4:46 PM > To: Ni, Ray > Cc: Tom Lendacky ; devel@edk2.groups.io; > Dong, Eric ; Kumar, Rahul R > ; Michael Roth ; Ashish > Kalra > Subject: Re: [edk2-devel] [PATCH 1/2] UefiCpuPkg/MpInitLib: Ensure SEV- > SNP VMSA allocations are not 2MB aligned >=20 > On Mon, Mar 13, 2023 at 08:28:57AM +0000, Ni, Ray wrote: > > > > > > +#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? >=20 > Having copies of this all over the tree is indeed a bad idea. >=20 > See https://edk2.groups.io/g/devel/message/100695 which adds this > and a few more commonly used macros to Base.h. Can we get that > reviewed and merged please? >=20 > thanks & take care, > Gerd >=20 >=20 >=20 >=20 >=20