Gred, 
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 <kra...@redhat.com> 
Sent: Monday, March 20, 2023 7:43 PM
To: Tan, Dun <dun....@intel.com>
Cc: devel@edk2.groups.io; Dong, Eric <eric.d...@intel.com>; Ni, Ray 
<ray...@intel.com>; Kumar, Rahul R <rahul.r.ku...@intel.com>
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 
> valid when creating or updating page table.
> 
> 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.
> 
> 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 = 3EFCE000/447
GetMicrocodePatchInfoFromHob: MicrocodeBase = 0x0, MicrocodeSize = 0x0 
WakeupBufferStart = 87000, WakeupBufferSize = DD AP Vector: 16-bit = 87000/39, 
ExchangeInfo = 87039/A4
CpuDxe: 5-Level Paging = 0
CPU[0000]: Microcode revision = 00000000, expected = 00000000
CPU[0001]: Microcode revision = 00000000, expected = 00000000 ASSERT 
/home/kraxel/projects/edk2/UefiCpuPkg/Library/MpInitLib/X64/CreatePageTable.c(65):
 Status == ((RETURN_STATUS)(0x8000000000000000ULL | (5)))

take care,
  Gerd



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#101443): https://edk2.groups.io/g/devel/message/101443
Mute This Topic: https://groups.io/mt/97725704/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-


Reply via email to