From nobody Wed Mar 29 12:56:38 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Pmmll5GTNz42WmK; Wed, 29 Mar 2023 12:56:51 +0000 (UTC) (envelope-from manu@bidouilliste.com) Received: from mx.blih.net (mx.blih.net [212.83.155.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "mx.blih.net", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Pmmlj74Yyz4F96; Wed, 29 Mar 2023 12:56:49 +0000 (UTC) (envelope-from manu@bidouilliste.com) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=bidouilliste.com header.s=mx header.b=npmimdPb; spf=pass (mx1.freebsd.org: domain of manu@bidouilliste.com designates 212.83.155.74 as permitted sender) smtp.mailfrom=manu@bidouilliste.com; dmarc=pass (policy=none) header.from=bidouilliste.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bidouilliste.com; s=mx; t=1680094602; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=BmzEcU2kRKQQir2qK6Loz/pYKppoCx911zUA7NX8j9A=; b=npmimdPbfMFUhI015XcLhfMM3UZRRJIaKdENHxiATEoaymyNbVuWStpaD6J02JAIiboQ+b lda41wytwFaGx/TZm8MFRNvm0i3qcj/nOsDomTGTiUpLPQBDs5GENvqCl+5FVhyuRgqX3K oNcVzOtJtiDT+YgHbvffVT2ZZu+rBX8= Received: from skull.home.blih.net (lfbn-lyo-1-2174-135.w90-66.abo.wanadoo.fr [90.66.97.135]) by mx.blih.net (OpenSMTPD) with ESMTPSA id d5180fbf (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Wed, 29 Mar 2023 12:56:42 +0000 (UTC) Date: Wed, 29 Mar 2023 14:56:38 +0200 From: Emmanuel Vadot To: Konstantin Belousov Cc: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: Re: git: 02904a06c76b - main - amd64: properly recalculate mitigations knobs after resume Message-Id: <20230329145638.18b68be35ea83cf5455db7bf@bidouilliste.com> In-Reply-To: <202303181540.32IFeR0r052611@gitrepo.freebsd.org> References: <202303181540.32IFeR0r052611@gitrepo.freebsd.org> X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.33; amd64-portbld-freebsd14.0) List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spamd-Result: default: False [-3.50 / 15.00]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_SHORT(-1.00)[-1.000]; DMARC_POLICY_ALLOW(-0.50)[bidouilliste.com,none]; MV_CASE(0.50)[]; R_SPF_ALLOW(-0.20)[+ip4:212.83.155.74/32]; R_DKIM_ALLOW(-0.20)[bidouilliste.com:s=mx]; MIME_GOOD(-0.10)[text/plain]; ASN(0.00)[asn:12876, ipnet:212.83.128.0/19, country:FR]; FROM_EQ_ENVFROM(0.00)[]; MLMMJ_DEST(0.00)[dev-commits-src-main@FreeBSD.org,dev-commits-src-all@FreeBSD.org]; DKIM_TRACE(0.00)[bidouilliste.com:+]; MIME_TRACE(0.00)[0:+]; RCVD_VIA_SMTP_AUTH(0.00)[]; TO_DN_SOME(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; FREEFALL_USER(0.00)[manu]; ARC_NA(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; RCVD_TLS_ALL(0.00)[] X-Rspamd-Queue-Id: 4Pmmlj74Yyz4F96 X-Spamd-Bar: --- X-ThisMailContainsUnwantedMimeParts: N Hi kib, On Sat, 18 Mar 2023 15:40:27 GMT Konstantin Belousov wrote: > The branch main has been updated by kib: > > URL: https://cgit.FreeBSD.org/src/commit/?id=02904a06c76be857307b78184863654b9e7b88ab > > commit 02904a06c76be857307b78184863654b9e7b88ab > Author: Konstantin Belousov > AuthorDate: 2023-03-17 13:02:03 +0000 > Commit: Konstantin Belousov > CommitDate: 2023-03-18 15:40:05 +0000 > > amd64: properly recalculate mitigations knobs after resume > > Revision r333125 AKA 986c4ca38772f72 forced clear cpu_stdext_feature3 > on suspend, since at that time microcode update was not reloaded > early on resume. Then, revision 050f5a8405c63 started re-reading > cpu_stdext_feature3 again. Since modern CPUs do not require mitigations > from the Skylake era, this went unnoticed for some time. > > Keep zeroing cpu_stdext_feature3 on suspend, but re-read it in more > controlled way on resume after microcode is reloaded, and recalculate > active workarounds based on actual microcode capabilities. > > Reported and tested by: romain > Reviewed by: emaste, markj > Sponsored by: The FreeBSD Foundation > MFC after: 1 week > Differential revision: https://reviews.freebsd.org/D39146 > --- > sys/amd64/acpica/acpi_wakeup.c | 14 ++++++++++++++ > sys/amd64/amd64/initcpu.c | 2 +- > 2 files changed, 15 insertions(+), 1 deletion(-) So this one actually break suspend/resume (likely resume judging by the led) on my whiskeylake laptop (i7-8665U). It doesn't seems to affect my machine with a i5-9400F cpu, nor my skylake machine with a i7-6770HQ cpu. Any hints ? Cheers, -- Emmanuel Vadot