OpenSBI Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Deepak Gupta <debug@rivosinc.com>
To: opensbi@lists.infradead.org
Subject: [PATCH v5 3/4] lib: sbi: sw check exception delegation
Date: Tue, 10 Sep 2024 09:35:21 -0700	[thread overview]
Message-ID: <20240910163522.2584936-4-debug@rivosinc.com> (raw)
In-Reply-To: <20240910163522.2584936-1-debug@rivosinc.com>

zicfiss and zicfilp introduces new exception (cause=18). Delegate this
exception to S mode because cfi violations in U / S will be reported
via this exception.

Signed-off-by: Deepak Gupta <debug@rivosinc.com>
Reviewed-by: Samuel Holland <samuel.holland@sifive.com>
Reviewed-by: Atish Patra <atishp@rivosinc.com>
---
 lib/sbi/sbi_hart.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lib/sbi/sbi_hart.c b/lib/sbi/sbi_hart.c
index e1bc346..fa00f69 100644
--- a/lib/sbi/sbi_hart.c
+++ b/lib/sbi/sbi_hart.c
@@ -207,7 +207,8 @@ static int delegate_traps(struct sbi_scratch *scratch)
 	if (sbi_platform_has_mfaults_delegation(plat))
 		exceptions |= (1U << CAUSE_FETCH_PAGE_FAULT) |
 			      (1U << CAUSE_LOAD_PAGE_FAULT) |
-			      (1U << CAUSE_STORE_PAGE_FAULT);
+			      (1U << CAUSE_STORE_PAGE_FAULT)|
+			      (1U << CAUSE_SW_CHECK_EXCP);
 
 	/*
 	 * If hypervisor extension available then we only handle hypervisor
-- 
2.44.0



  parent reply	other threads:[~2024-09-10 16:35 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-10 16:35 [PATCH v5 0/4] zicfilp and zicfiss support in opensbi Deepak Gupta
2024-09-10 16:35 ` [PATCH v5 1/4] include: adding support for Zicfilp / Zicfiss encodings Deepak Gupta
2024-09-14 16:43   ` Samuel Holland
2024-09-10 16:35 ` [PATCH v5 2/4] lib: sbi: add zicfilp/zicfiss and elp cfi state reflect back in status Deepak Gupta
2024-09-14 17:04   ` Samuel Holland
2024-09-14 17:43     ` Atish Kumar Patra
2024-09-10 16:35 ` Deepak Gupta [this message]
2024-09-14 17:05   ` [PATCH v5 3/4] lib: sbi: sw check exception delegation Samuel Holland
2024-09-10 16:35 ` [PATCH v5 4/4] lib: sbi: fwft: implement landing pad and shadow stack fwft interface Deepak Gupta
2024-09-14 17:07   ` Samuel Holland

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240910163522.2584936-4-debug@rivosinc.com \
    --to=debug@rivosinc.com \
    --cc=opensbi@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox