[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] hw/misc/sifive_u_otp: handling the fails of blk_pread and bl
Re: [PATCH] hw/misc/sifive_u_otp: handling the fails of blk_pread and blk_pwrite
Fri, 15 Jan 2021 22:17:16 +0000
On Fri, 15 Jan 2021 at 21:43, Alistair Francis <firstname.lastname@example.org> wrote:
> On Fri, Jan 15, 2021 at 6:09 AM Bin Meng <email@example.com> wrote:
> > On Fri, Jan 15, 2021 at 9:55 PM Peter Maydell <firstname.lastname@example.org>
> > wrote
> > > printf is definitely the wrong thing... you need to either report
> > > the error back to the guest if the interface the guest is using
> > > has a facility for reporting read/write failures, or log or report
> > > it to the user using one of our APIs for that.
> > It seems the hardware does not have a mechanism to report to the
> > software when hardware cannot fulfill the task requested by software.
> > I checked all existence of block_pwrite() callers. It looks like this
> > is not handled consistently. Some indeed call printf(), some call
> > error_setg_errno(), some call fprintf(stderr), some call qemu_log()
> > ...
> Logging a guest error seems like the best bet, I'm not really sure
> what else we would do.
Looking at the other options, I think error_report() of some kind is
probably the best bet here.
Re: [PATCH] hw/misc/sifive_u_otp: handling the fails of blk_pread and blk_pwrite, Alistair Francis, 2021/01/15