From nobody Thu Mar 30 12:36:03 2023 X-Original-To: dev-commits-src-branches@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 4PnNFH4k8nz42x9T; Thu, 30 Mar 2023 12:36:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (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 (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PnNFH4DH0z3PX4; Thu, 30 Mar 2023 12:36:03 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1680179763; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ajsg9AnaGygWiyBt2PW7vpzldDn17bJRq4vjzNbo1xE=; b=bkwHuh3g/0VxY3GLcndGB93GukK8rOaRT9NUlnFE/gMsg6JJVDbKWVXGQ59wYRW05DeO99 QItTZkRCR/qK1B0PE0IjYncexLTUkxSBmxq8JDrJsG0atlzusPwKg8d9NDxo9odRnrDRh4 814eiWhzDJpBw0A3tPr/ARVoJTZ3DyrEv0+UgCOANjwlntfey1e0m4qUv0+OyO2KdBXlQX zdheCMGyUFj4W9rFeLt2ZNVUkHy+67b+r1qLsSm4kh9oYmUBtKZyBee11dHeGKhVAZDAaN k3CzQJr1E4TMqRuPWkaNO2icCuI2s7nhGcJ0Xvxn6fsny4mA4hffMFzIKZJ5iw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1680179763; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ajsg9AnaGygWiyBt2PW7vpzldDn17bJRq4vjzNbo1xE=; b=tlMJkLV/gdr79eBJhpIyK36FVoFQRY1oe4HGXzsLauCsP6uOpXXOFv7wyjRZQDRQny0B9o XiS4KmFUl3xR32QaYs9AKZihVMaghVOvtYGwpp/5I5DUldEBEfD3vZkBkPDBLEQSwh/1Ow 52aVeh+DHAQ/EavydH0ZVqdhp54nUxCgggYiXpgOjynm2NRITuULvvbVVFkukYIFtLcxR6 jNPqWVzgVsk+24x9rnQ8/YAnh/D1oYS7Kx5L4ianCk+pHUn9SZjaKPw90VDG7KjpQetWlt JfYgf1z3yvcyEKeoyPyFBX/bqVI/H2MVnhMQVG7LZOZk9/MJgErbL4UM9srLqQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1680179763; a=rsa-sha256; cv=none; b=GMEusJhAiXU4ThmJWWU9H+G0qDyXYPdqyINEde6naztXKwUNDtiSgmHNvyNi5nT2UGByMW yHkbSkZVkek9N/zPO+0l5Y/2OMh+StU4nJiIedBloycwChGzwDnZaciVnMMhq4dL1wnEz0 eQnx5gxhQQJWKfmRAkjNFSpl3PbIjJizydIR6CVpWPkrio2sRCU3G5ifGAMWEtHCg++Bjo yUtuw1k7TqhvC23PYf7GkrzwtHKs8YeA3+6+ihtNy4C8PhYpsTLSR4ad1OKNmwfGg4gU+B 4UltlSoMIPwDf+K9kiQBw5C9pk26SF1KoDYS2nRFQ20QkB3URlKSECoerythOA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PnNFH3Ghnz1BZg; Thu, 30 Mar 2023 12:36:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 32UCa3Lu081674; Thu, 30 Mar 2023 12:36:03 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 32UCa3uL081672; Thu, 30 Mar 2023 12:36:03 GMT (envelope-from git) Date: Thu, 30 Mar 2023 12:36:03 GMT Message-Id: <202303301236.32UCa3uL081672@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: 878cd9623c8e - releng/13.2 - amd64 wakeup: recalculate mitigations after APICs are woken List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/releng/13.2 X-Git-Reftype: branch X-Git-Commit: 878cd9623c8eaa747ec27269fec968b33b153e1d Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch releng/13.2 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=878cd9623c8eaa747ec27269fec968b33b153e1d commit 878cd9623c8eaa747ec27269fec968b33b153e1d Author: Konstantin Belousov AuthorDate: 2023-03-28 23:51:44 +0000 Commit: Konstantin Belousov CommitDate: 2023-03-30 12:35:53 +0000 amd64 wakeup: recalculate mitigations after APICs are woken PR: 270489 Approved by: re (cperciva) (cherry picked from commit cd137909c3097fe223ce2b49075eed42a4933bb5) (cherry picked from commit 738b20a47f7379b27ccf7a6d2af2c1bbfa11d05f) --- sys/amd64/acpica/acpi_wakeup.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/sys/amd64/acpica/acpi_wakeup.c b/sys/amd64/acpica/acpi_wakeup.c index 3df4457550d6..62e11f5797f6 100644 --- a/sys/amd64/acpica/acpi_wakeup.c +++ b/sys/amd64/acpica/acpi_wakeup.c @@ -294,19 +294,21 @@ acpi_wakeup_machdep(struct acpi_softc *sc, int state, int sleep_result, * in acpi_sleep_machdep(), after the microcode was * reloaded. Then recalculate the active mitigation * knobs that depend on the microcode and - * cpu_stdext_feature3. + * cpu_stdext_feature3. Do it after LAPICs are woken, + * so that IPIs work. */ identify_cpu_ext_features(); - hw_ibrs_recalculate(true); - hw_ssb_recalculate(true); - amd64_syscall_ret_flush_l1d_recalc(); - x86_rngds_mitg_recalculate(true); mca_resume(); if (vmm_resume_p != NULL) vmm_resume_p(); intr_resume(/*suspend_cancelled*/false); + hw_ibrs_recalculate(true); + amd64_syscall_ret_flush_l1d_recalc(); + hw_ssb_recalculate(true); + x86_rngds_mitg_recalculate(true); + AcpiSetFirmwareWakingVector(0, 0); } else { /* Wakeup MD procedures in interrupt enabled context */