From nobody Mon Oct 21 12:24:12 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XXDy45mGwz5YwnL; Mon, 21 Oct 2024 12:24:12 +0000 (UTC) (envelope-from git@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XXDy44zwdz4DVD; Mon, 21 Oct 2024 12:24:12 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729513452; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ZwFxGKu4EOZEbcEsSvZqp+BDx7Vt2g7qnHqZqTOjYLU=; b=gB3aV+7hkuAe9FkvMdevSt0y1TYJ1mpR31y150jo7VloT3kT7E8B2PN2QDfpzPD18GcXPV P+6t8ylfmoAidiEdpFpQxS0CsaaqAisox+RsYZQeKIgXsz+d5Pjc+GW/65a74hO1APNobs Uc6GWPFp3iApk1K0bWlwkHT7p5L4fGNOdh/jflIdbiPtmX0Xr5YYyHv8uedNd/J4RKgNUp FK7csZGJRLX3xS1ABZLfjqvvA3th9S9tyzrGPoERNc5ink8PCwjNfr/SOMCnDZukviHxwh HjAl+ftxSjZWXvWh/TZsdpq6Qay2LBtIz/R+AcBkOJFpbXScI96XSSeIncoigw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729513452; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ZwFxGKu4EOZEbcEsSvZqp+BDx7Vt2g7qnHqZqTOjYLU=; b=fOlHXtvVdI3lfWqtxPMHhEowDZIj9zH5T0WeAVNpfmQtjHD/aifqFGzliAiDReO1Ug7pw6 FaBdKwDZvQpPc6rCwydpHto2QdBmVFC7SyNYDgR2p7vFOx6Cgg/O5W8IWtpSmrxfEJXgZj 11rb3kWP+ntqH4byDJDsfcU6V1MG04Lx6HySARDWXEwOVw8otgBKjY0GUgJxCulKpmg0Dg 0Y48U+2TWKz5vjudLXbQHevCz6Ajbp0z69poMkwHnMZmVNGcGjpEgZ1/WSqfN3w6/VCyXn gHRlV1uBbMj45vcAWe7nfQNIviCqq45kM/A0t0jfNTWmCnu5r1EFXPNmJrItRQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729513452; a=rsa-sha256; cv=none; b=cNdYwX3qpBrDn09GTpbNsv8UH+iJDFOdKqZosPR85nbCN2sENCHVQEMZvFTn0jMiS1RijI p7FjnO1VfVpiDNHe3ZRq/DfIbsAxQy14fjdSovGEaYlWhI+sTpTbY/uZ0aIxZsB3ZbCXOy cAMqPpHmO64qbQOidrDd4UDWoo7qgenV03B069vl/fh5xUI2Jp/GFui3+57pvao+CU0Sd2 1sT2ALUlwmqKCoDH9nNz3dTXdVDpcNcu3NyqXxlBgF9aR2Uesxded01eeMjQ0L0r3uUPSK 0XSGpLX2IdGKpbHnYQ3YXtLlkEy45EhL/NZbOr/R7SAa52D0R4NKAq8lobbojg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XXDy44HJkzVr3; Mon, 21 Oct 2024 12:24:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49LCOCV4048736; Mon, 21 Oct 2024 12:24:12 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49LCOCtp048733; Mon, 21 Oct 2024 12:24:12 GMT (envelope-from git) Date: Mon, 21 Oct 2024 12:24:12 GMT Message-Id: <202410211224.49LCOCtp048733@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Andrew Turner Subject: git: 9d3dc1e5e0b0 - main - arm64: Remove VPIPT I-cache support from pmap List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: andrew X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 9d3dc1e5e0b0c59e1cc473953a8c509779685c2a Auto-Submitted: auto-generated The branch main has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=9d3dc1e5e0b0c59e1cc473953a8c509779685c2a commit 9d3dc1e5e0b0c59e1cc473953a8c509779685c2a Author: Andrew Turner AuthorDate: 2024-10-18 09:15:43 +0000 Commit: Andrew Turner CommitDate: 2024-10-21 12:23:15 +0000 arm64: Remove VPIPT I-cache support from pmap The VPIPT I-cache policy has been removed from the architecture. Remove support for it from pmap. The vmm side was not imported so calls to pmap_invalidate_vpipt_icache would cause the kernel to branch to a NULL pointer. Reviewed by: imp Sponsored by: Arm Ltd Differential Revision: https://reviews.freebsd.org/D47116 --- sys/arm64/arm64/pmap.c | 25 ++++++++++--------------- sys/arm64/include/pmap.h | 1 - 2 files changed, 10 insertions(+), 16 deletions(-) diff --git a/sys/arm64/arm64/pmap.c b/sys/arm64/arm64/pmap.c index 10aa7f6bfb5c..17e34888282a 100644 --- a/sys/arm64/arm64/pmap.c +++ b/sys/arm64/arm64/pmap.c @@ -409,7 +409,6 @@ SYSCTL_INT(_vm_pmap_vmid, OID_AUTO, epoch, CTLFLAG_RD, &vmids.asid_epoch, 0, "The current epoch number"); void (*pmap_clean_stage2_tlbi)(void); -void (*pmap_invalidate_vpipt_icache)(void); void (*pmap_stage2_invalidate_range)(uint64_t, vm_offset_t, vm_offset_t, bool); void (*pmap_stage2_invalidate_all)(uint64_t); @@ -9076,20 +9075,16 @@ pmap_stage2_fault(pmap_t pmap, uint64_t esr, uint64_t far) ptep = pmap_pte(pmap, far, &lvl); fault_exec: if (ptep != NULL && (pte = pmap_load(ptep)) != 0) { - if (icache_vmid) { - pmap_invalidate_vpipt_icache(); - } else { - /* - * If accessing an executable page invalidate - * the I-cache so it will be valid when we - * continue execution in the guest. The D-cache - * is assumed to already be clean to the Point - * of Coherency. - */ - if ((pte & ATTR_S2_XN_MASK) != - ATTR_S2_XN(ATTR_S2_XN_NONE)) { - invalidate_icache(); - } + /* + * If accessing an executable page invalidate + * the I-cache so it will be valid when we + * continue execution in the guest. The D-cache + * is assumed to already be clean to the Point + * of Coherency. + */ + if ((pte & ATTR_S2_XN_MASK) != + ATTR_S2_XN(ATTR_S2_XN_NONE)) { + invalidate_icache(); } pmap_set_bits(ptep, ATTR_AF | ATTR_DESCR_VALID); rv = KERN_SUCCESS; diff --git a/sys/arm64/include/pmap.h b/sys/arm64/include/pmap.h index c9552ebc326a..8bdb4cf025e3 100644 --- a/sys/arm64/include/pmap.h +++ b/sys/arm64/include/pmap.h @@ -172,7 +172,6 @@ int pmap_fault(pmap_t, uint64_t, uint64_t); struct pcb *pmap_switch(struct thread *); extern void (*pmap_clean_stage2_tlbi)(void); -extern void (*pmap_invalidate_vpipt_icache)(void); extern void (*pmap_stage2_invalidate_range)(uint64_t, vm_offset_t, vm_offset_t, bool); extern void (*pmap_stage2_invalidate_all)(uint64_t);