Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 11 Nov 2009 11:39:18 +0900
From:      Jun Kuriyama <kuriyama@FreeBSD.org>
To:        Ed Schouten <ed@80386.nl>
Cc:        svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org
Subject:   Re: svn commit: r199067 - in head/sys: amd64/amd64 i386/i386
Message-ID:  <7meio5g4yx.wl%kuriyama@s2factory.co.jp>
In-Reply-To: <20091110160300.GD64905@hoeg.nl>
References:  <200911090254.nA92sG1G005921@svn.freebsd.org> <20091109225244.GB64905@hoeg.nl> <7mbpjbgt0n.wl%kuriyama@s2factory.co.jp> <20091110055910.GC64905@hoeg.nl> <7mvdhigb96.wl%kuriyama@s2factory.co.jp> <20091110160300.GD64905@hoeg.nl>

next in thread | previous in thread | raw e-mail | index | archive | help
--Multipart_Wed_Nov_11_11:39:18_2009-1
Content-Type: text/plain; charset=US-ASCII

At Tue, 10 Nov 2009 17:03:00 +0100,
ed@80386.nl wrote:
> > You can try with hw.clflush_disable="1" in loader.conf.  If you can
> > boot with it, I must be mistaken something (anyway its my fault).
> 
> For some reason that switch doesn't seem to have any effect.

Okay, something wrong...

> Apple MacBook3,1:
> |   Features=0xbfebfbff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CLFLUSH,DTS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE>
> 
> Dell SC440:
> |   Features=0xbfebfbff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CLFLUSH,DTS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE>

Both system has CLFUSH and SS, so CLFLUSH tweak should not executed.

Can you test with these patches?  Testing on only one of both system
is enough.  "patch-1" forces disabling CLFLUSH feature even if SS bit
exists.  "patch-2" forces no CLFLUSH tweak.  I'd like to know with
which patch your system can live.


-- 
Jun Kuriyama <kuriyama@FreeBSD.org> // FreeBSD Project
         <kuriyama@s2factory.co.jp> // S2 Factory, Inc.

--Multipart_Wed_Nov_11_11:39:18_2009-1
Content-Type: application/octet-stream
Content-Disposition: attachment; filename="patch-1"
Content-Transfer-Encoding: 7bit

Index: initcpu.c
===================================================================
--- initcpu.c	(revision 199067)
+++ initcpu.c	(working copy)
@@ -176,16 +176,20 @@
 	 * XXXKIB: (temporary) hack to work around traps generated when
 	 * CLFLUSHing APIC registers window.
 	 */
+#if 0
 	TUNABLE_INT_FETCH("hw.clflush_disable", &hw_clflush_disable);
 	if (cpu_vendor_id == CPU_VENDOR_INTEL && !(cpu_feature & CPUID_SS) &&
 	    hw_clflush_disable == -1)
+#endif
 		cpu_feature &= ~CPUID_CLFSH;
 	/*
 	 * Allow to disable CLFLUSH feature manually by
 	 * hw.clflush_disable tunable.  This may help Xen guest on some AMD
 	 * CPUs.
 	 */
+#if 0
 	if (hw_clflush_disable == 1) {
 		cpu_feature &= ~CPUID_CLFSH;
 	}
+#endif
 }

--Multipart_Wed_Nov_11_11:39:18_2009-1
Content-Type: application/octet-stream
Content-Disposition: attachment; filename="patch-2"
Content-Transfer-Encoding: 7bit

Index: initcpu.c
===================================================================
--- initcpu.c	(revision 199067)
+++ initcpu.c	(working copy)
@@ -176,16 +176,20 @@
 	 * XXXKIB: (temporary) hack to work around traps generated when
 	 * CLFLUSHing APIC registers window.
 	 */
+#if 0
 	TUNABLE_INT_FETCH("hw.clflush_disable", &hw_clflush_disable);
 	if (cpu_vendor_id == CPU_VENDOR_INTEL && !(cpu_feature & CPUID_SS) &&
 	    hw_clflush_disable == -1)
 		cpu_feature &= ~CPUID_CLFSH;
+#endif
 	/*
 	 * Allow to disable CLFLUSH feature manually by
 	 * hw.clflush_disable tunable.  This may help Xen guest on some AMD
 	 * CPUs.
 	 */
+#if 0
 	if (hw_clflush_disable == 1) {
 		cpu_feature &= ~CPUID_CLFSH;
 	}
+#endif
 }

--Multipart_Wed_Nov_11_11:39:18_2009-1--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?7meio5g4yx.wl%kuriyama>