From owner-svn-src-head@freebsd.org Tue May 12 09:31:49 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 79BFD2E8089; Tue, 12 May 2020 09:31:49 +0000 (UTC) (envelope-from avg@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) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49LsyF2gGYz3yLY; Tue, 12 May 2020 09:31:49 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 56D205E43; Tue, 12 May 2020 09:31:49 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 04C9VnAH090636; Tue, 12 May 2020 09:31:49 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 04C9Vn72090635; Tue, 12 May 2020 09:31:49 GMT (envelope-from avg@FreeBSD.org) Message-Id: <202005120931.04C9Vn72090635@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Tue, 12 May 2020 09:31:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r360957 - head/sys/amd64/amd64 X-SVN-Group: head X-SVN-Commit-Author: avg X-SVN-Commit-Paths: head/sys/amd64/amd64 X-SVN-Commit-Revision: 360957 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 May 2020 09:31:49 -0000 Author: avg Date: Tue May 12 09:31:48 2020 New Revision: 360957 URL: https://svnweb.freebsd.org/changeset/base/360957 Log: amd64/pmap: unbreak !NUMA case for fictitious pages A fictitious page can have a physical address beyond the end of the RAM. In the NUMA case there is some special code to handle such pages, but in the other case the pages are handled the same as normal pages. So, we cannot assert that the physical address is within RAM addresses. Suggested by: kib Reviewed by: kib X-MFC note: NUMA support has not been MFC-ed Modified: head/sys/amd64/amd64/pmap.c Modified: head/sys/amd64/amd64/pmap.c ============================================================================== --- head/sys/amd64/amd64/pmap.c Tue May 12 09:04:57 2020 (r360956) +++ head/sys/amd64/amd64/pmap.c Tue May 12 09:31:48 2020 (r360957) @@ -323,12 +323,12 @@ pmap_pku_mask_bit(pmap_t pmap) #endif #undef pa_index +#ifdef NUMA #define pa_index(pa) ({ \ KASSERT((pa) <= vm_phys_segs[vm_phys_nsegs - 1].end, \ ("address %lx beyond the last segment", (pa))); \ (pa) >> PDRSHIFT; \ }) -#ifdef NUMA #define pa_to_pmdp(pa) (&pv_table[pa_index(pa)]) #define pa_to_pvh(pa) (&(pa_to_pmdp(pa)->pv_page)) #define PHYS_TO_PV_LIST_LOCK(pa) ({ \ @@ -340,6 +340,7 @@ pmap_pku_mask_bit(pmap_t pmap) _lock; \ }) #else +#define pa_index(pa) ((pa) >> PDRSHIFT) #define pa_to_pvh(pa) (&pv_table[pa_index(pa)]) #define NPV_LIST_LOCKS MAXCPU