[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] xen/riscv: print the actual FID for unsupported vSBI extensions



From: Bruno Verachten <gounthar@xxxxxxxxx>

vsbi_handle_ecall() reports an unsupported extension with
"FID #%lu" and regs->a1, but the SBI calling convention puts the
function ID in a6, already read into fid a few lines up; a1 is the
second argument.  Print fid instead.

The decimal format is kept as the SBI spec refers to function IDs
in decimal (e.g. "FID #3"), which makes the log easy to match
against the spec.

Tested on QEMU with a guest module calling EID 0x0a000000, FID 5,
a1=0x1234: the log read "FID #4660" before and reads "FID #5" now.

Fixes: e717a5a4 ("xen/riscv: introduce vSBI extension framework")
Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Bruno Verachten <gounthar@xxxxxxxxx>
Signed-off-by: Oleksii Kurochko <oleksii.kurochko@xxxxxxxxx>
---
I put my Signed-off-by as I applied some comments mentioned here [1]
before sending it to ML.

[1] https://gitlab.com/xen-project/people/olkur/xen/-/merge_requests/47
---
---
 xen/arch/riscv/vsbi/core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/xen/arch/riscv/vsbi/core.c b/xen/arch/riscv/vsbi/core.c
index f5ded8f6765c..943f73a776f2 100644
--- a/xen/arch/riscv/vsbi/core.c
+++ b/xen/arch/riscv/vsbi/core.c
@@ -42,7 +42,7 @@ void vsbi_handle_ecall(struct cpu_user_regs *regs)
     else
     {
         gprintk(XENLOG_ERR, "Unsupported Guest SBI EID #%#lx, FID #%lu\n",
-                eid, regs->a1);
+                eid, fid);
         ret = SBI_ERR_NOT_SUPPORTED;
     }
 
-- 
2.56.1




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.