-
Notifications
You must be signed in to change notification settings - Fork 565
Fix V2 extended topology enumeration APIC ID reporting #7495
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
4ab4f84 to
c9aafe0
Compare
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 <[email protected]> On-behalf-of: SAP [email protected]
c9aafe0 to
cddcafd
Compare
| 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); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's what the Intel ® Architecture Instruction Set Extensions and Future Features demands.
|
I'm not sure where this risc-v pipeline error is coming from, but it is certainly unrelated to these changes. |
Right. The Risc-v support is still experimental and their runners are flaky sometime. That's s why they are optional. |
b6032bc
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