Re: [PATCH v2 1/2] vfio/mdev: add version attribute for mdev device

Cornelia Huck
2019-05-14T11:30:29Z

On Tue, 14 May 2019 12:01:45 +0100
"Dr. David Alan Gilbert" <dgilbert@redhat.com> wrote:

> * Cornelia Huck (cohuck@redhat.com) wrote:
> > On Tue, 14 May 2019 03:47:36 -0400
> > Yan Zhao <yan.y.zhao@intel.com> wrote:

> > > hi Cornelia and Dave,
> > > do you also agree on:
> > > 1. "not to define the specific errno returned for a specific situation,
> > > let the vendor driver decide, userspace simply needs to know that an errno on
> > > read indicates the device does not support migration version comparison and
> > > that an errno on write indicates the devices are incompatible or the target
> > > doesn't support migration versions. "
> > > 2. vendor driver should log detailed error reasons in kernel log.
> >
> > Two questions:
> > - How reasonable is it to refer to the system log in order to find out
> > what exactly went wrong?
> > - If detailed error reporting is basically done to the syslog, do
> > different error codes still provide useful information? Or should the
> > vendor driver decide what it wants to do?
>
> I don't see error codes as being that helpful; if we can't actually get
> an error message back up the stack (which was my preference), then I guess
> syslog is as good as it will get.

Ok, so letting the vendor driver simply return an(y) error and possibly
dumping an error message into the syslog seems to be the most
reasonable approach.