Date: Fri, 29 Sep 2006 13:22:10 GMT From: Roman Divacky <rdivacky@FreeBSD.org> To: Perforce Change Reviews <perforce@FreeBSD.org> Subject: PERFORCE change 106881 for review Message-ID: <200609291322.k8TDMARu078016@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=106881 Change 106881 by rdivacky@rdivacky_witten on 2006/09/29 13:21:44 Be sane and set %gs instead of %fs. Still not there but getting closer. Affected files ... .. //depot/projects/linuxolator/src/sys/amd64/linux32/linux32_machdep.c#5 edit Differences ... ==== //depot/projects/linuxolator/src/sys/amd64/linux32/linux32_machdep.c#5 (text+ko) ==== @@ -57,6 +57,7 @@ #include <amd64/linux32/linux.h> #include <amd64/linux32/linux32_proto.h> +#include <amd64/include/specialreg.h> #include <compat/linux/linux_ipc.h> #include <compat/linux/linux_signal.h> #include <compat/linux/linux_util.h> @@ -679,9 +680,11 @@ /* this is taken from amd64 version of cpu_set_user_tls() */ critical_enter(); - /* set %fs */ - td->td_pcb->pcb_fsbase = (register_t)((register_t)sd.sd_hibase << 24 | sd.sd_lobase); - wrmsr(MSR_FSBASE, td->td_pcb->pcb_fsbase); + /* set %gs */ + td->td_pcb->pcb_gsbase = (register_t)((register_t)sd.sd_hibase << 24 | sd.sd_lobase); +#if 0 + wrmsr(MSR_KGSBASE, td->td_pcb->pcb_fsbase); +#endif critical_exit(); } @@ -1281,9 +1284,9 @@ /* this is taken from amd64 version of cpu_set_user_tls() */ critical_enter(); - /* set %fs */ - td->td_pcb->pcb_fsbase = (register_t)((register_t)sd.sd_hibase << 24 | sd.sd_lobase); - wrmsr(MSR_FSBASE, td->td_pcb->pcb_fsbase); + /* set %gs */ + td->td_pcb->pcb_gsbase = (register_t)((register_t)sd.sd_hibase << 24 | sd.sd_lobase); + wrmsr(MSR_KGSBASE, td->td_pcb->pcb_gsbase); critical_exit();
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200609291322.k8TDMARu078016>