xen/riscv: print the actual FID for unsupported vSBI extensions
PATCH 1/1 xen/riscv: print the actual FID for unsupported vSBI extensions
From: Bruno Verachten <[email protected]>
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.
---
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(-)
xen/arch/riscv/vsbi/core.c +1 -1
@@ -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 ; }
Signature · 1 line
2.56.1
Quoted 7 lines · Oleksii Kurochko
From: Bruno Verachten <[email protected]>
vsbi_handle_ecall()reports an unsupported extension with "FID #%lu" andregs->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.
Quoted 8 lines
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")
Nit: Too few hash digits here; wants to be 12: e717a5a4ae52. Will adjust when committing.
Quoted 3 lines
Assisted-by Claude:claude-opus-5-5Signed-off-by Bruno Verachten <[email protected]>Signed-off-by Oleksii Kurochko <[email protected]>
Quoted 2 lines
I put my Signed-off-by as I applied some comments mentioned here [1] before sending it to ML.
I think even if you didn't make any change, you'd still need to add it.
Jan
Quoted 9 lines
vsbi_handle_ecall()reports an unsupported extension with "FID #%lu" andregs->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.
Quoted 8 lines
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-5Signed-off-by Bruno Verachten <[email protected]>Signed-off-by Oleksii Kurochko <[email protected]>
Nit (style): the commit message doesn't use the full 80-column width allowed. I know it is a very small nit, but it can hurt readability. Here is a version that uses the full width, feel free to skip it:
``` 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. ```
Anyway lgtm, thanks!
Signature · 1 line
Baptiste Le Duc <[email protected]>
A message that is not in the archive (sent off-list or not yet received): 179629350509.1868145.13014400447586218384.b4-review@b4
Quoted 12 lines · Baptiste Le Duc
Quoted 12 lines
vsbi_handle_ecall()reports an unsupported extension with "FID #%lu" andregs->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.
Quoted 7 lines
Quoted 5 lines
Fixes e717a5a4 ("xen/riscv: introduce vSBI extension framework")Assisted-by Claude:claude-opus-5-5Signed-off-by Bruno Verachten <[email protected]>Signed-off-by Oleksii Kurochko <[email protected]>Nit (style): the commit message doesn't use the full 80-column width allowed. I know it is a very small nit, but it can hurt readability.
According to sending-patches is it 75 char max sorry for the confusion. 80 is for the subject line.