Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/amd64/amd64 Remove XENPV-specific %ss/%cs handling, ...



details:   https://anonhg.NetBSD.org/src/rev/e0757c1c20aa
branches:  trunk
changeset: 457923:e0757c1c20aa
user:      bouyer <bouyer%NetBSD.org@localhost>
date:      Wed Jul 24 16:36:47 2019 +0000

description:
Remove XENPV-specific %ss/%cs handling, it doens't seem to be needed with
newer hypervisors (tested with 4.6 and 4.11)

diffstat:

 sys/arch/amd64/amd64/machdep.c         |  13 ++-----------
 sys/arch/amd64/amd64/process_machdep.c |  10 ++--------
 2 files changed, 4 insertions(+), 19 deletions(-)

diffs (65 lines):

diff -r b8d89e6f0819 -r e0757c1c20aa sys/arch/amd64/amd64/machdep.c
--- a/sys/arch/amd64/amd64/machdep.c    Wed Jul 24 15:55:07 2019 +0000
+++ b/sys/arch/amd64/amd64/machdep.c    Wed Jul 24 16:36:47 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: machdep.c,v 1.334 2019/06/27 02:00:30 christos Exp $   */
+/*     $NetBSD: machdep.c,v 1.335 2019/07/24 16:36:47 bouyer Exp $     */
 
 /*
  * Copyright (c) 1996, 1997, 1998, 2000, 2006, 2007, 2008, 2011
@@ -110,7 +110,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.334 2019/06/27 02:00:30 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.335 2019/07/24 16:36:47 bouyer Exp $");
 
 #include "opt_modular.h"
 #include "opt_user_ldt.h"
@@ -2064,15 +2064,6 @@
                tf->tf_rsp  = gr[_REG_RSP];
                tf->tf_ss   = LSEL(LUDATA_SEL, SEL_UPL);
 
-#ifdef XENPV
-               /*
-                * Xen has its own way of dealing with %cs and %ss,
-                * reset them to proper values.
-                */
-               tf->tf_ss = GSEL(GUDATA_SEL, SEL_UPL);
-               tf->tf_cs = GSEL(GUCODE_SEL, SEL_UPL);
-#endif
-
                l->l_md.md_flags |= MDL_IRET;
        }
 
diff -r b8d89e6f0819 -r e0757c1c20aa sys/arch/amd64/amd64/process_machdep.c
--- a/sys/arch/amd64/amd64/process_machdep.c    Wed Jul 24 15:55:07 2019 +0000
+++ b/sys/arch/amd64/amd64/process_machdep.c    Wed Jul 24 16:36:47 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: process_machdep.c,v 1.42 2019/07/20 18:25:11 christos Exp $    */
+/*     $NetBSD: process_machdep.c,v 1.43 2019/07/24 16:36:47 bouyer Exp $      */
 
 /*
  * Copyright (c) 1998, 2000 The NetBSD Foundation, Inc.
@@ -74,7 +74,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: process_machdep.c,v 1.42 2019/07/20 18:25:11 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: process_machdep.c,v 1.43 2019/07/24 16:36:47 bouyer Exp $");
 
 #include "opt_xen.h"
 #include <sys/param.h>
@@ -225,12 +225,6 @@
        tf->tf_rflags = regs[_REG_RFLAGS];
        tf->tf_rsp  = regs[_REG_RSP];
 
-#ifdef XENPV
-       /* see comment in cpu_setmcontext */
-       tf->tf_ss = GSEL(GUDATA_SEL, SEL_UPL);
-       tf->tf_cs = GSEL(GUCODE_SEL, SEL_UPL);
-#endif
-
        return 0;
 }
 



Home | Main Index | Thread Index | Old Index