Re: [PATCH v8] target/riscv/kvm/kvm-cpu.c: kvm_riscv_handle_sbi() fail with vendor-specific SBI

2024-06-26 Thread Andrew Jones
On Tue, Jun 25, 2024 at 06:02:54PM GMT, Alexei Filippov wrote: > kvm_riscv_handle_sbi() may return not supported return code to not > trigger qemu abort with vendor-specific sbi. > > Add new error path to provide proper error in case of > qemu_chr_fe_read_all() may not return sizeof(ch), because

[PATCH v8] target/riscv/kvm/kvm-cpu.c: kvm_riscv_handle_sbi() fail with vendor-specific SBI

2024-06-25 Thread Alexei Filippov
kvm_riscv_handle_sbi() may return not supported return code to not trigger qemu abort with vendor-specific sbi. Add new error path to provide proper error in case of qemu_chr_fe_read_all() may not return sizeof(ch), because exactly zero just means we failed to read input, which can happen, so