From nobody Tue Jan 25 10:39:06 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 0BEC51977D19; Tue, 25 Jan 2022 10:39:07 +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 4JjjyL6yQ3z3qlp; Tue, 25 Jan 2022 10:39:06 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1643107147; 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=SXTAeGGoi7AARs0UCUBv9iFI2oetqgUiDQyNWBDXrJI=; b=o/KvRNWMmWYEg2rTYZ9VlKJzyY6zmU9QP+DASGQKaYXw8cH1/5LSuVGIAH7IEdI1olJFov 7QfLYjSLiFDEkVX+H85HTqCawmiXmVXGypdlXRhuVJueoKFvLfzIUh/bpG+wqy6GBswzte mnwuQMOBCBCr8x8FDcFigZWOfjpb8KDnedKv31rHw5ex1HlXbDojgAaG3+oTAg5KE4W1m7 0bjAUlPjgeth/yETbwABcJWM0QxwLTzUklIHeP+ZJbatydHe/kkvlgaSJEJIHE2rxhRnzI rDWrA+v54eDFQyD6FDtBKcKGa5AokA2tWrPd3if76uv6Tr2TdPyq3GRgrLgibA== 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 CF2D8199; Tue, 25 Jan 2022 10:39:06 +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 20PAd6af066210; Tue, 25 Jan 2022 10:39:06 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 20PAd6FX066209; Tue, 25 Jan 2022 10:39:06 GMT (envelope-from git) Date: Tue, 25 Jan 2022 10:39:06 GMT Message-Id: <202201251039.20PAd6FX066209@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Andriy Gapon Subject: git: e0cc1ce7c086 - stable/12 - 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: avg X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: e0cc1ce7c0866d6a5c42ef09cfca9582c4a8343c Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1643107147; 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=SXTAeGGoi7AARs0UCUBv9iFI2oetqgUiDQyNWBDXrJI=; b=g8D1BBSw25rMwioq7vYdqhyc7WOU7PNQnUFGVq8+vxbo62ZyqXUrrYLsTyOQ20nMGxeawy E2j1MvSpOVCi5MM3FTHX2ytIXT29irh9fZI7vLdb4wWp93SKF2luin3N4CtaHE1b5jbXfG wU/vhqhTgB6EFEMiGNnYIhW35O081mj0wEXOlOnB+24SXE2yghh1KKGBOQXDLtCn46sbcQ oEvd09y1OMRwxguImsX8ipYdHW88LamcOTjXx41+BV/UThPMXKho5nh7yh7we6oERfvdvg KBh9R1tJ0LWt3pqKQHiVAPM9AZJY+m+3F3yjeAy+rYnYU4uZErs1ztxXmjfFyg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1643107147; a=rsa-sha256; cv=none; b=iT5ovvT5JbIdTHIwoLWdYu1GhNKyiu5S0jD69d5uo2QDI2Bx36zoN3C3rpWgm5tikWKJt3 AlwehcSRRTS4dXYLwHTYCzRulBPVWNI6XzA5x7jwYpBbroaJtwbOb9dZbdFWUAzTmipQL2 JdPiL5BCAl3T/8dNGcydnKyshPkYC68xPETZOXP21eo0RF/zSQaQ5gEvY5IwX+oOEKxGfd H4nh5SMXZUtKhH8e/NC3sV7N7FJuvuTpk68DQrj4iC5ZjnWGLQcPH/7E5Y585nhq/0wqMt PmPbBfEKQshQDYQCNL8Qt2cmw42lGFDDAl/S/vhVvtUZN1Psd4CztLUVlHDy9g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/12 has been updated by avg: URL: https://cgit.FreeBSD.org/src/commit/?id=e0cc1ce7c0866d6a5c42ef09cfca9582c4a8343c commit e0cc1ce7c0866d6a5c42ef09cfca9582c4a8343c Author: Andriy Gapon AuthorDate: 2022-01-25 10:34:08 +0000 Commit: Andriy Gapon CommitDate: 2022-01-25 10:34:08 +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 --- 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 2108d448bb9a..57cea8c7a07a 100644 --- a/sys/x86/x86/mp_x86.c +++ b/sys/x86/x86/mp_x86.c @@ -1678,6 +1678,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.