aboutsummaryrefslogtreecommitdiff
path: root/Documentation/block
diff options
context:
space:
mode:
authorAndrew Jones2024-08-07 17:49:44 +0200
committerAnup Patel2024-08-19 08:32:10 +0530
commit6b7b282e6baea06ba65b55ae7d38326ceb79cebf (patch)
tree22df6a241331dc30a3458107d51ae7a6669cd785 /Documentation/block
parent47ac09b91befbb6a235ab620c32af719f8208399 (diff)
RISC-V: KVM: Fix sbiret init before forwarding to userspace
When forwarding SBI calls to userspace ensure sbiret.error is initialized to SBI_ERR_NOT_SUPPORTED first, in case userspace neglects to set it to anything. If userspace neglects it then we can't be sure it did anything else either, so we just report it didn't do or try anything. Just init sbiret.value to zero, which is the preferred value to return when nothing special is specified. KVM was already initializing both sbiret.error and sbiret.value, but the values used appear to come from a copy+paste of the __sbi_ecall() implementation, i.e. a0 and a1, which don't apply prior to the call being executed, nor at all when forwarding to userspace. Fixes: dea8ee31a039 ("RISC-V: KVM: Add SBI v0.1 support") Signed-off-by: Andrew Jones <ajones@ventanamicro.com> Link: https://lore.kernel.org/r/20240807154943.150540-2-ajones@ventanamicro.com Signed-off-by: Anup Patel <anup@brainfault.org>
Diffstat (limited to 'Documentation/block')
0 files changed, 0 insertions, 0 deletions