Module Name: src
Committed By: bouyer
Date: Wed Jul 24 16:36:48 UTC 2019
Modified Files:
src/sys/arch/amd64/amd64: machdep.c process_machdep.c
Log Message:
Remove XENPV-specific %ss/%cs handling, it doens't seem to be needed with
newer hypervisors (tested with 4.6 and 4.11)
To generate a diff of this commit:
cvs rdiff -u -r1.334 -r1.335 src/sys/arch/amd64/amd64/machdep.c
cvs rdiff -u -r1.42 -r1.43 src/sys/arch/amd64/amd64/process_machdep.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/amd64/amd64/machdep.c
diff -u src/sys/arch/amd64/amd64/machdep.c:1.334 src/sys/arch/amd64/amd64/machdep.c:1.335
--- src/sys/arch/amd64/amd64/machdep.c:1.334 Thu Jun 27 02:00:30 2019
+++ src/sys/arch/amd64/amd64/machdep.c Wed Jul 24 16:36:47 2019
@@ -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 @@ cpu_setmcontext(struct lwp *l, const mco
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;
}
Index: src/sys/arch/amd64/amd64/process_machdep.c
diff -u src/sys/arch/amd64/amd64/process_machdep.c:1.42 src/sys/arch/amd64/amd64/process_machdep.c:1.43
--- src/sys/arch/amd64/amd64/process_machdep.c:1.42 Sat Jul 20 18:25:11 2019
+++ src/sys/arch/amd64/amd64/process_machdep.c Wed Jul 24 16:36:47 2019
@@ -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 @@ process_write_regs(struct lwp *l, const
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;
}