From owner-svn-src-all@freebsd.org Wed Aug 15 08:45:05 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 676C8107A026; Wed, 15 Aug 2018 08:45:05 +0000 (UTC) (envelope-from danfe@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [96.47.72.132]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "freefall.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 21E8F807D8; Wed, 15 Aug 2018 08:45:05 +0000 (UTC) (envelope-from danfe@freebsd.org) Received: by freefall.freebsd.org (Postfix, from userid 1033) id 940541D878; Wed, 15 Aug 2018 08:45:04 +0000 (UTC) Date: Wed, 15 Aug 2018 08:45:04 +0000 From: Alexey Dokuchaev To: Konstantin Belousov Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r337773 - in head/sys/amd64: amd64 include Message-ID: <20180815084503.GA96451@FreeBSD.org> References: <201808141637.w7EGbFpZ087559@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201808141637.w7EGbFpZ087559@repo.freebsd.org> User-Agent: Mutt/1.9.5 (2018-04-13) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Aug 2018 08:45:05 -0000 On Tue, Aug 14, 2018 at 04:37:15PM +0000, Konstantin Belousov wrote: > New Revision: 337773 > URL: https://svnweb.freebsd.org/changeset/base/337773 > > Log: > amd64: ensure that curproc->p_vmspace pmap always matches PCPU > curpmap. > > When performing context switch on a machine without PCID, if current > %cr3 equals to the new pmap %cr3, which is typical for kernel_pmap > vs. kernel process, I overlooked to update PCPU curpmap value. Remove > check for %cr3 not equal to pm_cr3 for doing the update. It is > believed that this case cannot happen at all, due to other changes in > this revision. > ... > - } else if (cr3 != pmap->pm_cr3) { > + } else { > load_cr3(pmap->pm_cr3); If this case cannot happen at all, would it make sense to assert it? ./danfe