Fix V2 extended topology enumeration APIC ID reporting#7495
Merged
likebreath merged 1 commit intocloud-hypervisor:mainfrom Nov 21, 2025
Merged
Fix V2 extended topology enumeration APIC ID reporting#7495likebreath merged 1 commit intocloud-hypervisor:mainfrom
likebreath merged 1 commit intocloud-hypervisor:mainfrom
Conversation
4ab4f84 to
c9aafe0
Compare
phip1611
approved these changes
Nov 21, 2025
When booting a Linux guest in SMP configuration, on sapphire rapids and granite rapids the following kernel warning can be observed: [Firmware Bug]: CPUID leaf 0x1f subleaf 1 APIC ID mismatch 1 != 0 [Firmware Bug]: CPUID leaf 0x1f subleaf 2 APIC ID mismatch 1 != 0 The reason is that we announce the presence of the extended topology leaf, but fail to announce the x2apic ID in EDX for each subleaf. Signed-off-by: Thomas Prescher <thomas.prescher@cyberus-technology.de> On-behalf-of: SAP thomas.prescher@sap.com
c9aafe0 to
cddcafd
Compare
phip1611
reviewed
Nov 21, 2025
| u32::from(cores_per_die * threads_per_core), | ||
| ); | ||
| CpuidPatch::set_cpuid_reg(cpuid, 0x1f, Some(1), CpuidReg::ECX, 2 << 8); | ||
| CpuidPatch::set_cpuid_reg(cpuid, 0x1f, Some(1), CpuidReg::EDX, x2apic_id); |
Member
There was a problem hiding this comment.
Out of curiosity: what's the index here (Some(1)) and why do we need the same code multiple times? What's the bigger picture?
Member
Author
There was a problem hiding this comment.
It's what the Intel ® Architecture Instruction Set Extensions and Future Features demands.
Member
Author
|
I'm not sure where this risc-v pipeline error is coming from, but it is certainly unrelated to these changes. |
Member
Right. The Risc-v support is still experimental and their runners are flaky sometime. That's s why they are optional. |
likebreath
approved these changes
Nov 21, 2025
Merged
via the queue into
cloud-hypervisor:main
with commit Nov 21, 2025
b6032bc
42 of 43 checks passed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When booting a Linux guest in SMP configuration, on sapphire rapids and granite rapids the following kernel warning can be observed:
The reason is that we announce the presence of the extended topology leaf, but fail to announce the x2apic ID in EDX for each sub-leaf.
We already fixed this for leaf 0xb, sub-leaf zero in #7087, but forgot to do the same for leaf 0x1f and its sub-leafs.
The documentation for this cpuid leaf states the following for EDX: It is always valid and does not vary with the sub-leaf index in ECX