[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v3 1/2] vfio: Turn the container error into an Error handle
From: |
Peter Xu |
Subject: |
Re: [PATCH v3 1/2] vfio: Turn the container error into an Error handle |
Date: |
Tue, 24 Sep 2019 07:49:28 +0800 |
User-agent: |
Mutt/1.11.4 (2019-03-13) |
On Mon, Sep 23, 2019 at 05:10:43PM -0600, Alex Williamson wrote:
> On Mon, 23 Sep 2019 13:43:08 +0200
> Auger Eric <address@hidden> wrote:
>
> > On 9/23/19 9:51 AM, Peter Xu wrote:
> > > On Mon, Sep 23, 2019 at 08:55:51AM +0200, Eric Auger wrote:
> > >> @@ -1308,9 +1319,9 @@ static int vfio_connect_container(VFIOGroup
> > >> *group, AddressSpace *as,
> > >> &address_space_memory);
> > >> if (container->error) {
> > >> memory_listener_unregister(&container->prereg_listener);
> > >> - ret = container->error;
> > >> - error_setg(errp,
> > >> - "RAM memory listener initialization failed for
> > >> container");
> > >> + ret = -1;
> > >> + error_propagate_prepend(errp, container->error,
> > >> + "RAM memory listener initialization failed: ");
> > >
> > > (I saw that we've got plenty of prepended prefixes for an error
> > > messages. For me I'll disgard quite a few of them because the errors
> > > will directly be delivered to the top level user, but this might be
> > > too personal as a comment)
> > That's true we have a lot of prefix messages.
> >
> > The output message now is:
> >
> > "vfio 0000:89:00.0: failed
> > to setup container for group 2: memory listener initialization failed:
> > Region smmuv3-iommu-memory-region-0-6: device 01.00.0 requires iommu MAP
> > notifier which is not currently supported"
> >
> > Alex, any opinion?
>
> Peter, I don't really understand what the comment is here. Is it the
> number of prepends on the error message? I don't really have an
> opinion on that so long as the end message makes sense. Seems like if
> we're familiar with the error generation it helps to unwind the
> context. Thanks,
True, the only major difference of the error that this series is
working on is that the user can easily trigger this simply by plugging
a device hence I'm not sure whether that's too long (it's not really a
comment and that's why I put it in brackets :). Let's just keep them.
Thanks,
--
Peter Xu
[PATCH v3 2/2] memory: allow memory_region_register_iommu_notifier() to fail, Eric Auger, 2019/09/23