NetBSD-Bugs archive

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

kern/39114: sys/arch/x86/x86/patch.c needs a minor #ifdef for PARALLELS (VT extensions problem)



>Number:         39114
>Category:       kern
>Synopsis:       sys/arch/x86/x86/patch.c needs a minor #ifdef for PARALLELS 
>(VT extensions problem)
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Jul 08 02:05:00 +0000 2008
>Originator:     George Michaelson
>Release:        current
>Organization:
>Environment:
NetBSD snoid 4.99.69 NetBSD 4.99.69 (GENERIC) #3: Mon Jul  7 20:34:51 EST 2008  
ggm@snoid:/usr/obj/sys/arch/i386/compile/GENERIC i386
>Description:
Parallels on Mac has support for 'VT extensions' but when they hit a NetBSD 
current kernel, some code in patch.c causes a hang during boot.

You can disable the VT extensions, but thats a PITA. There is an existing #if 
!defined(GPROF) on the code which causes the problem, but having to enable 
GPROF to get a working kernel also has downsides.

If this patch is acceptable, or something close to it, then a single new 
Option/define in any kernel Makefile which sets -DPARALLELS will fix the 
problem.

-George

>How-To-Repeat:
Run Parallels on OS 10.5+ (Leopard) with NetBSD current and a GENERIC kernel. 
>Fix:
--- sys/arch/x86/x86/patch.c.dist       2008-07-08 21:58:22.000000000 +1000
+++ sys/arch/x86/x86/patch.c    2008-07-08 21:59:26.000000000 +1000
@@ -120,7 +120,7 @@
 void
 x86_patch(void)
 {
-#if !defined(GPROF)
+#if !defined(GPROF) && !defined(PARALLELS)
        static int again;
        u_long psl;
        u_long cr0;
@@ -191,5 +191,5 @@
 
        /* Re-enable write protection. */
        lcr0(cr0);
-#endif /* GPROF */
+#endif /* GPROF && PARALLELS */
 }



Home | Main Index | Thread Index | Old Index