Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 9 May 2013 17:30:38 +0300
From:      Konstantin Belousov <kostikbel@gmail.com>
To:        Jim Ohlstein <jim@ohlste.in>
Cc:        freebsd-stable@freebsd.org
Subject:   Re: Apparent regression in r250359
Message-ID:  <20130509143038.GV3047@kib.kiev.ua>
In-Reply-To: <518BAEFB.5090204@ohlste.in>
References:  <518A880C.3090906@ohlste.in> <20130509053055.GM3047@kib.kiev.ua> <518BAEFB.5090204@ohlste.in>

next in thread | previous in thread | raw e-mail | index | archive | help

--LqgZP5keLUEdlDYR
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

On Thu, May 09, 2013 at 10:13:15AM -0400, Jim Ohlstein wrote:
> # sysctl hw.model
> hw.model: AMD FX(tm)-8350 Eight-Core Processor
Ahh, so it seems that this is a CPU with the LWP.
Please try the patch at the end of message.

As another workaround, which does not disable AVX support, you
could try loader tunable hw.xsave_mask=0x7.

> #0  0x00007ffffffff1e3 in ?? ()
> (gdb) info registers
> rax            0x16     22
> rbx            0x101    257
> rcx            0x7ffffffff1e3   140737488351715
> rdx            0x7fffffffc980   140737488341376
> rsi            0x1      1
> rdi            0x7fffffffc980   140737488341376
> rbp            0x7fffffffd000   0x7fffffffd000
> rsp            0x7fffffffc968   0x7fffffffc968
> r8             0x0      0
> r9             0x19     25
> r10            0x50     80
> r11            0x203    515
> r12            0x801460400      34381104128
> r13            0x0      0
> r14            0x7fffffffcfb0   140737488342960
> r15            0x7fffffffcfd0   140737488342992
> rip            0x7ffffffff1e3   0x7ffffffff1e3
> eflags         0x10203  66051
> cs             0x43     67
> ss             0x3b     59
> ds             0x0      0
> es             0x0      0
> fs             0x0      0
> gs             0x0      0
> (gdb) x/2xg 0x7fffffffc980+0x300
> 0x7fffffffcc80: 0x00007fffffffcd40      0x00000000000001c0
> (gdb) x/8xg 0x00007fffffffcd40
> 0x7fffffffcd40: 0xffffffffffffffff      0x0000000000000000
> 0x7fffffffcd50: 0x0000000000000000      0x0000000000000000
> 0x7fffffffcd60: 0x0000000000000000      0x0000000000000000
> 0x7fffffffcd70: 0x0000000000000000      0x0000000000000000

> (kgdb) x/1xw use_xsave
> 0x1:	Error accessing memory address 0x1: Bad address.
> (kgdb) x/1xg xsave_mask
> 0x4000000000000007:	Error accessing memory address 0x4000000000000007: Bad address.

diff --git a/sys/amd64/amd64/fpu.c b/sys/amd64/amd64/fpu.c
index de79baa..61ce94d 100644
--- a/sys/amd64/amd64/fpu.c
+++ b/sys/amd64/amd64/fpu.c
@@ -687,7 +687,7 @@ fpugetregs(struct thread *td)
 		    offsetof(struct xstate_hdr, xstate_bv));
 		max_ext_n = flsl(xsave_mask);
 		for (i = 0; i < max_ext_n; i++) {
-			bit = 1 << i;
+			bit = 1ULL << i;
 			if ((*xstate_bv & bit) != 0)
 				continue;
 			bcopy((char *)fpu_initialstate +

--LqgZP5keLUEdlDYR
Content-Type: application/pgp-signature

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.19 (FreeBSD)

iQIcBAEBAgAGBQJRi7MOAAoJEJDCuSvBvK1BM0EP/iWHYSQvKMpSECKu24cpLx4w
LQxdbbOApdJ0rR10Cd95Gjrt1MoaXoEyM/UHreHTR96q1HVftl74eeo3aLKcujVi
tcBQibdPyTII+FpEkKiVfk29zN1kbZX7bdZRadCJ85jhWNbB7USynvVQoeJWVWjP
qn9O4GVYjDmvMzp0SVkyjklN4RCtzCMNwMRNyYVGXlw0/G+MB2vjnEQAajRX5d7K
FP4B5YWlg7IspFPApTli3c0qG3FU5PzGP5jZAD9kRtcvIQ4dX2QgEH/jiynllI96
xCjxySbxkTKUH7uRbNdoAJnYMLKKmBk0LGF1bTgY0gqOLcwL+xoaLAkIGDPojQbX
sMRtb2IwOA1Ee/o9OEC+iDx+21/yhKMOpeOeoqSaqMrdOrfn3cYHBRP65JTRHCWv
DgGaNTT9cjkIp2i5P/6HGZv+P5PLV21Pf/Vw4w0lLk0Mt9IRB3IPlUDiR2QorK88
kkDYVCQhYkoITFBEb47RSZpGQIRDev42hg8VwXYoT/EwD78vyWJDhJKBmwUZESNs
3WZABtZRwYAq/VoWzSq3DbhqKUbhKe2bKLObYk4w/TvqTBJZGLs4bk7/zDPoC9lF
4Y+nRPMzYOMLPB93t2L9V1Tq7JDL63iBWNkZCIyD9sRjBsHElTojCKCUQhvXUHUk
NHosNUtdGluM4Ak9XBM2
=scO1
-----END PGP SIGNATURE-----

--LqgZP5keLUEdlDYR--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20130509143038.GV3047>