Skip to content

UefiCpuPkg/MpLib: Demote print level for "5-Level Paging ="#12321

Merged
mergify[bot] merged 2 commits intotianocore:masterfrom
abdattar:UefiCpuPkg_verbose
Mar 25, 2026
Merged

UefiCpuPkg/MpLib: Demote print level for "5-Level Paging ="#12321
mergify[bot] merged 2 commits intotianocore:masterfrom
abdattar:UefiCpuPkg_verbose

Conversation

@abdattar
Copy link
Copy Markdown
Contributor

The "5-Level Paging" debug message in FillExchangeInfoData() is printed every time APs are woken up. At DEBUG_INFO level, this creates unnecessary log noise during normal boot. Demote the print level from DEBUG_INFO to DEBUG_VERBOSE so the message is only visible when verbose logging is enabled.

  • Breaking change?
    • Breaking change - Does this PR cause a break in build or boot behavior?
    • Examples: Does it add a new library class or move a module to a different repo.
  • Impacts security?
    • Security - Does this PR have a direct security impact?
    • Examples: Crypto algorithm change or buffer overflow fix.
  • Includes tests?
    • Tests - Does this PR include any explicit test code?
    • Examples: Unit tests or integration tests.

How This Was Tested

Tested on AMD platform.

Integration Instructions

N/A

@niruiyu
Copy link
Copy Markdown
Member

niruiyu commented Mar 23, 2026

This debug message is printed only when APs are waken up through INIT-SIPI-SIPI.
Can we print the CR4.LA57 bit in other place, just once in a boot if your system does require wake up AP everytime through INIT-SIPI-SIPI?

@kraxel
Copy link
Copy Markdown
Member

kraxel commented Mar 23, 2026

Merge #11840, then use DEBUG_PAGING for this message?

@niruiyu
Copy link
Copy Markdown
Member

niruiyu commented Mar 23, 2026

Merge #11840, then use DEBUG_PAGING for this message?

I like this idea. Can you ping @mdkinney and @lgao4 to review #11840 as they are the maintainers of MdePkg?

@khaliid2040
Copy link
Copy Markdown
Member

I am not sure if this will prevent it completely, when DEBUG_PAGING is set wouldn't the message get printed multple times.

My suggestion is to move the log to UefiCpuPkg/Library/MpInitLib/X64/CreatePageTable.c then change log level to DEBUG_PAGING.

@kraxel
Copy link
Copy Markdown
Member

kraxel commented Mar 23, 2026

Yes, the switch to DEBUG_PAGING will not prevent the message being printed multiple times.

I think there is some value in having APs print this too, to show that propagating this from BSP to APs worked properly. Having the BSP + one AP print that message would be enough, not sure there is an easy way to implement that though.

@niruiyu
Copy link
Copy Markdown
Member

niruiyu commented Mar 23, 2026

I am not sure if this will prevent it completely, when DEBUG_PAGING is set wouldn't the message get printed multple times.

My suggestion is to move the log to UefiCpuPkg/Library/MpInitLib/X64/CreatePageTable.c then change log level to DEBUG_PAGING.

Moving to that file does not help in all cases.
The logic in that file is to create page table for APs after ExitBootServices.
How about print the LA57 bit status in MpInitLibInitialize()?

@khaliid2040
Copy link
Copy Markdown
Member

I am not sure if this will prevent it completely, when DEBUG_PAGING is set wouldn't the message get printed multple times.
My suggestion is to move the log to UefiCpuPkg/Library/MpInitLib/X64/CreatePageTable.c then change log level to DEBUG_PAGING.

Moving to that file does not help in all cases. The logic in that file is to create page table for APs after ExitBootServices. How about print the LA57 bit status in MpInitLibInitialize()?

It is good to me, but as @kraxel noted if paging is needed to be printed each for BSP and AP, then we are missing a log for AP paging mode.

We just need another place to print paging mode for AP, then it will good to go.

@niruiyu
Copy link
Copy Markdown
Member

niruiyu commented Mar 24, 2026

I am not sure if this will prevent it completely, when DEBUG_PAGING is set wouldn't the message get printed multple times.
My suggestion is to move the log to UefiCpuPkg/Library/MpInitLib/X64/CreatePageTable.c then change log level to DEBUG_PAGING.

Moving to that file does not help in all cases. The logic in that file is to create page table for APs after ExitBootServices. How about print the LA57 bit status in MpInitLibInitialize()?

It is good to me, but as @kraxel noted if paging is needed to be printed each for BSP and AP, then we are missing a log for AP paging mode.

We just need another place to print paging mode for AP, then it will good to go.

The code being changed is to print the LA57 bit in BSP just when it propagates the bit to APs.
If we do need to print paging mode for AP every time it wakes up, the PR should be rejected because the code is doing correctly.
If we want to just print paging mode once and assume the LA57 bit is not changed later when waking up APs, we can move the print to MpInitLibInitialize().

