From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by mx.groups.io with SMTP id smtpd.web11.14687.1679320691097749401 for ; Mon, 20 Mar 2023 06:58:11 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="unable to parse pub key" header.i=@intel.com header.s=intel header.b=Rnvhw0wJ; spf=pass (domain: intel.com, ip: 134.134.136.100, mailfrom: dun.tan@intel.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1679320691; x=1710856691; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=XJKnIaB8ZX5FKfiSADPk+MObLg0Pmh7jqQcHEkxnC+g=; b=Rnvhw0wJthY1KZNKIhpum6RRJVPcX11S2A/aZH2by+T7pWoXQ4ZVnyRD HuHvvlIlQZDJPzhEJgzR1P5cL9KPV9RkFHKWdSbp5OXGnV/TzUG8Qk3xS 8tKzCQ19MW1t5HtAgW0d7AlXgNdoGz5DegPv+I/wDJqv6uW97ft/xDPR8 LrD0ixRUGCjHMa9MZNU2zl3BBEryeTYS3olaDPpNV1rRFP9y2/EdQL+uc iEscvSggm1Laf8QRgGMZY6IstGitSHxX55u9fDAf7MowDdtoAVdBX1/PU shtsL6icR6mBCtvcZA5v+Wpd5bsLmP8EKKm4k8oYpqRJ6V4KDTYie8Pq0 A==; X-IronPort-AV: E=McAfee;i="6600,9927,10655"; a="403537836" X-IronPort-AV: E=Sophos;i="5.98,274,1673942400"; d="scan'208";a="403537836" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Mar 2023 06:58:10 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10655"; a="824482895" X-IronPort-AV: E=Sophos;i="5.98,274,1673942400"; d="scan'208";a="824482895" Received: from fmsmsx602.amr.corp.intel.com ([10.18.126.82]) by fmsmga001.fm.intel.com with ESMTP; 20 Mar 2023 06:58:10 -0700 Received: from fmsmsx610.amr.corp.intel.com (10.18.126.90) by fmsmsx602.amr.corp.intel.com (10.18.126.82) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.21; Mon, 20 Mar 2023 06:58:10 -0700 Received: from fmsmsx603.amr.corp.intel.com (10.18.126.83) 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; Mon, 20 Mar 2023 06:58:09 -0700 Received: from FMSEDG603.ED.cps.intel.com (10.1.192.133) by fmsmsx603.amr.corp.intel.com (10.18.126.83) 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, 20 Mar 2023 06:58:09 -0700 Received: from NAM11-CO1-obe.outbound.protection.outlook.com (104.47.56.173) 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.21; Mon, 20 Mar 2023 06:58:09 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=d4wA+FH6qulab4ACL9qlE7yqZ7yWPbhFYjOF2PZ+qRLPC0XSyneMurRFEau3t5z3nxUo7isET89yYgHKpL10zBe/qdP72TSEEBlwaDnjh9+USnnmnL3gqhFOLyoB0m2XBK2Cnxa3KFxdfvLjQSzum8sbBEhxdEw/4gJ+aj9EaIy3LTwNIvNJxZAxM5zSMC635d1Xh4o8CXdkH3XrE3VBtbaEDtIhYE3T3z6dmw9td+N0hUvUTig3KcRh/GfnKChNXwauagNVFdMLZ1wOfNnCH81H5XGRRje77i6GyK+L/jaNjIAJ3Q/AdG5n/OxrSJIe1mGv7HVNbqbsodMPbY64IQ== 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=653RidtuWcwNoZbHd4MFd9jByuUVYjt2diomPtg71k8=; b=OA8TatLCyjTylPTa/3rqVp97HeKpCBgMVzIJONBeELnbJ/vekRk3R+RdHSl8UyLDYNpsKmAr1v4pPk4qOPEl6cUMJFs81MnuXGEbZmbhvUdpmKqKL3gL6tNDqr5CIut8Ywe5G+k8dNJsLCTT/nlOPv/m6qnUb+1cZ0A/cS3J3xhMkFnwTHgpy79dOz5X4kYGX4qhxwT2HuhTZkbkUHoWJUOw5EwJUcNxzWbLOf43M4pskXb0FdP7GMRYo6JU2N8kOVtD1MIJOpXIxv6NJXAv4OITNK1+KWsWhcMLPLGEB8wis+mMm5VOEDp/RCDJOpAg9q+Gj8jVIMZF4e4D4X929g== 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 BN9PR11MB5483.namprd11.prod.outlook.com (2603:10b6:408:104::10) by MW3PR11MB4603.namprd11.prod.outlook.com (2603:10b6:303:5e::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6178.37; Mon, 20 Mar 2023 13:58:08 +0000 Received: from BN9PR11MB5483.namprd11.prod.outlook.com ([fe80::af70:de56:4a6f:b2cc]) by BN9PR11MB5483.namprd11.prod.outlook.com ([fe80::af70:de56:4a6f:b2cc%7]) with mapi id 15.20.6178.037; Mon, 20 Mar 2023 13:58:07 +0000 From: "duntan" To: Gerd Hoffmann CC: "devel@edk2.groups.io" , "Dong, Eric" , "Ni, Ray" , "Kumar, Rahul R" Subject: Re: [Patch V3 07/18] UefiCpuPkg/CpuPageTableLib:Add check for Mask and Attr Thread-Topic: [Patch V3 07/18] UefiCpuPkg/CpuPageTableLib:Add check for Mask and Attr Thread-Index: AQHZWyEZ2CCgwfCDFEaNWzyw8Coiv68DsMQA Date: Mon, 20 Mar 2023 13:58:07 +0000 Message-ID: References: <20230320053329.410-1-dun.tan@intel.com> <20230320053329.410-8-dun.tan@intel.com> <20230320114233.uu4ppxygo7mghv7j@sirius.home.kraxel.org> In-Reply-To: <20230320114233.uu4ppxygo7mghv7j@sirius.home.kraxel.org> Accept-Language: zh-CN, 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: BN9PR11MB5483:EE_|MW3PR11MB4603:EE_ x-ms-office365-filtering-correlation-id: 2bfdfaa6-3cfe-41f2-89b0-08db294b2229 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: TuzAiSDMyb5aagNxSfWTVa9G66qEUZkFMOMkgjscF76ucFi4mbmB7ykzQkuQM+mnyCVCp4xcFkEgnNWXb3cSY+aDLrtntIeliMR6E/woA3xC0BHIi50YnoowYA1FNYGG2WMxS9y613DkNP6qR+f+fvdGnrL87iiCmvN5dQ6WTn0YdTiT5Fvz8OiHFrhDmOJlmkx4nx4QT9tUz+YckfUUFAabU7TZb5mT8VJ5d5bqrVVxvxYPJBo2Z0YsfbHRJ0WXN7WZX6I1NQxAZciE9KfFElX3v/46IDNa//TMWq2ZKBP+Q+asOZC9umfHNFPnPr9u31stRmF+PWFSn6OhRSMEh8hDsp838Nm0K9+gyzqKkaSizCJOcN815RnikEUUpmsO8Qec2yuOHg4Pz1TWA2ncpCi761eDTyWXuwUEvtQtVEEYlthoN8G4uFTcIuTxATIOQNM8GbHf5+43XGknrNtni4UHx0UFtiI7Hq5SmrMsaJ1P3ZAkmAe3+wrJ/blaK0PK1/4MAdY40Kr70KU0NWnZ4ej6aY+AuPsD7DQXDPL9TF4xhayaI6Wq6vtkbpK5MJs0VukMmMxd+Ao9v7HI5H71bhOW9RntWmt4zskRFQrYCPjhYJ6jt78W+GIR4wHrYz0QMdgONV61iWC0NUAUS7oYYplpKKfXariYZUiXFuRhG+R0NLeTpNPvSzMwQTZTPG1TZa8A31XqKCkCIWEgnuOnzw== x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:BN9PR11MB5483.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230025)(366004)(396003)(136003)(39860400002)(376002)(346002)(451199018)(8936002)(52536014)(5660300002)(41300700001)(55016003)(33656002)(86362001)(38070700005)(38100700002)(122000001)(82960400001)(2906002)(4326008)(83380400001)(107886003)(478600001)(71200400001)(7696005)(9686003)(186003)(6506007)(26005)(53546011)(54906003)(316002)(8676002)(66476007)(6916009)(64756008)(66556008)(66446008)(66946007)(76116006);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?drGi6WXJGuCHaluZfD6+WZSZDF0VV7d5KIupkVqVW035eFsZ+xbrwo+L9m9O?= =?us-ascii?Q?E39QjVQTc269f828BWASulC1qSsfMtpJX3FJDRLsQPjfn49SUNiUTq/eSkvk?= =?us-ascii?Q?IQl/8HzTwjJOy0gZuDL9KY1WkWPEXll7OjcaV1Bq5BEuAyPIE1LGh2a/8N50?= =?us-ascii?Q?xX/GJ7Flzow3FzgXr6lXeJGmke2vTqVPT7C7SvpP6k3QGP+pgZ9NwCp7hW0K?= =?us-ascii?Q?eX1ZZMyEXdhR1efBzEN+OVGciZPbXOkiQJfnAZRwrSaVK/lRFjyr8qmKooj6?= =?us-ascii?Q?U1zJsdZPZetiHnpfiqLPMe2hFml63z4DmOTrWPHsTnhGRRKb0BVTu+9wN6v/?= =?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i9QpSiY/CEIuetw0qdTYd1ZnSoSXx?= =?us-ascii?Q?IANs9KW41gr882w+n+4kBlsf9DK8RVsituFNIunpEcjiBIC66xwkSNhnYlLI?= =?us-ascii?Q?h1V1xBWLwQmh2cLmy0HVNsz5Uqil96EczznZpFe16LhtanU2hfuUj1d9ybBl?= =?us-ascii?Q?u8GbFbFf4pUkHk9t8UDUo+s/CWHk4HNDsBzHptNDz4oyhi+T6Ud37Jfb1wl3?= =?us-ascii?Q?u3fkKtze5srglCHH4K6L+TDtwO0GMXlQrgt8WuAH1bU49pmkvKRfYrP36qyo?= =?us-ascii?Q?wjklr5H3ZPJh9eg4pdgN7BjWvtJmwQRCgS68MLPo+I5ybbCPcSxGygQRKB0h?= =?us-ascii?Q?7nAOc+7uW+ko9z3112k=3D?= MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: BN9PR11MB5483.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 2bfdfaa6-3cfe-41f2-89b0-08db294b2229 X-MS-Exchange-CrossTenant-originalarrivaltime: 20 Mar 2023 13:58:07.4865 (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: 3TJuPiFZrvMGXkbgyyGerGKRz6gpqwfeMgBg9juBtJwfmFswAITZR+qylHtIIR7CFdft6CryrcGvYbE7ppgACA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MW3PR11MB4603 Return-Path: dun.tan@intel.com X-OriginatorOrg: intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Gred,=20 Thanks for the test. I found the root cause and will fix the issue in next = version patch. Thanks, Dun -----Original Message----- From: Gerd Hoffmann =20 Sent: Monday, March 20, 2023 7:43 PM To: Tan, Dun Cc: devel@edk2.groups.io; Dong, Eric ; Ni, Ray ; Kumar, Rahul R Subject: Re: [Patch V3 07/18] UefiCpuPkg/CpuPageTableLib:Add check for Mask= and Attr On Mon, Mar 20, 2023 at 01:33:18PM +0800, Dun Tan wrote: > For different usage, check if the combination for Mask and Attr is=20 > valid when creating or updating page table. >=20 > 1.For non-present range > 1.1Mask.Present is 0 but some other attributes is provided. > This case is invalid. > 1.2Mask.Present is 1 and Attr.Present is 0. In this case,all > other attributes should not be provided. > 1.3Mask.Present is 1 and Attr.Present is 1. In this case,all > attributes should be provided to intialize the attribute. >=20 > 2.For present range > 2.1Mask.Present is 1 and Attr.Present is 0.In this case, all > other attributes should not be provided. > All other usage for present range is permitted. > In the mentioned cases, 1.2 and 2.1 can be merged into 1 check. This patch breaks OVMF. Log tail: AP Loop Mode is 1 AP Vector: non-16-bit =3D 3EFCE000/447 GetMicrocodePatchInfoFromHob: MicrocodeBase =3D 0x0, MicrocodeSize =3D 0x0 = WakeupBufferStart =3D 87000, WakeupBufferSize =3D DD AP Vector: 16-bit =3D = 87000/39, ExchangeInfo =3D 87039/A4 CpuDxe: 5-Level Paging =3D 0 CPU[0000]: Microcode revision =3D 00000000, expected =3D 00000000 CPU[0001]: Microcode revision =3D 00000000, expected =3D 00000000 ASSERT /h= ome/kraxel/projects/edk2/UefiCpuPkg/Library/MpInitLib/X64/CreatePageTable.c= (65): Status =3D=3D ((RETURN_STATUS)(0x8000000000000000ULL | (5))) take care, Gerd