From nobody Tue Feb 01 19:12:16 2022 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 C358D1981B0A; Tue, 1 Feb 2022 19:12:17 +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 4JpF1F2LdLz4jP0; Tue, 1 Feb 2022 19:12:17 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1643742737; 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=DPdNsHS8jqbH6aByZcBlL3gGeWMWiv9GuNGEoe/4RPA=; b=dLMZrOLyWwMo3/+U/pJyL4QjnZQ6Ba2PjcAZQi94/bdtcEnTAne/9gUBfsielHPZ6b3Hw1 kuwKnZdEa7p110KcFvaH0IkKcJ8b64Iro5KA7v5ZFRColRGUuaTsVnEh6ButqJlB+tg61D VgOBV8hx036GbwPakBJyAW/zeo7KHhqnJS6DYtqCc1PSF9GSR3mDf6bdEmw7lpNLa5RTq+ wuZC0ww1up8Qh5lhBXqzJgfa5dSFZusslaW0+d9l2aduFHXP2t9TTIeDgomzg6sVdCGJXf nvUjss+401yINGToamDKfVwcjnlr2nj3CGttINFxpXscedvRYu0T4PLkzJvWOg== 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 F03DB16983; Tue, 1 Feb 2022 19:12:16 +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 211JCGXu061821; Tue, 1 Feb 2022 19:12:16 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 211JCGDu061820; Tue, 1 Feb 2022 19:12:16 GMT (envelope-from git) Date: Tue, 1 Feb 2022 19:12:16 GMT Message-Id: <202202011912.211JCGDu061820@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: feac4f1bdf22 - releng/12.3 - smp_targeted_tlb_shootdown has to pin the CPU on i386 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: gordon X-Git-Repository: src X-Git-Refname: refs/heads/releng/12.3 X-Git-Reftype: branch X-Git-Commit: feac4f1bdf22742885fcc94aad5b96e053e93fa9 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1643742737; 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=DPdNsHS8jqbH6aByZcBlL3gGeWMWiv9GuNGEoe/4RPA=; b=qUDnoNpzUutoLFcZLuQHt0Cu3+zUIK4HWn780C0MSyQkeXR6OFaV3XF5OKypRh8gYSHsRX ewzlcdotB+emtwhhaUHEb86y7KAtHCDHoreBPo4PYqhRRbwDMDytfKs47xrKFMh1eYPzON AauKTxcPNodPC6r9aCMDDqdjrR+2k54og6hOckD5p3A5q1rFLvbkf6PisG0u8zA9rj79h8 BVHfzRl5Y2onDl+z9RTWwJAaKzZqVnJ2w0hBHthvHBzuffVJbq+IwpEICC5Eyyna0ivDI4 bNXf8Pzn0R5jKPJmZYnckaGkUWK9i96qPuK19UbutaDVvBmI62UkkrAJPcvLFg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1643742737; a=rsa-sha256; cv=none; b=Fpfbu8hb302vZogbjr5NtDnmMi9socZuSnFetNGbCpdUMfRzSDaJKAF4VvTggfpYAy79G3 Vxtge/P3Lf8h+EmwLiO+/f7aOAC4ogIlIDZcDvARlWEyhiK+h3K5Zs3Okut8VqV+30PEET IDt5jaLRb7a2dNulhQro6SN4U0FAryLB074poUPAm9IZga54PbL40G8QEpZ2/hKPTsXNhh HWcoCJss9PhoXM+X5DBdfsXdx2RU/HE5k3JhbWPt8yqcQcEg694i13WHuyYtv2K6IlYG+b K7Pt9WuKJb8CwZVRmbKSMjwIMaSlEbsutO6Gb44ZS8wr8Vm8Nr/zCiu35n+iMA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch releng/12.3 has been updated by gordon: URL: https://cgit.FreeBSD.org/src/commit/?id=feac4f1bdf22742885fcc94aad5b96e053e93fa9 commit feac4f1bdf22742885fcc94aad5b96e053e93fa9 Author: Andriy Gapon AuthorDate: 2022-01-25 10:34:08 +0000 Commit: Gordon Tetlow CommitDate: 2022-02-01 17:54:53 +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 d7cd50e99eed..571168f65f01 100644 --- a/sys/x86/x86/mp_x86.c +++ b/sys/x86/x86/mp_x86.c @@ -1669,6 +1669,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.