Module Name: src Committed By: cherry Date: Mon Feb 11 18:50:15 UTC 2019
Modified Files: src/sys/arch/x86/x86: identcpu.c Log Message: Detect and report running in a XEN hvm container. This allows the lapic code to apply its x2apic probe logic while running in a XEN hvm container. To generate a diff of this commit: cvs rdiff -u -r1.87 -r1.88 src/sys/arch/x86/x86/identcpu.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/arch/x86/x86/identcpu.c diff -u src/sys/arch/x86/x86/identcpu.c:1.87 src/sys/arch/x86/x86/identcpu.c:1.88 --- src/sys/arch/x86/x86/identcpu.c:1.87 Mon Feb 11 14:59:33 2019 +++ src/sys/arch/x86/x86/identcpu.c Mon Feb 11 18:50:15 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: identcpu.c,v 1.87 2019/02/11 14:59:33 cherry Exp $ */ +/* $NetBSD: identcpu.c,v 1.88 2019/02/11 18:50:15 cherry Exp $ */ /*- * Copyright (c) 1999, 2000, 2001, 2006, 2007, 2008 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: identcpu.c,v 1.87 2019/02/11 14:59:33 cherry Exp $"); +__KERNEL_RCSID(0, "$NetBSD: identcpu.c,v 1.88 2019/02/11 18:50:15 cherry Exp $"); #include "opt_xen.h" @@ -1125,6 +1125,8 @@ identify_hypervisor(void) vm_guest = VM_GUEST_HV; else if (memcmp(hv_vendor, "KVMKVMKVM\0\0\0", 12) == 0) vm_guest = VM_GUEST_KVM; + else if (memcmp(hv_vendor, "XenVMMXenVMM", 12) == 0) + vm_guest = VM_GUEST_XEN; /* FreeBSD bhyve: "bhyve bhyve " */ /* OpenBSD vmm: "OpenBSDVMM58" */ /* NetBSD nvmm: "___ NVMM ___" */