qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] xen-pt: Fix bug cause PCI devices re-attach fai


From: Li, Liang Z
Subject: Re: [Qemu-devel] [PATCH] xen-pt: Fix bug cause PCI devices re-attach failed
Date: Wed, 15 Apr 2015 14:14:35 +0000

> On 13/04/2015 16:12, Liang Li wrote:
> >     2. Do the attach and detach operation with a time interval. eg. 10s.
> >
> >     The error message will not  disappear if retry, in this case, it's
> >     a bug.
> >
> > In the 'xen_pt_region_add' and 'xen_pt_region_del', we should only
> > care about the 'xen-pci-pt-*' memory region, this can avoid the
> > region's reference count is not equal with the dereference count when
> > the device is detached and prevent the device's related QemuOpts
> > object from being released properly, and then trigger the bug when the
> > device is re-attached.
> 
> This doesn't explain _which_ region is causing the bug and how.

Please ignore this patch, because I have some new findings and this patch is 
not correct, 
I will send a new patch later.

> 
> Assuming this is the right fix, should you instead move the
> memory_region_ref/unref pair from xen_pt_region_add/del after this
> conditional:
> 
>     if (bar == -1 && (!s->msix || &s->msix->mmio != mr)) {
>         return;
>     }
> 
> in xen_pt_region_update?
>
> Paolo

Yes,  it's the right place. Put aside the bug fix,  I think the 
memory_region_ref/unref pair
 should be move to xen_pt_region_update after the conditional as you point out.
 Do you think so?

Liang




reply via email to

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