From: Bin Meng <bmeng.cn@gmail.com>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: Alistair Francis <alistair23@gmail.com>,
QEMU Developers <qemu-devel@nongnu.org>,
Green Wan <green.wan@sifive.com>
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 [thread overview]
Message-ID: <CAEUhbmX4GtWfU1Z+cbSb435MCgBo+OaLbSg0qP_mRgPxSJRLnQ@mail.gmail.com> (raw)
In-Reply-To: <CAFEAcA9QrTA6bEiK608HfB9vfN66SGBPJw6pEDDk2YH3v4M8SQ@mail.gmail.com>
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
next prev parent reply other threads:[~2021-01-15 14:26 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-04 9:29 [PATCH] hw/misc/sifive_u_otp: handling the fails of blk_pread and blk_pwrite Green Wan
2021-01-15 11:50 ` Peter Maydell
2021-01-15 13:33 ` Bin Meng
2021-01-15 13:55 ` Peter Maydell
2021-01-15 14:09 ` Bin Meng [this message]
2021-01-15 21:43 ` Alistair Francis
2021-01-15 22:17 ` Peter Maydell
2021-01-15 23:05 ` Alistair Francis
2021-01-15 21:56 ` Alistair Francis
2021-01-15 21:41 ` Alistair Francis
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAEUhbmX4GtWfU1Z+cbSb435MCgBo+OaLbSg0qP_mRgPxSJRLnQ@mail.gmail.com \
--to=bmeng.cn@gmail.com \
--cc=alistair23@gmail.com \
--cc=green.wan@sifive.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).