Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/x86 Revert, wrong branch



details:   https://anonhg.NetBSD.org/src/rev/8ebbc1a2972c
branches:  trunk
changeset: 970993:8ebbc1a2972c
user:      bouyer <bouyer%NetBSD.org@localhost>
date:      Fri Apr 10 14:35:26 2020 +0000

description:
Revert, wrong branch

diffstat:

 sys/arch/x86/include/cpu.h |  15 +--------------
 sys/arch/x86/x86/cpu.c     |   6 ++++--
 sys/arch/x86/x86/patch.c   |   7 +++----
 3 files changed, 8 insertions(+), 20 deletions(-)

diffs (86 lines):

diff -r 62bf4cb08796 -r 8ebbc1a2972c sys/arch/x86/include/cpu.h
--- a/sys/arch/x86/include/cpu.h        Fri Apr 10 14:34:27 2020 +0000
+++ b/sys/arch/x86/include/cpu.h        Fri Apr 10 14:35:26 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: cpu.h,v 1.118 2020/04/10 14:34:27 bouyer Exp $ */
+/*     $NetBSD: cpu.h,v 1.119 2020/04/10 14:35:26 bouyer Exp $ */
 
 /*
  * Copyright (c) 1990 The Regents of the University of California.
@@ -505,19 +505,6 @@
 } vm_guest_t;
 extern vm_guest_t vm_guest;
 
-static __inline bool __unused
-vm_guest_is_xenpv(void)
-{
-       switch(vm_guest) {
-       case VM_GUEST_XENPV:
-       case VM_GUEST_XENPVH:
-       case VM_GUEST_XENPVHVM:
-               return true;
-       default:
-               return false;
-       }
-}
-
 /* cpu_topology.c */
 void   x86_cpu_topology(struct cpu_info *);
 
diff -r 62bf4cb08796 -r 8ebbc1a2972c sys/arch/x86/x86/cpu.c
--- a/sys/arch/x86/x86/cpu.c    Fri Apr 10 14:34:27 2020 +0000
+++ b/sys/arch/x86/x86/cpu.c    Fri Apr 10 14:35:26 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: cpu.c,v 1.182 2020/04/10 14:34:27 bouyer Exp $ */
+/*     $NetBSD: cpu.c,v 1.183 2020/04/10 14:35:26 bouyer Exp $ */
 
 /*
  * Copyright (c) 2000-2012 NetBSD Foundation, Inc.
@@ -62,7 +62,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.182 2020/04/10 14:34:27 bouyer Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.183 2020/04/10 14:35:26 bouyer Exp $");
 
 #include "opt_ddb.h"
 #include "opt_mpbios.h"                /* for MPDEBUG */
@@ -720,8 +720,10 @@
        kcpuset_t *cpus;
        u_long i;
 
+#ifndef XEN
        /* Now that we know the number of CPUs, patch the text segment. */
        x86_patch(false);
+#endif
 
 #if NACPICA > 0
        /* Finished with NUMA info for now. */
diff -r 62bf4cb08796 -r 8ebbc1a2972c sys/arch/x86/x86/patch.c
--- a/sys/arch/x86/x86/patch.c  Fri Apr 10 14:34:27 2020 +0000
+++ b/sys/arch/x86/x86/patch.c  Fri Apr 10 14:35:26 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: patch.c,v 1.38 2020/04/10 14:34:27 bouyer Exp $        */
+/*     $NetBSD: patch.c,v 1.39 2020/04/10 14:35:26 bouyer Exp $        */
 
 /*-
  * Copyright (c) 2007, 2008, 2009 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: patch.c,v 1.38 2020/04/10 14:34:27 bouyer Exp $");
+__KERNEL_RCSID(0, "$NetBSD: patch.c,v 1.39 2020/04/10 14:35:26 bouyer Exp $");
 
 #include "opt_lockdebug.h"
 #ifdef i386
@@ -250,8 +250,7 @@
 #endif /* i386 */
 
 #if !defined(SPLDEBUG)
-       if (!early && (cpu_feature[0] & CPUID_CX8) != 0 &&
-           !vm_guest_is_xenpv()) {
+       if (!early && (cpu_feature[0] & CPUID_CX8) != 0) {
                /* Faster splx(), mutex_spin_exit(). */
                patchfunc(
                    cx8_spllower, cx8_spllower_end,



Home | Main Index | Thread Index | Old Index