From owner-freebsd-stable@FreeBSD.ORG Thu May 9 17:17:31 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 8E2D7795 for ; Thu, 9 May 2013 17:17:31 +0000 (UTC) (envelope-from jim@ohlste.in) Received: from mail-qc0-x230.google.com (mail-qc0-x230.google.com [IPv6:2607:f8b0:400d:c01::230]) by mx1.freebsd.org (Postfix) with ESMTP id 50C9936E for ; Thu, 9 May 2013 17:17:31 +0000 (UTC) Received: by mail-qc0-f176.google.com with SMTP id a11so1788593qcx.35 for ; Thu, 09 May 2013 10:17:30 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:message-id:date:from:user-agent:mime-version:to:cc :subject:references:in-reply-to:content-type :content-transfer-encoding:x-gm-message-state; bh=uKmMTvtLjf/vL7ctedV0oCttek01T0yp9pn7ESDck10=; b=ahgN2OLLdPLZY1Y4e1KQ7LyjMDC8CzoL8LG+WiyC2WuhddstTXeKu6UXKXNdMISiGz B2xqCEVObT0M+O5qQGYXZ++Vr0BpECTIeoVSzIt0fdqNd8ZBu64U1kfcJkO37Yu+EUVo pOPLEYqNO8CigD/Kg/E1tRt6cT68cKiT9qhtswdq/QARrlYc+UWtNQwMZM35uQhFHB8y Af/BtcYO/XcRSnhwI2ebx3DKYnqCRo8MxyaohvApRLpLRAPTEgPcVRD5XqeywDcW4ZW4 wxT3PHnTYwk+oRI/UhqSFHo6D5XNH04PBNGC0iDaAo9c8gJVSqQmivoAzDNWij80mhb5 aFTQ== X-Received: by 10.49.82.45 with SMTP id f13mr10413107qey.53.1368119850778; Thu, 09 May 2013 10:17:30 -0700 (PDT) Received: from [192.168.1.10] (pool-74-110-99-189.nrflva.fios.verizon.net. [74.110.99.189]) by mx.google.com with ESMTPSA id c7sm3368515qel.2.2013.05.09.10.17.29 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 09 May 2013 10:17:30 -0700 (PDT) Message-ID: <518BDA28.20603@ohlste.in> Date: Thu, 09 May 2013 13:17:28 -0400 From: Jim Ohlstein User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:17.0) Gecko/20130405 Thunderbird/17.0.5 MIME-Version: 1.0 To: Konstantin Belousov Subject: Re: Apparent regression in r250359 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> In-Reply-To: <20130509160433.GW3047@kib.kiev.ua> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Gm-Message-State: ALoCoQmh3AiHJ6hDGaxQRBa1us0AyJz/TtDRtLya06VshtUBqRZqD/6U/d+Cnc4kXDi+tfiBD2Yb 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 17:17:31 -0000 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