Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/x86/x86 Detect and report running in a XEN hvm cont...



details:   https://anonhg.NetBSD.org/src/rev/ef31b8d07eff
branches:  trunk
changeset: 448854:ef31b8d07eff
user:      cherry <cherry%NetBSD.org@localhost>
date:      Mon Feb 11 18:50:15 2019 +0000

description:
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.

diffstat:

 sys/arch/x86/x86/identcpu.c |  6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diffs (27 lines):

diff -r e69fd10bd6de -r ef31b8d07eff sys/arch/x86/x86/identcpu.c
--- a/sys/arch/x86/x86/identcpu.c       Mon Feb 11 17:49:37 2019 +0000
+++ b/sys/arch/x86/x86/identcpu.c       Mon Feb 11 18:50:15 2019 +0000
@@ -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 @@
                                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 ___" */



Home | Main Index | Thread Index | Old Index