From owner-svn-src-all@freebsd.org Fri Nov 8 04:26:19 2019 Return-Path: Delivered-To: svn-src-all@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 D62A81A6A92; Fri, 8 Nov 2019 04:26:19 +0000 (UTC) (envelope-from jhibbits@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 478Rzb5Kj6z3MSf; Fri, 8 Nov 2019 04:26:19 +0000 (UTC) (envelope-from jhibbits@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 9B31E20B25; Fri, 8 Nov 2019 04:26:19 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id xA84QJKG046506; Fri, 8 Nov 2019 04:26:19 GMT (envelope-from jhibbits@FreeBSD.org) Received: (from jhibbits@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id xA84QJrM046505; Fri, 8 Nov 2019 04:26:19 GMT (envelope-from jhibbits@FreeBSD.org) Message-Id: <201911080426.xA84QJrM046505@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhibbits set sender to jhibbits@FreeBSD.org using -f From: Justin Hibbits Date: Fri, 8 Nov 2019 04:26:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r354527 - head/sys/powerpc/booke X-SVN-Group: head X-SVN-Commit-Author: jhibbits X-SVN-Commit-Paths: head/sys/powerpc/booke X-SVN-Commit-Revision: 354527 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 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: Fri, 08 Nov 2019 04:26:19 -0000 Author: jhibbits Date: Fri Nov 8 04:26:19 2019 New Revision: 354527 URL: https://svnweb.freebsd.org/changeset/base/354527 Log: powerpc/booke: Only handle kernel page faults in KVA range The memory range between VM_MAXUSER_ADDRESS and VM_MIN_KERNEL_ADDRESS is reserved for devices currently, which are always mapped in TLB1, and therefore do not exist in the kernel page table. Any page fault in this range is therefore automatically a fatal fault. Modified: head/sys/powerpc/booke/trap_subr.S Modified: head/sys/powerpc/booke/trap_subr.S ============================================================================== --- head/sys/powerpc/booke/trap_subr.S Fri Nov 8 03:45:13 2019 (r354526) +++ head/sys/powerpc/booke/trap_subr.S Fri Nov 8 04:26:19 2019 (r354527) @@ -713,6 +713,15 @@ INTERRUPT(int_data_tlb_error) mtcr %r21 bt 17, search_failed /* check MSR[PR] */ +#ifdef __powerpc64__ + srdi %r21, %r31, 48 + cmpldi cr0, %r21, VM_MIN_KERNEL_ADDRESS@highest +#else + lis %r21, VM_MIN_KERNEL_ADDRESS@h + cmplw cr0, %r31, %r21 +#endif + blt search_failed + search_kernel_pmap: /* Load r26 with kernel_pmap address */ bl 1f