From nobody Wed Mar 29 22:38:34 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 4Pn1fy3svwz4203X; Wed, 29 Mar 2023 22:38:34 +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 4Pn1fy3Cv9z43BL; Wed, 29 Mar 2023 22:38:34 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1680129514; 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=T/oloV/6tI24q57gKHWVsgI2UcY+YhSjRKraFmwDVEY=; b=aPrPtKuFK8gioFnzdqmgg7bQraZ8k0uzb/KHhG9VtJP6VVXc3YElhucBg+/zjSGn3IvAjW PFxcMGslSj2jInzuHplAH2zBTSbDD849hoZBB3HFwmwL/ZlvDLOk9DIIHUaIgbBWDafDMs o7gHG+qRFzbkChswmHjHtO8X7TF9JI/z1ybwL6vfTWFv7gtdHyQk6OUGpTFibt6sUmvUI1 yYQ5oWggUbcggMNaMW+N2zKQGZMKiVXgWeG7M1o02p1Kxsy/mgScDbTPUnSTnY4Hzyfi5n kdbpRod34InR5DIrT4iAqbeIJLZLXSoKEEqfSJvu62nvW+3FIzrIpGHxjkFA7Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1680129514; 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=T/oloV/6tI24q57gKHWVsgI2UcY+YhSjRKraFmwDVEY=; b=y2s67KGWfyjdlciU/7MUvXiGAJqwNZuBPD+iGSEkcVHkWAi7b+vw/9MVuUDen9QNclNIRX BB+fjJRaAMcn/BkEKpnChrjfEansFQQLT3iFl156yL2SB+r4wG8dPtFT3vf1oGNbJgJwau BQhyrvG7mjHarD9ELWKf0kxXd6tOyAXEHKK92AcLBH6blj1JDmtNfNAduHr+5dAdtPcQA7 cbU4m+KfDuTp6QLFjTEkqoT9tOhQcmSgpvZyOpMjcsy2mDBs80dRNPzQ9HWBYmlF5dN30a hQvwDSQikTUWV2U2jrw1zFzdga9rOb97XTVYmbgVyl56olC9qUdAhWi8seKQPg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1680129514; a=rsa-sha256; cv=none; b=yV0kmA4Y7ZruiFvoAjZColftUarsBQQQ0+4dZAIy0vm0hAJ3ugY4kbUMgy7YwT/guOJXxV 1JP2jiIqieZNdXfZBb82/DcUW0xrHbpmJStaNtt+KV4uczQnBNaRW1OjqrAFVs76eQfMFk 32aIeXOpQKAiGuGooQmmol8n74wdA1XmLJKjEYERLiMD4Cwo+ZruOiBEUOi1XOxAplo5of 2Ye7XAjZjGh0Ne/rPrE6ywH6EO09ahXCQ7qPiPXWb4BbG/VBY4hlH//qcuVPeNtM3Q6gTQ odWIwqp8vSU4twJGhHg3tReIuwGJa5EPAs7sWnhMsRGomvzRyKLP3H8UJyRUiw== 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 4Pn1fy2BK9zn46; Wed, 29 Mar 2023 22:38:34 +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 32TMcYQ1000155; Wed, 29 Mar 2023 22:38:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 32TMcYGK000154; Wed, 29 Mar 2023 22:38:34 GMT (envelope-from git) Date: Wed, 29 Mar 2023 22:38:34 GMT Message-Id: <202303292238.32TMcYGK000154@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: 738b20a47f73 - stable/13 - amd64 wakeup: recalculate mitigations after APICs are woken 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=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 738b20a47f7379b27ccf7a6d2af2c1bbfa11d05f Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=738b20a47f7379b27ccf7a6d2af2c1bbfa11d05f commit 738b20a47f7379b27ccf7a6d2af2c1bbfa11d05f Author: Konstantin Belousov AuthorDate: 2023-03-28 23:51:44 +0000 Commit: Konstantin Belousov CommitDate: 2023-03-29 22:37:54 +0000 amd64 wakeup: recalculate mitigations after APICs are woken PR: 270489 Approved by: re (cperciva) (cherry picked from commit cd137909c3097fe223ce2b49075eed42a4933bb5) --- 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 */