The "5-Level Paging" debug message in FillExchangeInfoData() is
printed every time APs are woken up. At DEBUG_INFO level, this
creates unnecessary log noise during normal boot. Change the print
level from DEBUG_INFO to DEBUG_PAGING so the message is only
visible when paging-related debug logging is enabled.

Signed-off-by: Abdul Lateef Attar <AbdulLateef.Attar@amd.com>
@abdattar abdattar force-pushed the UefiCpuPkg_verbose branch from bd8eac9 to a0dc6d4 Compare March 24, 2026 04:43
@abdattar
Copy link
Copy Markdown
Contributor Author

Changed the macro to "DEBUG_PAGING", Please let me know your thoughts.
This will reduce the print messages for normal boot with DEBUG_INFO.

@niruiyu niruiyu added the push Auto push patch series in PR if all checks pass label Mar 25, 2026
@mergify mergify Bot added the queued label Mar 25, 2026
@mergify
Copy link
Copy Markdown

mergify Bot commented Mar 25, 2026

Merge Queue Status

  • Entered queue2026-03-25 11:42 UTC · Rule: default
  • Checks passed · in-place
  • Merged2026-03-25 12:07 UTC · at 07c43111e15756a0b4320fd6daa1ac49495d41f6

This pull request spent 24 minutes 48 seconds in the queue, including 24 minutes 37 seconds running CI.

Required conditions to merge
  • #approved-reviews-by >= 1 [🛡 GitHub branch protection]
  • #changes-requested-reviews-by = 0 [🛡 GitHub branch protection]
  • #review-threads-unresolved = 0 [🛡 GitHub branch protection]
  • any of [🛡 GitHub branch protection]:
    • check-success = tianocore.PatchCheck
    • check-neutral = tianocore.PatchCheck
    • check-skipped = tianocore.PatchCheck
  • any of [🛡 GitHub branch protection]:
    • check-success = ArmVirtPkg - Ubuntu GCC - PR
    • check-neutral = ArmVirtPkg - Ubuntu GCC - PR
    • check-skipped = ArmVirtPkg - Ubuntu GCC - PR
  • any of [🛡 GitHub branch protection]:
    • check-success = EmulatorPkg - Ubuntu GCC - PR
    • check-neutral = EmulatorPkg - Ubuntu GCC - PR
    • check-skipped = EmulatorPkg - Ubuntu GCC - PR
  • any of [🛡 GitHub branch protection]:
    • check-success = EmulatorPkg - Windows VS - PR
    • check-neutral = EmulatorPkg - Windows VS - PR
    • check-skipped = EmulatorPkg - Windows VS - PR
  • any of [🛡 GitHub branch protection]:
    • check-success = OvmfPkg - Ubuntu GCC - PR
    • check-neutral = OvmfPkg - Ubuntu GCC - PR
    • check-skipped = OvmfPkg - Ubuntu GCC - PR
  • any of [🛡 GitHub branch protection]:
    • check-success = OvmfPkg - Windows VS - PR
    • check-neutral = OvmfPkg - Windows VS - PR
    • check-skipped = OvmfPkg - Windows VS - PR
  • any of [🛡 GitHub branch protection]:
    • check-success = Windows VS - PR
    • check-neutral = Windows VS - PR
    • check-skipped = Windows VS - PR
  • any of [🛡 GitHub branch protection]:
    • check-success = Ubuntu GCC - PR
    • check-neutral = Ubuntu GCC - PR
    • check-skipped = Ubuntu GCC - PR
  • any of [🛡 GitHub branch protection]:
    • check-success = Validate Pull Request Formatting
    • check-neutral = Validate Pull Request Formatting
    • check-skipped = Validate Pull Request Formatting
  • any of [🛡 GitHub branch protection]:
    • check-success = ArmVirtPkg - Ubuntu - CLANGPDB
    • check-neutral = ArmVirtPkg - Ubuntu - CLANGPDB
    • check-skipped = ArmVirtPkg - Ubuntu - CLANGPDB
  • any of [🛡 GitHub branch protection]:
    • check-success = OvmfPkg - Ubuntu - CLANGPDB
    • check-neutral = OvmfPkg - Ubuntu - CLANGPDB
    • check-skipped = OvmfPkg - Ubuntu - CLANGPDB
  • any of [🛡 GitHub branch protection]:
    • check-success = Ubuntu - CLANGPDB
    • check-neutral = Ubuntu - CLANGPDB
    • check-skipped = Ubuntu - CLANGPDB

@mergify mergify Bot merged commit af1ae39 into tianocore:master Mar 25, 2026
140 of 141 checks passed
@mergify mergify Bot removed the queued label Mar 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

push Auto push patch series in PR if all checks pass

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants