From nobody Fri Apr 05 19:22:49 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 4VB7fx2wv1z5H3HX; Fri, 5 Apr 2024 19:22:49 +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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VB7fx21Knz4mj4; Fri, 5 Apr 2024 19:22:49 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1712344969; 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=S1S6PfMI0qpbYoy1mtxik2j4NX0Rtd/OSB5upWUJ1/U=; b=Un5fMFJFyXUpq7ZUETHmyiIH1qlv9WstNI1HcgPJl7EpCohWPrfjIjogMt2aZ8pzzjaXLu JqyDvq+fuv/rM5UsVIniDpif+oWZzWy2miqC6KSh2Mm1SqgB819MrFm5XQDeGN87kOND9J t5+Y/3RD9Wy/2XATsvKVtEhZr6H1NN4LVQd3bPaGr3X+zPZyPFA73H6y5Tm+JEJ5JKkgUe lCgOhn1B68JzNNQAmvd890lJjBjFJEyPiY1MckaQRRO2QOtYojhmUrNsa6z/Gmk6zB0vSQ T0VSA3vfa48oPFihoW9cuL/g5opzHOh/zbVrLyjzniwt8P8PYtsZ0q4bjEv/8A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1712344969; a=rsa-sha256; cv=none; b=oe+6GJtFCbjAhW3vJWMa1ez2WwctiSIOputNN2q0WmNMuPiXUjKilHlBLknIGV2n7A4WDa hRNIQF1hQBqK7DmrrLgP4G4x5tBH2RsNGeGfj+IEWCDZloiefscNnDOIvmRPJZfV/H49QB CD2p66K1vxPgniRNg3T9Nhf+/Gx0EEwRTd2jY41gcbABronLP+Ry/WQESDeRmRrLO2AIT2 M4utvsAps1z7Gnec2/HDbmabpjlCaGKkm74HP3YGSh1KzNW+sGkwWYAqrkLjyH9ydX7VJr xfwDkzNcNewPFtTHAgQS1Lm14EI4dY+lQRGmflPKJd43Z1HC/wFs8oOeyGmTug== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1712344969; 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=S1S6PfMI0qpbYoy1mtxik2j4NX0Rtd/OSB5upWUJ1/U=; b=hzPyCwICi3TNb7Zz075wcxYz98ZxKYvMD63GXv9lZ//rMb3nx+fs+sJZyZGaalXq8G0irG mjDdMFwPy0Rf5Sv5Z28sDnRsVS+T8WI1fuT5N+QMD3RrOHteCmNLbKVELFQHUTBPCrYIkN WN4upkaxlne+jE86zc59e9GdIN7uYkgtVehkniPcJ08XZV4swI4po4O7XAXSV+wVqWtJ+7 aOm9NnfbG7/O/5qVKUL30V4yg4JrB8Z35YupTunSSUO4s0CUjEn5zJiohpO73XpzurTudh G41ZxlDcZJWr76/UMGD/PBu+/SOyqUtANJUGtSIlWvEKv/btJcnoDRz3GsygKA== 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 4VB7fx1cg0z1CBN; Fri, 5 Apr 2024 19:22:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 435JMnK5003059; Fri, 5 Apr 2024 19:22:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 435JMn0N003056; Fri, 5 Apr 2024 19:22:49 GMT (envelope-from git) Date: Fri, 5 Apr 2024 19:22:49 GMT Message-Id: <202404051922.435JMn0N003056@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Stephen J. Kiernan" Subject: git: 1b60bbfe653f - main - arm64: Separate serror handler to EL1H and EL0 versions. 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: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: stevek X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 1b60bbfe653fb567478ffa8e9fb7478bb8fa3cc6 Auto-Submitted: auto-generated The branch main has been updated by stevek: URL: https://cgit.FreeBSD.org/src/commit/?id=1b60bbfe653fb567478ffa8e9fb7478bb8fa3cc6 commit 1b60bbfe653fb567478ffa8e9fb7478bb8fa3cc6 Author: Stephen J. Kiernan AuthorDate: 2024-04-03 23:38:56 +0000 Commit: Stephen J. Kiernan CommitDate: 2024-04-05 19:22:11 +0000 arm64: Separate serror handler to EL1H and EL0 versions. In order to ensure the registers are saved and restored properly for the exception level, we need separate handlers serror at each of EL1H and EL0. Reviewed by: andrew Differential Revision: https://reviews.freebsd.org/D44630 --- sys/arm64/arm64/exception.S | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/sys/arm64/arm64/exception.S b/sys/arm64/arm64/exception.S index bab71fed4453..41d7e7f7ae1f 100644 --- a/sys/arm64/arm64/exception.S +++ b/sys/arm64/arm64/exception.S @@ -236,6 +236,15 @@ ENTRY(handle_el1h_irq) ERET END(handle_el1h_irq) +ENTRY(handle_el1h_serror) + save_registers 1 + KMSAN_ENTER + mov x0, sp +1: bl do_serror + b 1b + KMSAN_LEAVE +END(handle_el1h_serror) + ENTRY(handle_el0_sync) save_registers 0 KMSAN_ENTER @@ -260,14 +269,14 @@ ENTRY(handle_el0_irq) ERET END(handle_el0_irq) -ENTRY(handle_serror) +ENTRY(handle_el0_serror) save_registers 0 KMSAN_ENTER mov x0, sp 1: bl do_serror b 1b KMSAN_LEAVE -END(handle_serror) +END(handle_el0_serror) ENTRY(handle_empty_exception) save_registers 0 @@ -303,15 +312,15 @@ exception_vectors: vector el1h_sync 1 /* Synchronous EL1h */ vector el1h_irq 1 /* IRQ EL1h */ vempty 1 /* FIQ EL1h */ - vector serror 1 /* Error EL1h */ + vector el1h_serror 1 /* Error EL1h */ vector el0_sync 0 /* Synchronous 64-bit EL0 */ vector el0_irq 0 /* IRQ 64-bit EL0 */ vempty 0 /* FIQ 64-bit EL0 */ - vector serror 0 /* Error 64-bit EL0 */ + vector el0_serror 0 /* Error 64-bit EL0 */ vector el0_sync 0 /* Synchronous 32-bit EL0 */ vector el0_irq 0 /* IRQ 32-bit EL0 */ vempty 0 /* FIQ 32-bit EL0 */ - vector serror 0 /* Error 32-bit EL0 */ + vector el0_serror 0 /* Error 32-bit EL0 */