From: Sascha Wildner Date: Tue, 24 May 2011 21:30:30 +0000 (+0200) Subject: kernel/lapic: Remove the special handling for VMware w/ 1 CPU again. X-Git-Tag: v2.12.0~567 X-Git-Url: https://gitweb.dragonflybsd.org/dragonfly.git/commitdiff_plain/da83c0cc1606ec0c1dc4a8a74030d3232f49072d kernel/lapic: Remove the special handling for VMware w/ 1 CPU again. I've done some further testing here and it looks like I was on the wrong path when I reported it to sephe. The problem seems to be a local one. It fails occasionally (SMP kernel or not) when the ISO is on my file server, but always succeeds when the ISO is on the disk of the box running VMware. --- diff --git a/sys/cpu/i386/include/specialreg.h b/sys/cpu/i386/include/specialreg.h index 5df9088297..1cafc55b0e 100644 --- a/sys/cpu/i386/include/specialreg.h +++ b/sys/cpu/i386/include/specialreg.h @@ -129,7 +129,6 @@ #define CPUID2_X2APIC 0x00200000 #define CPUID2_POPCNT 0x00800000 #define CPUID2_AESNI 0x02000000 -#define CPUID2_VMM 0x80000000 /* * Important bits in the AMD extended cpuid flags diff --git a/sys/cpu/x86_64/include/specialreg.h b/sys/cpu/x86_64/include/specialreg.h index b47565daa0..c27422f27d 100644 --- a/sys/cpu/x86_64/include/specialreg.h +++ b/sys/cpu/x86_64/include/specialreg.h @@ -133,7 +133,6 @@ #define CPUID2_X2APIC 0x00200000 #define CPUID2_POPCNT 0x00800000 #define CPUID2_AESNI 0x02000000 -#define CPUID2_VMM 0x80000000 /* * Important bits in the AMD extended cpuid flags diff --git a/sys/platform/pc32/apic/lapic.c b/sys/platform/pc32/apic/lapic.c index ed1ba2e2db..236c29ba7b 100644 --- a/sys/platform/pc32/apic/lapic.c +++ b/sys/platform/pc32/apic/lapic.c @@ -33,7 +33,6 @@ #include #include #include -#include #include #include #include @@ -676,18 +675,6 @@ lapic_config(void) mp_naps = ap_max; } - if ((cpu_feature2 & CPUID2_VMM) && mp_naps == 0) { - /* - * XXX - * Special hack for vmware. It looks like that - * if only one CPU is configured (mp_naps == 0) - * in vmware (cpu_feature2 & CPUID2_VMM), - * then LAPIC will not work at all. - */ - kprintf("LAPIC: single CPU virtual machine detected, " - "disable LAPIC\n"); - return ENXIO; - } return 0; } diff --git a/sys/platform/pc64/apic/lapic.c b/sys/platform/pc64/apic/lapic.c index 06bce1c46c..2ba3e87a43 100644 --- a/sys/platform/pc64/apic/lapic.c +++ b/sys/platform/pc64/apic/lapic.c @@ -38,7 +38,6 @@ #include #include #include -#include #include #include @@ -743,18 +742,6 @@ lapic_config(void) mp_naps = ap_max; } - if ((cpu_feature2 & CPUID2_VMM) && mp_naps == 0) { - /* - * XXX - * Special hack for vmware. It looks like that - * if only one CPU is configured (mp_naps == 0) - * in vmware (cpu_feature2 & CPUID2_VMM), - * then LAPIC will not work at all. - */ - kprintf("LAPIC: single CPU virtual machine detected, " - "disable LAPIC\n"); - return ENXIO; - } return 0; }