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

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




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.

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

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.