From nobody Tue Feb 1 19:12:26 2022 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 0B7D41981D48; Tue, 1 Feb 2022 19:12:27 +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 4JpF1Q3qY9z4jPt; Tue, 1 Feb 2022 19:12:26 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1643742746; 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=lYMNjmfceBUv8rHGLFrkOaUC+aPV9ynJgit3M+KXXHU=; b=CETKMGG2x2pHP9kZNkh7rEHBpBg4DnR+6yMuArckhSwat8dkSOGWSVVH9YP4AsFyLBmTa7 xQOERQcaQAJz5dT6Sg7LySomjboi0he5ysMtHzCS2Xs7BtdCtazI5H7eU2wlv9ntA1DRwJ aIabksl1efjcYPScrd7FM4WCNLJH5TNriW3dG87fKNpwwmxsUt5LDD7++91VS1P8S9vLZQ b5ybRnm3SmDjhg5vm+tqY1JuzTGF8tOTeXhtuJ8PBdYzZK6BKmdq3ZQWIhqVRawBRXt0HU TL3uKWkcu+1X0JpMqrCs7/aw0lzCyaItuKthUjiH0zMW2PGMumLPoSrOizhWhA== 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 54D18166E4; Tue, 1 Feb 2022 19:12:26 +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 211JCQkA062860; Tue, 1 Feb 2022 19:12:26 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 211JCQiZ062859; Tue, 1 Feb 2022 19:12:26 GMT (envelope-from git) Date: Tue, 1 Feb 2022 19:12:26 GMT Message-Id: <202202011912.211JCQiZ062859@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Gordon Tetlow Subject: git: 1e71fa9e4150 - releng/12.2 - smp_targeted_tlb_shootdown has to pin the CPU on i386 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: gordon X-Git-Repository: src X-Git-Refname: refs/heads/releng/12.2 X-Git-Reftype: branch X-Git-Commit: 1e71fa9e4150431d665ab9a82251aada6933cf4a Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1643742746; 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=lYMNjmfceBUv8rHGLFrkOaUC+aPV9ynJgit3M+KXXHU=; b=bzr9LDNcwq6sX/fc33K5P4rBkIHVbFmGQNw/5pIfM3x4qwA43bfkWHMUkoXbOrLQy5/hcI WL7N++4HmX7KxNVL/3Z0AHfktllIglXeSezwMZNRX27olke5D0MMhVzKXGUGlpxnpfNcSL 7UpIefJ9rrFZf8JRN2aHUdvVwHTLPi/gZyXeujB2MrB/+GjYS2tgmZmspFgzB58gu34nAO gXjPgfDIfgGSJ29rjExIwEqMyeIDigP7+WHJihFCFJ74jQR/mM5qnZpciEpkjDzSV9Z7CZ Cd8m5GR1/TseNgKLfuoVIuODN1bCAfrI2QxHuewSJCN7qNh4lgCEzRuKRw9zOQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1643742746; a=rsa-sha256; cv=none; b=GmWFL8psprXn32k71Ea3XhWteFiAKeCU0/liRWFig8pN4PG2efQBSeGIa1FydHCdvhHiEB Fbbezyz4xfp1xNE1cRDPGHHMl+mOQRaHoXI6nZ83Y9sUMMxv7itJbroKJ3obfdhCXOjLTB Og4il2dLpyuuyi2vv2JN0GU7FcvqFtGWzuLEuFEGkm9Im9tRqNCThObx6E9HruPtT+8X3w BumM26MR8dn/mbftuZiMS9KZ/h9qZKjlSvc4ALetlY7M54JeouXnQxwif7sYOzQXcGWoUS eRwgYLE2114amRauLNsCoJ/ylLKuE9plPtGyl3VpbwzLeuPAVX/YPW+2yaGPjQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch releng/12.2 has been updated by gordon: URL: https://cgit.FreeBSD.org/src/commit/?id=1e71fa9e4150431d665ab9a82251aada6933cf4a commit 1e71fa9e4150431d665ab9a82251aada6933cf4a Author: Andriy Gapon AuthorDate: 2022-01-25 10:34:08 +0000 Commit: Gordon Tetlow CommitDate: 2022-02-01 17:50:43 +0000 smp_targeted_tlb_shootdown has to pin the CPU on i386 This should fix a regression in 1820ca215461 which happened because pmap -> shootdown contracts on amd64 and i386 diverged. On amd64 the pmap code always pins the CPU before calling the shootdown code and expects it to unpin on return. On i386 the pmap code either has pins and unpins around the shootdown calls or does not pin at all. This change should account for that difference. In main and stable/13 the contracts are also different, but the shootdown code is split into the i386 and amd64 variants and each variant is tailored towards the platform's pmap. PR: 261338 Reported by: Dmitry K. Debugged by: Dmitry K. Tested by: Dmitry K. Fixes: 1820ca215461 MFC r368649 / 3fd989da by kib: amd64 pmap: fix PCID mode invalidations Reviewed by: kib X-Pointyhat to: avg Differential Revision: https://reviews.freebsd.org/D33980 (cherry picked from commit e0cc1ce7c0866d6a5c42ef09cfca9582c4a8343c) Approved by: so Security: FreeBSD-EN-22:08.i386 --- sys/x86/x86/mp_x86.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sys/x86/x86/mp_x86.c b/sys/x86/x86/mp_x86.c index 813c006d4c63..6e7490c94013 100644 --- a/sys/x86/x86/mp_x86.c +++ b/sys/x86/x86/mp_x86.c @@ -1663,6 +1663,10 @@ smp_targeted_tlb_shootdown(cpuset_t mask, u_int vector, pmap_t pmap, uint32_t generation; int cpu; +#ifdef __i386__ + sched_pin(); +#endif + /* * It is not necessary to signal other CPUs while booting or * when in the debugger.