qemu-devel
[Top][All Lists]
Advanced

[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


From: Bin Meng
Subject: Re: [PATCH] hw/misc/sifive_u_otp: handling the fails of blk_pread and blk_pwrite
Date: Fri, 15 Jan 2021 22:09:29 +0800

On Fri, Jan 15, 2021 at 9:55 PM Peter Maydell <peter.maydell@linaro.org> wrote:
>
> On Fri, 15 Jan 2021 at 13:33, Bin Meng <bmeng.cn@gmail.com> wrote:
> >
> > On Fri, Jan 15, 2021 at 7:50 PM Peter Maydell <peter.maydell@linaro.org> 
> > wrote:
> > >
> > > Ping! This patch was trying to fix a Coverity issue (CID 1435959,
> > > 1435960, 1435961) -- is anybody planning to review it?
> > >
> > > (I'm not entirely sure 'guest error' is the right warning category,
> > > but I don't know the specifics of this device.)
> > >
> >
> > I think we should just use 'printf' instead of log a "guest error"
> > because the guest does nothing wrong.
>
> 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()
...

Regards,
Bin



reply via email to

[Prev in Thread] Current Thread [Next in Thread]