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.71333.1679576279849370963 for ; Thu, 23 Mar 2023 05:58:00 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="unable to parse pub key" header.i=@intel.com header.s=intel header.b=XlSGhsA+; 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=1679576279; x=1711112279; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=Few1dTh6il1Dd53irTyUqix+01XGryrrQO0h9ejRlhs=; b=XlSGhsA+I9qXqLJqxrDd4oRz+X4Rzv2W1V4Ql8mIkLFFNuBla+Oc6Fu6 IoxL043MGiLyPMCogBx7sPIpp2s2/pdGcE80L0p9TDderGcHXZ/zLLY8R kc3jIPii/Z1i4wIRDXgEfel0BBIeoUW0yq3wKZqOM4v5nkMLbGfy6bvxL MArcA22uhzjmUbLMR6ZeHpw1Wi7Pr9IrTdk+5nC0VH5EstIsD6vsuTnWW tVMnGjxF344svEn4+v5T7sxroYvDNTSWYt+o9ZxGQLyLnN08hZWPHxUo+ vgzEShT7zMq9ktKWa0VJTwiFYOg0OBBD3nzA8tJyXJqyRjTdjSCVNYe4Y w==; X-IronPort-AV: E=McAfee;i="6600,9927,10657"; a="336982935" X-IronPort-AV: E=Sophos;i="5.98,283,1673942400"; d="scan'208";a="336982935" Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Mar 2023 05:57:59 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10657"; a="714775893" X-IronPort-AV: E=Sophos;i="5.98,283,1673942400"; d="scan'208";a="714775893" Received: from fmsmsx601.amr.corp.intel.com ([10.18.126.81]) by orsmga001.jf.intel.com with ESMTP; 23 Mar 2023 05:57:59 -0700 Received: from fmsmsx611.amr.corp.intel.com (10.18.126.91) 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; Thu, 23 Mar 2023 05:57:58 -0700 Received: from fmsmsx610.amr.corp.intel.com (10.18.126.90) by fmsmsx611.amr.corp.intel.com (10.18.126.91) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.21; Thu, 23 Mar 2023 05:57:58 -0700 Received: from fmsedg601.ED.cps.intel.com (10.1.192.135) 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; Thu, 23 Mar 2023 05:57:58 -0700 Received: from NAM12-DM6-obe.outbound.protection.outlook.com (104.47.59.176) by edgegateway.intel.com (192.55.55.70) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.21; Thu, 23 Mar 2023 05:57:53 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=NkWDEQJKZd4vFx4AWt9t94nm+x7YjVCF3FT3Z273CMrkuZCeAyLszNWyNx2J3BMbWweNRt0UmcJk7ggUZHDLGWn18Yu6yHQZBLC+CQe64ZhC3VoHpkI71V7kqNSY9FwKcDEeTs8w3HJN9UwRALf8If2pCRynVCJltz1C1UpwN8ogq9lh/H92+ym8LrrO7+lkBahxNLBNxjal5Itg6Eh1SJsoNalPwrcdnzmf0gJSqW/mYLE2yHpuzOUvCRrvOzhPfGRNYRxkxce9FAq6QYtGm68f9ywpREpN2BWHogsgnKvvKjR9UHyDdW4Njv7L8/MKLHEAKhSlxIW6xTQ3QlAt8A== 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=jG5SOUjx2xkf0bqa2fMgoFAJLm6w0udfvq3Z/GdUjZI=; b=hI7wZtWkytoGLw1G03aEnKKHogp1qh1O4tTe8KU70GEH5ZmafVpdxSQ7IvW71Ng2FnSWEr8WnGooxN2V4N4JB2+cq4A2ZgJsiKtdTgMB84Ps7/PNhJKp0pSA6Hm3TipStSFrO7dWm//HNzNDQqHvGNhaTiYrYVJfppapkJ+ksHRb2JCFhtxn7cX4mOoxOSXY7Dx1MdG5M7c0CUiooQEsxWXicJFzAqlfG4/6zRKcWsOYE99IM+L8rb21nkowUzaJYsXMyGQbffoE1nr1fS4VVhT8+ZYF5gqfmeGgZmrWisiltBeGgr66SCt8WeCNala5W3Ukh8u5memuDb+bNJULKg== 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 BL1PR11MB5352.namprd11.prod.outlook.com (2603:10b6:208:311::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6178.38; Thu, 23 Mar 2023 12:57:51 +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.037; Thu, 23 Mar 2023 12:57:51 +0000 From: "Ni, Ray" To: "Tan, Dun" , "devel@edk2.groups.io" CC: "Dong, Eric" , "Kumar, Rahul R" , Gerd Hoffmann Subject: Re: [Patch V4 09/21] UefiCpuPkg/CpuPageTableLib: Add manual test to check Mask and Attr Thread-Topic: [Patch V4 09/21] UefiCpuPkg/CpuPageTableLib: Add manual test to check Mask and Attr Thread-Index: AQHZXVrqY/sq+iMXb0+O+r44IURxNq8IUnXw Date: Thu, 23 Mar 2023 12:57:51 +0000 Message-ID: References: <20230323074057.549-1-dun.tan@intel.com> <20230323074057.549-10-dun.tan@intel.com> In-Reply-To: <20230323074057.549-10-dun.tan@intel.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_|BL1PR11MB5352:EE_ x-ms-office365-filtering-correlation-id: a0286422-9bb4-4b45-a1b6-08db2b9e35e7 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: zxBenngo8LXqPZIf9rRQ+OMu3PFjfUjt0V8ThZcuzdSzL4SzOrNDOTikXKuJqVuZtSW688kIsV63unO+m6GMM6X7OJw+NRTTCfuBhIqfi0uq+x4qJJJFdMyESFGGUOIpSZdTZDgEd06x+d6Le/Ba/I/0ml6tPPc8xMIjgrvlOBSzx5tqPOprf42MBBPEEUwwrmXP3KJXps8oA3wfTOjP/gRXGMYVrKwgUVuhV5c+Ce5Wi390RkPZyF1BH5+73yLLO6Svm5/F8CgYeDh3KktyAy8Nsuaih3roFKSRYbfRBl5SgtjkdRGCU45ApKal5YPnhvpMWU6mFEO7izAKP68xg9WPczPP1Tldh87qq+9XaDhAGBqgzcUjcINq2ealRmrZ1iol+MdFUsHBkuPEpSo/4kbk4DEbP+KcNKjF84JjzDaLSSN+5YfQwNFtHZfyvChT9+oUEw5DhRtjK2S8oPI7DD4dvK95OWnYtKMpqRQNWiNmT2eDFvzuqMkxuvf/CtEhTAMPutnbVNGydQ7nwZKCz4hN/lT3py2Fj2Yzl2cE7h8az3wE2NJXeq069wsWLc1vaJZo7klWD0GRnp9SAKgLADlwOFEugzFliJ7Z6s9VNkhNRUUKJOcTwoQjROIQwyTRvenP9sjqvrq6eWTXLQUfS84z4fadT0oWLfsr0jbCn6o4S8iqTZX88XAdrLnWqOfX 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)(376002)(366004)(346002)(396003)(39860400002)(136003)(451199018)(55016003)(38070700005)(38100700002)(2906002)(71200400001)(83380400001)(478600001)(9686003)(186003)(33656002)(86362001)(7696005)(316002)(19627235002)(110136005)(54906003)(66476007)(64756008)(8676002)(66556008)(66946007)(66446008)(4326008)(76116006)(52536014)(8936002)(26005)(6506007)(122000001)(5660300002)(41300700001)(82960400001);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?YpJMEuzam0tS4DzI3S7l+ZGb+RmYPQqpG8Ixf6b2vwqe+i4J0YbG0zJ3xMMc?= =?us-ascii?Q?bJDqv/5dTFezkZZCDQDA1+LKExp/tVgXOFR3lw2QY03Gl/bOiKh55i91Hg4d?= =?us-ascii?Q?g+C3XyaS68PNqe9PiJL33VbGx/qilofLVVS/phOJcYSfGJCfgi0vBXcpM2uQ?= =?us-ascii?Q?rKpymTNCHC5XkGZqmF1INlT0wUkBa8r/kfUHoB8WFzclCvb93GItkjTcgEgk?= =?us-ascii?Q?zpmCQyqlr9Y1xYWX1zdrVYFqqgVa0MaJFJv6Y85Udg4IWuBlQdAk8fyhIUfW?= =?us-ascii?Q?x8um20iEDTBJptvlBkxHldY3PsGT/R6kQa0zQLrPm8NL7Q/34n5gPrrxv1T9?= =?us-ascii?Q?mm6ZCTx2+sVIF99FUHxG+W+d4ZA3IAgeji9BAXUS/RUDPnvGL7RkLCUdQnEK?= =?us-ascii?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+CQms1?= =?us-ascii?Q?ZwHYyPhhZElq1JVnS1aQ9ZCo+S08L9Xs9E74TIQQmnyj8ba9Bj/yAmUaBden?= =?us-ascii?Q?505ph0FqBmSW93V7QmN8KAkKtdlkUo1uh6q5u6B6lUGDtRTG4SRodcsECto8?= =?us-ascii?Q?sx97HPlKDoFQYnWf1tWjZH4oVp7AXcCPqiweko2I1mfiD+Iwovd9bcJ/iyTD?= =?us-ascii?Q?yHJHc4nWlP5CwVyVW5ccQ7Js0cK4lcLAUcD+r64vb9L2P1yPcFUFp+UoO/0L?= =?us-ascii?Q?wJseQAoD2e62d7q6YQjPzgC8AH3eqB26+Q8Rj2QV?= 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: a0286422-9bb4-4b45-a1b6-08db2b9e35e7 X-MS-Exchange-CrossTenant-originalarrivaltime: 23 Mar 2023 12:57:51.1631 (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: 7k/Tcae0D3g3joWVCWEm8O7oZTq57wLEfVGxIDc5TOc3lNeOBORcKL1hW9iU4dVOsIXhljN6dDCMCZ3P1UNo3w== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL1PR11MB5352 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 > + PageTableBufferSize =3D 0; > + PageTable =3D 0; > + Buffer =3D NULL; > + MapAttribute.Uint64 =3D 0; > + MapAttribute.Bits.Present =3D 1; > + MapMask.Uint64 =3D 0; > + MapMask.Bits.Present =3D 1; > + // > + // Create Page table to cover [0, 2G]. All fields of MapMask should be= set. > + // > + Status =3D PageTableMap (&PageTable, PagingMode, Buffer, > &PageTableBufferSize, 0, SIZE_2GB, &MapAttribute, &MapMask); > + UT_ASSERT_EQUAL (Status, RETURN_INVALID_PARAMETER); > + MapMask.Uint64 =3D MAX_UINT64; > + Status =3D PageTableMap (&PageTable, PagingMode, Buffer, > &PageTableBufferSize, 0, SIZE_2GB, &MapAttribute, &MapMask); > + UT_ASSERT_EQUAL (Status, RETURN_BUFFER_TOO_SMALL); > + Buffer =3D AllocatePages (EFI_SIZE_TO_PAGES (PageTableBufferSize)); > + Status =3D PageTableMap (&PageTable, PagingMode, Buffer, > &PageTableBufferSize, 0, SIZE_2GB, &MapAttribute, &MapMask); > + UT_ASSERT_EQUAL (Status, RETURN_SUCCESS); > + > + // > + // Update Page table to set [2G - 8K, 2G] from present to non-present.= All > fields of MapMask except present should be set. "should not be set"? > + > + // > + // Update Page table to set [2G - 8K, 2G] as present and RW. All field= s of > MapMask should not be set. "should be set"?