From owner-svn-src-head@freebsd.org Thu Feb 7 20:58:46 2019 Return-Path: Delivered-To: svn-src-head@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 6D20814C3727; Thu, 7 Feb 2019 20:58:46 +0000 (UTC) (envelope-from andrew@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 1091773140; Thu, 7 Feb 2019 20:58:46 +0000 (UTC) (envelope-from andrew@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 00FA85BE1; Thu, 7 Feb 2019 20:58:46 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x17KwjGJ060322; Thu, 7 Feb 2019 20:58:45 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x17KwjB6060321; Thu, 7 Feb 2019 20:58:45 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201902072058.x17KwjB6060321@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Thu, 7 Feb 2019 20:58:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r343876 - head/sys/arm64/arm64 X-SVN-Group: head X-SVN-Commit-Author: andrew X-SVN-Commit-Paths: head/sys/arm64/arm64 X-SVN-Commit-Revision: 343876 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 1091773140 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.98 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.98)[-0.978,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-0.999,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 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: Thu, 07 Feb 2019 20:58:46 -0000 Author: andrew Date: Thu Feb 7 20:58:45 2019 New Revision: 343876 URL: https://svnweb.freebsd.org/changeset/base/343876 Log: Add missing data barriers after storeing a new valid pagetable entry. When moving from an invalid to a valid entry we don't need to invalidate the tlb, however we do need to ensure the store is ordered before later memory accesses. This is because this later access may be to a virtual address within the newly mapped region. Add the needed barriers to places where we don't later invalidate the tlb. When we do invalidate the tlb there will be a barrier to correctly order this. This fixes a panic on boot on ThunderX2 when INVARIANTS is turned off: panic: vm_fault_hold: fault on nofault entry, addr: 0xffff000040c11000 Reported by: jchandra Tested by: jchandra Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D19097 Modified: head/sys/arm64/arm64/pmap.c Modified: head/sys/arm64/arm64/pmap.c ============================================================================== --- head/sys/arm64/arm64/pmap.c Thu Feb 7 20:50:39 2019 (r343875) +++ head/sys/arm64/arm64/pmap.c Thu Feb 7 20:58:45 2019 (r343876) @@ -2862,6 +2862,7 @@ pmap_update_entry(pmap_t pmap, pd_entry_t *pte, pd_ent /* Create the new mapping */ pmap_load_store(pte, newpte); + dsb(ishst); critical_exit(); intr_restore(intr); @@ -3281,6 +3282,7 @@ validate: } else { /* New mappig */ pmap_load_store(l3, new_l3); + dsb(ishst); } #if VM_NRESERVLEVEL > 0 @@ -3435,6 +3437,7 @@ pmap_enter_l2(pmap_t pmap, vm_offset_t va, pd_entry_t * Map the superpage. */ (void)pmap_load_store(l2, new_l2); + dsb(ishst); atomic_add_long(&pmap_l2_mappings, 1); CTR2(KTR_PMAP, "pmap_enter_l2: success for va %#lx in pmap %p",