[edk2-devel] [Patch V3 07/18] UefiCpuPkg/CpuPageTableLib:Add check for Mask and Attr

Gerd Hoffmann kraxel at redhat.com
Mon Mar 20 11:42:33 UTC 2023


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 (#101431): https://edk2.groups.io/g/devel/message/101431
Mute This Topic: https://groups.io/mt/97725704/1813853
Group Owner: devel+owner at edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [edk2-devel-archive at redhat.com]
-=-=-=-=-=-=-=-=-=-=-=-




More information about the edk2-devel-archive mailing list