From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751833AbdITMxE (ORCPT ); Wed, 20 Sep 2017 08:53:04 -0400 Received: from atrey.karlin.mff.cuni.cz ([195.113.26.193]:36556 "EHLO atrey.karlin.mff.cuni.cz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751529AbdITMxD (ORCPT ); Wed, 20 Sep 2017 08:53:03 -0400 Date: Wed, 20 Sep 2017 14:52:58 +0200 From: Pavel Machek To: mingo@kernel.org, bpetkov@suse.de, peterz@infradead.org, bp@alien8.de, tglx@linutronix.de, hpa@zytor.com, luto@kernel.org, torvalds@linux-foundation.org, pmenzel@molgen.mpg.de, linux-kernel@vger.kernel.org Cc: linux-tip-commits@vger.kernel.org Subject: Re: [tip:x86/urgent] x86/mm/32: Load a sane CR3 before cpu_init() on secondary CPUs Message-ID: <20170920125258.GA3716@amd> References: <30cdfea504682ba3b9012e77717800a91c22097f.1505663533.git.luto@kernel.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="ZGiS0Q5IWpPtfppv" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --ZGiS0Q5IWpPtfppv Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun 2017-09-17 11:19:53, tip-bot for Andy Lutomirski wrote: > Commit-ID: 4ba55e65f471d011d3ba2ac2022180ea0877d68e > Gitweb: http://git.kernel.org/tip/4ba55e65f471d011d3ba2ac2022180ea087= 7d68e > Author: Andy Lutomirski > AuthorDate: Sun, 17 Sep 2017 09:03:51 -0700 > Committer: Ingo Molnar > CommitDate: Sun, 17 Sep 2017 18:59:09 +0200 >=20 > x86/mm/32: Load a sane CR3 before cpu_init() on secondary CPUs >=20 > For unknown historical reasons (i.e. Borislav doesn't recall), > 32-bit kernels invoke cpu_init() on secondary CPUs with > initial_page_table loaded into CR3. Then they set > current->active_mm to &init_mm and call enter_lazy_tlb() before > fixing CR3. This means that the x86 TLB code gets invoked while CR3 > is inconsistent, and, with the improved PCID sanity checks I added, > we warn. >=20 > Fix it by loading swapper_pg_dir (i.e. init_mm.pgd) earlier. >=20 > Reported-by: Paul Menzel > Reported-by: Pavel Machek 4.14.0-rc1-next-20170919 does not produce the warning during bootup. Pavel Tested-by: Pavel Machek --=20 (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blo= g.html --ZGiS0Q5IWpPtfppv Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iEYEARECAAYFAlnCZKoACgkQMOfwapXb+vKmcACfecS42a6EU4eDglHzU3Eh7nW5 HLEAoIrJDd2l59bI6eQDfujAxVsN25GY =Hc61 -----END PGP SIGNATURE----- --ZGiS0Q5IWpPtfppv--