From owner-freebsd-stable@FreeBSD.ORG Thu May 9 14:30:43 2013 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 69459F4E for ; Thu, 9 May 2013 14:30:43 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) by mx1.freebsd.org (Postfix) with ESMTP id D5C16AA1 for ; Thu, 9 May 2013 14:30:42 +0000 (UTC) Received: from tom.home (kostik@localhost [127.0.0.1]) by kib.kiev.ua (8.14.7/8.14.7) with ESMTP id r49EUcAD098519; Thu, 9 May 2013 17:30:38 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.8.3 kib.kiev.ua r49EUcAD098519 Received: (from kostik@localhost) by tom.home (8.14.7/8.14.7/Submit) id r49EUcKx098518; Thu, 9 May 2013 17:30:38 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Thu, 9 May 2013 17:30:38 +0300 From: Konstantin Belousov To: Jim Ohlstein Subject: Re: Apparent regression in r250359 Message-ID: <20130509143038.GV3047@kib.kiev.ua> References: <518A880C.3090906@ohlste.in> <20130509053055.GM3047@kib.kiev.ua> <518BAEFB.5090204@ohlste.in> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="LqgZP5keLUEdlDYR" Content-Disposition: inline In-Reply-To: <518BAEFB.5090204@ohlste.in> User-Agent: Mutt/1.5.21 (2010-09-15) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no version=3.3.2 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on tom.home Cc: freebsd-stable@freebsd.org X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 May 2013 14:30:43 -0000 --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--