Page MenuHomeFreeBSD

D7172.diff
No OneTemporary

D7172.diff

Index: sys/amd64/amd64/pmap.c
===================================================================
--- sys/amd64/amd64/pmap.c
+++ sys/amd64/amd64/pmap.c
@@ -1224,7 +1224,7 @@
* include at least one feature that is only supported by older Intel
* or newer AMD processors.
*/
- if (vm_guest == VM_GUEST_VM && (cpu_feature & CPUID_SS) == 0 &&
+ if (vm_guest != VM_GUEST_NO && (cpu_feature & CPUID_SS) == 0 &&
(cpu_feature2 & (CPUID2_SSSE3 | CPUID2_SSE41 | CPUID2_AESNI |
CPUID2_AVX | CPUID2_XSAVE)) == 0 && (amd_feature2 & (AMDID2_XOP |
AMDID2_FMA4)) == 0)
Index: sys/i386/i386/pmap.c
===================================================================
--- sys/i386/i386/pmap.c
+++ sys/i386/i386/pmap.c
@@ -794,7 +794,7 @@
* include at least one feature that is only supported by older Intel
* or newer AMD processors.
*/
- if (vm_guest == VM_GUEST_VM && (cpu_feature & CPUID_SS) == 0 &&
+ if (vm_guest != VM_GUEST_NO && (cpu_feature & CPUID_SS) == 0 &&
(cpu_feature2 & (CPUID2_SSSE3 | CPUID2_SSE41 | CPUID2_AESNI |
CPUID2_AVX | CPUID2_XSAVE)) == 0 && (amd_feature2 & (AMDID2_XOP |
AMDID2_FMA4)) == 0)
Index: sys/kern/subr_param.c
===================================================================
--- sys/kern/subr_param.c
+++ sys/kern/subr_param.c
@@ -148,6 +148,7 @@
"xen",
"hv",
"vmware",
+ "kvm",
NULL
};
CTASSERT(nitems(vm_guest_sysctl_names) - 1 == VM_LAST);
Index: sys/sys/systm.h
===================================================================
--- sys/sys/systm.h
+++ sys/sys/systm.h
@@ -74,7 +74,7 @@
* Keep in sync with vm_guest_sysctl_names[].
*/
enum VM_GUEST { VM_GUEST_NO = 0, VM_GUEST_VM, VM_GUEST_XEN, VM_GUEST_HV,
- VM_GUEST_VMWARE, VM_LAST };
+ VM_GUEST_VMWARE, VM_GUEST_KVM, VM_LAST };
#if defined(WITNESS) || defined(INVARIANT_SUPPORT)
void kassert_panic(const char *fmt, ...) __printflike(1, 2);
Index: sys/x86/x86/identcpu.c
===================================================================
--- sys/x86/x86/identcpu.c
+++ sys/x86/x86/identcpu.c
@@ -1300,6 +1300,8 @@
vm_guest = VM_GUEST_VMWARE;
else if (strcmp(hv_vendor, "Microsoft Hv") == 0)
vm_guest = VM_GUEST_HV;
+ else if (strcmp(hv_vendor, "KVMKVMKVM") == 0)
+ vm_guest = VM_GUEST_KVM;
}
return;
}
Index: sys/x86/x86/local_apic.c
===================================================================
--- sys/x86/x86/local_apic.c
+++ sys/x86/x86/local_apic.c
@@ -499,8 +499,7 @@
ver = lapic_read32(LAPIC_VERSION);
if ((ver & APIC_VER_EOI_SUPPRESSION) != 0) {
lapic_eoi_suppression = 1;
- if (vm_guest == VM_GUEST_VM &&
- !strcmp(hv_vendor, "KVMKVMKVM")) {
+ if (vm_guest == VM_GUEST_KVM) {
if (bootverbose)
printf(
"KVM -- disabling lapic eoi suppression\n");

File Metadata

Mime Type
text/plain
Expires
Thu, Apr 2, 7:33 PM (14 h, 17 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
30734693
Default Alt Text
D7172.diff (2 KB)

Event Timeline