]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
smp_targeted_tlb_shootdown has to pin the CPU on i386
authorAndriy Gapon <avg@FreeBSD.org>
Tue, 25 Jan 2022 10:34:08 +0000 (12:34 +0200)
committerGordon Tetlow <gordon@FreeBSD.org>
Tue, 1 Feb 2022 17:50:43 +0000 (09:50 -0800)
commit1e71fa9e4150431d665ab9a82251aada6933cf4a
tree771d54186d27acec3c70666e088aff35f2375d33
parent432bc9ea6c0cd046e4c87fbc2b9ea1ae779f0aab
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. <thedix@yandex.ru>
Debugged by: Dmitry K. <thedix@yandex.ru>
Tested by: Dmitry K. <thedix@yandex.ru>
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