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

Re: [Xen-devel] [PATCH] Xen/PCI: correct notifier used for device removal



On 01/02/16 11:58, Jan Beulich wrote:
> Commit 599bad38cf added BUS_NOTIFY_REMOVED_DEVICE in order to allow
> avoiding removal of IOMMU mappings before the driver actually got
> unbound from the device. Naturally we should be using this too.

Because otherwise...?  What happens if we don't make this change?

Removing IOMMU mappings for a device when the driver is still bound to
the device looks wrong to me. Surely the device is still active and may
still be performing DMA at this point?

David

> --- 4.5-rc2/drivers/xen/pci.c
> +++ 4.5-rc2-xen-PCI-remove-notifier/drivers/xen/pci.c
> @@ -185,7 +185,7 @@ static int xen_pci_notifier(struct notif
>       case BUS_NOTIFY_ADD_DEVICE:
>               r = xen_add_device(dev);
>               break;
> -     case BUS_NOTIFY_DEL_DEVICE:
> +     case BUS_NOTIFY_REMOVED_DEVICE:
>               r = xen_remove_device(dev);
>               break;
>       default:
> 
> 
> 


_______________________________________________
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®.