From owner-freebsd-stable@FreeBSD.ORG Fri May 10 19:26:24 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 733275D9 for ; Fri, 10 May 2013 19:26:24 +0000 (UTC) (envelope-from dg@pki2.com) Received: from btw.pki2.com (btw.pki2.com [IPv6:2001:470:a:6fd::2]) by mx1.freebsd.org (Postfix) with ESMTP id 1EFF729C for ; Fri, 10 May 2013 19:26:24 +0000 (UTC) Received: from btw.pki2.com (btw.pki2.com [192.168.23.1]) by btw.pki2.com (8.14.6/8.14.5) with ESMTP id r4AJQGgx059755 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Fri, 10 May 2013 12:26:18 -0700 (PDT) (envelope-from dg@pki2.com) Date: Fri, 10 May 2013 12:26:16 -0700 (PDT) From: Dennis Glatting X-X-Sender: dennisg@btw.pki2.com To: Jim Ohlstein Subject: Re: Apparent regression in r250359 In-Reply-To: <518BDA28.20603@ohlste.in> Message-ID: References: <518A880C.3090906@ohlste.in> <20130509053055.GM3047@kib.kiev.ua> <518BAEFB.5090204@ohlste.in> <20130509143038.GV3047@kib.kiev.ua> <518BC3E4.1030104@ohlste.in> <20130509160433.GW3047@kib.kiev.ua> <518BDA28.20603@ohlste.in> User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-yoursite-MailScanner-Information: Dennis Glatting X-yoursite-MailScanner-ID: r4AJQGgx059755 X-yoursite-MailScanner: Found to be clean X-MailScanner-From: dg@pki2.com Cc: Konstantin Belousov , 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: Fri, 10 May 2013 19:26:24 -0000 This patch works on one of my 9.1 systems in addition to my CURRENT system. On Thu, 9 May 2013, Jim Ohlstein wrote: > On 05/09/13 12:04, Konstantin Belousov wrote: >> On Thu, May 09, 2013 at 11:42:28AM -0400, Jim Ohlstein wrote: >>> On 05/09/13 10:30, Konstantin Belousov wrote: >>>> 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. >>> >>> Same error >>> >>>> >>>> As another workaround, which does not disable AVX support, you >>>> could try loader tunable hw.xsave_mask=0x7. >>> >>> This works >> >> Hm, I see another bug in the next line as well. Could you try this >> updated patch ? > > This does work. > >> >> diff --git a/sys/amd64/amd64/fpu.c b/sys/amd64/amd64/fpu.c >> index de79baa..9bc8a2f 100644 >> --- a/sys/amd64/amd64/fpu.c >> +++ b/sys/amd64/amd64/fpu.c >> @@ -687,8 +687,8 @@ 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; >> - if ((*xstate_bv & bit) != 0) >> + bit = 1ULL << i; >> + if ((xsave_mask & bit) == 0 || (*xstate_bv & bit) != >> 0) >> continue; >> bcopy((char *)fpu_initialstate + >> xsave_area_desc[i].offset, >> > > > -- > Jim Ohlstein > _______________________________________________ > freebsd-stable@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-stable > To unsubscribe, send any mail to "freebsd-stable-unsubscribe@freebsd.org" >