Skip to content

Commit 22d8f64

Browse files
committed
fix(riscv/sbi): populate return value field
This commit ensures the return value is written to the a1 vCPU register. Previously, the register was always written with an uninitialized value, often defaulting to zero. Signed-off-by: João Peixoto <[email protected]>
1 parent 375a17e commit 22d8f64

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/arch/riscv/sbi.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -405,6 +405,7 @@ static struct sbiret sbi_bao_handler(unsigned long fid)
405405
struct sbiret ret;
406406

407407
ret.error = hypercall(fid);
408+
ret.value = (long int)vcpu_readreg(cpu()->vcpu, REG_A1);
408409

409410
return ret;
410411
}

0 commit comments

Comments
 (0)