[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: |
Alex Williamson |
Subject: |
Re: [PATCH v3 1/2] vfio: Turn the container error into an Error handle |
Date: |
Mon, 23 Sep 2019 17:10:43 -0600 |
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,
Alex
[PATCH v3 2/2] memory: allow memory_region_register_iommu_notifier() to fail, Eric Auger, 2019/09/23