summaryrefslogtreecommitdiffstats
path: root/sys/amd64/amd64/pmap.c
diff options
context:
space:
mode:
authorbadger <badger@FreeBSD.org>2016-08-18 14:10:36 +0000
committerbadger <badger@FreeBSD.org>2016-08-18 14:10:36 +0000
commit8aeae6d2238b635aee5108ae0fc930ed2b034a49 (patch)
treedcb2edf90f19bf9dfdb6283a47c6fe660003e1c6 /sys/amd64/amd64/pmap.c
parent4640af5ebc09fc4ec16e694134ef44da779b2410 (diff)
downloadFreeBSD-src-8aeae6d2238b635aee5108ae0fc930ed2b034a49.zip
FreeBSD-src-8aeae6d2238b635aee5108ae0fc930ed2b034a49.tar.gz
MFC r302783:
Add explicit detection of KVM hypervisor Set vm_guest to a new enum value (VM_GUEST_KVM) when kvm is detected and use vm_guest in conditionals testing for KVM. Also, fix a conditional checking if we're running in a VM which caught only the generic VM case, but not more specific VMs (KVM, VMWare, etc.). (Spotted by: vangyzen). Sponsored by: Dell Inc. Approved by: vangyzen (mentor)
Diffstat (limited to 'sys/amd64/amd64/pmap.c')
-rw-r--r--sys/amd64/amd64/pmap.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/amd64/amd64/pmap.c b/sys/amd64/amd64/pmap.c
index 6062bfd..f87d3b5 100644
--- a/sys/amd64/amd64/pmap.c
+++ b/sys/amd64/amd64/pmap.c
@@ -1224,7 +1224,7 @@ pmap_init(void)
* 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)
OpenPOWER on IntegriCloud