[PATCH kvmtool 4/4] x86: Disable Topology Extensions on AMD processors in cpuid

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



When running guest kernel 6.9 and later on AMD processors, dmesg reports:

[    0.001987] [Firmware Bug]: CPU   1: APIC ID mismatch. CPUID: 0x0000 APIC: 0x0001

This is because kvmtool does not support topoext but does not tell the guest,
causing the guest kernel to read the wrong Extended APIC ID.

Signed-off-by: Dongli Si <sidongli1997@xxxxxxxxx>
---
 x86/cpuid.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/x86/cpuid.c b/x86/cpuid.c
index f4347a8..fd23429 100644
--- a/x86/cpuid.c
+++ b/x86/cpuid.c
@@ -56,6 +56,9 @@ static void filter_cpuid(struct kvm_cpuid2 *kvm_cpuid, int cpu_id)
 			}
 			break;
 		}
+		case 0x80000001:
+			entry->ecx &= ~(1 << 22);
+			break;
 		default:
 			/* Keep the CPUID function as -is */
 			break;
-- 
2.44.0





[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux