tech-kern archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: Status of revivesa
On Sat, Sep 27, 2008 at 12:45:38PM +0200, Manuel Bouyer wrote:
> On Fri, Sep 26, 2008 at 11:15:23PM -0700, Bill Stouder-Studenmund wrote:
> > > Andrew will have to confirm, but the comments say that the new order is
> > > mandatory for sysenter. That said, AFAIK, we don't use sysenter by
> > > default. The only way to use it is to compile libc with -DI686_LIBC, so
> > > we have the option of providing the compatibility as long as the user
> > > accepts not to use sysenter.
> >
> > My "perfect world" solution would be to make the sysenter-compatible
> > reshuffling an option and make COMPAT_30_PTHREAD or some such another
> > option, and make the two incompatible. That way an admin can clearly
> > select which way to go. If either were a default, I'd make the sysenter
> > one default. :-)
>
> I'd like to see a COMPAT_30_PTHREAD.
I can confirm that with the attached patch, the named on my 3.0 userland is
running properly:
# named -g
27-Sep-2008 13:32:32.558 starting BIND 9.3.0 -g
27-Sep-2008 13:32:32.559 found 1 CPU, using 1 worker thread
27-Sep-2008 13:32:32.582 loading configuration from '/etc/named.conf'
27-Sep-2008 13:32:32.582 none:0: open: /etc/named.conf: file not found
27-Sep-2008 13:32:32.583 loading configuration: file not found
27-Sep-2008 13:32:32.583 exiting (due to fatal error)
# uname -a
NetBSD 4.99.72 NetBSD 4.99.72 (XEN2_DOMU) #0: Sat Sep 27 13:13:15 CEST 2008
bouyer@rock:/dsk/l1/misc/bouyer/current/wrstuden-revivesa/src/sys/arch/i386/compile/XEN2_DOMU
i386
--
Manuel Bouyer <bouyer%antioche.eu.org@localhost>
NetBSD: 26 ans d'experience feront toujours la difference
--
Index: conf/XEN2_DOMU
===================================================================
RCS file: /cvsroot/src/sys/arch/i386/conf/XEN2_DOMU,v
retrieving revision 1.16.6.2
diff -u -r1.16.6.2 XEN2_DOMU
--- conf/XEN2_DOMU 18 Sep 2008 04:33:27 -0000 1.16.6.2
+++ conf/XEN2_DOMU 27 Sep 2008 11:31:26 -0000
@@ -69,6 +69,7 @@
options COMPAT_16 # NetBSD 1.6
options COMPAT_20 # NetBSD 2.0
options COMPAT_30 # NetBSD 3.0 compatibility.
+options COMPAT_30_PTHREAD # NetBSD 3.0 pthreads compatibility.
options COMPAT_40 # NetBSD 4.0
options COMPAT_43 # 4.3BSD, 386BSD, and BSDI
options COMPAT_386BSD_MBRPART # recognize old partition ID
Index: conf/files.i386
===================================================================
RCS file: /cvsroot/src/sys/arch/i386/conf/files.i386,v
retrieving revision 1.335.6.1
diff -u -r1.335.6.1 files.i386
--- conf/files.i386 23 Jun 2008 04:30:26 -0000 1.335.6.1
+++ conf/files.i386 27 Sep 2008 11:31:26 -0000
@@ -358,6 +358,8 @@
file arch/i386/i386/kvm86call.S kvm86
# Binary compatibility with previous NetBSD releases (COMPAT_XX)
+defflag opt_sa.h COMPAT_30_PTHREAD
+
file arch/i386/i386/compat_13_machdep.c compat_13
file arch/i386/i386/compat_16_machdep.c compat_16 | compat_ibcs2
Index: include/segments.h
===================================================================
RCS file: /cvsroot/src/sys/arch/i386/include/segments.h,v
retrieving revision 1.49
diff -u -r1.49 segments.h
--- include/segments.h 19 Apr 2008 12:10:08 -0000 1.49
+++ include/segments.h 27 Sep 2008 11:31:26 -0000
@@ -82,6 +82,7 @@
#define _I386_SEGMENTS_H_
#ifdef _KERNEL_OPT
#include "opt_xen.h"
+#include "opt_sa.h"
#endif
/*
@@ -301,9 +302,16 @@
#define GNULL_SEL 0 /* Null descriptor */
#define GCODE_SEL 1 /* Kernel code descriptor */
#define GDATA_SEL 2 /* Kernel data descriptor */
+#ifdef COMPAT_30_PTHREAD
+/* this is incompatible with sysenter/sysexit */
+#define GLDT_SEL 3 /* User code descriptor */
+#define GUCODE_SEL 4 /* User data descriptor */
+#define GUDATA_SEL 5 /* Default LDT descriptor */
+#else
#define GUCODE_SEL 3 /* User code descriptor */
#define GUDATA_SEL 4 /* User data descriptor */
#define GLDT_SEL 5 /* Default LDT descriptor */
+#endif
#define GCPU_SEL 6 /* per-CPU segment */
#define GMACHCALLS_SEL 7 /* Darwin (mach trap) system call gate
*/
#define GEXTBIOSDATA_SEL 8 /* magic to catch BIOS refs to EBDA */
Home |
Main Index |
Thread Index |
Old Index