* [PATCH] Xen/PCI: correct notifier used for device removal
@ 2016-02-01 11:58 Jan Beulich
0 siblings, 0 replies; 10+ messages in thread
From: Jan Beulich @ 2016-02-01 11:58 UTC (permalink / raw)
To: David Vrabel, Boris Ostrovsky, Konrad Rzeszutek Wilk
Cc: xen-devel, linux-kernel
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.
Signed-off-by: Jan Beulich <jbeulich@suse.com>
---
drivers/xen/pci.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- 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:
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] Xen/PCI: correct notifier used for device removal
2016-02-01 13:03 ` David Vrabel
(?)
(?)
@ 2016-02-01 13:08 ` Jan Beulich
-1 siblings, 0 replies; 10+ messages in thread
From: Jan Beulich @ 2016-02-01 13:08 UTC (permalink / raw)
To: David Vrabel
Cc: xen-devel, Boris Ostrovsky, Konrad Rzeszutek Wilk, linux-kernel
>>> On 01.02.16 at 14:03, <david.vrabel@citrix.com> wrote:
> On 01/02/16 12:16, Jan Beulich wrote:
>>>>> On 01.02.16 at 13:01, <david.vrabel@citrix.com> wrote:
>>> 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?
>>
>> Exactly - you answered your own question (as does the commit
>> referred to).
>
> I misread, sorry. I think I will reword this as:
>
> "Commit 599bad38cf added BUS_NOTIFY_REMOVED_DEVICE to defer the removal
> of IOMMU mappings until the driver has been unbound from the device
> (i.e., until it is guaranteed that there are no outstanding DMA
> transactions).
If you want this, then I think you should add "... or IRQs".
Thanks, Jan
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] Xen/PCI: correct notifier used for device removal
2016-02-01 13:03 ` David Vrabel
(?)
@ 2016-02-01 13:08 ` Jan Beulich
-1 siblings, 0 replies; 10+ messages in thread
From: Jan Beulich @ 2016-02-01 13:08 UTC (permalink / raw)
To: David Vrabel; +Cc: xen-devel, Boris Ostrovsky, linux-kernel
>>> On 01.02.16 at 14:03, <david.vrabel@citrix.com> wrote:
> On 01/02/16 12:16, Jan Beulich wrote:
>>>>> On 01.02.16 at 13:01, <david.vrabel@citrix.com> wrote:
>>> 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?
>>
>> Exactly - you answered your own question (as does the commit
>> referred to).
>
> I misread, sorry. I think I will reword this as:
>
> "Commit 599bad38cf added BUS_NOTIFY_REMOVED_DEVICE to defer the removal
> of IOMMU mappings until the driver has been unbound from the device
> (i.e., until it is guaranteed that there are no outstanding DMA
> transactions).
If you want this, then I think you should add "... or IRQs".
Thanks, Jan
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] Xen/PCI: correct notifier used for device removal
2016-02-01 12:16 ` Jan Beulich
@ 2016-02-01 13:03 ` David Vrabel
0 siblings, 0 replies; 10+ messages in thread
From: David Vrabel @ 2016-02-01 13:03 UTC (permalink / raw)
To: Jan Beulich
Cc: xen-devel, Boris Ostrovsky, Konrad Rzeszutek Wilk, linux-kernel
On 01/02/16 12:16, Jan Beulich wrote:
>>>> On 01.02.16 at 13:01, <david.vrabel@citrix.com> wrote:
>> 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?
>
> Exactly - you answered your own question (as does the commit
> referred to).
I misread, sorry. I think I will reword this as:
"Commit 599bad38cf added BUS_NOTIFY_REMOVED_DEVICE to defer the removal
of IOMMU mappings until the driver has been unbound from the device
(i.e., until it is guaranteed that there are no outstanding DMA
transactions).
Naturally we should be using this too."
David
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] Xen/PCI: correct notifier used for device removal
@ 2016-02-01 13:03 ` David Vrabel
0 siblings, 0 replies; 10+ messages in thread
From: David Vrabel @ 2016-02-01 13:03 UTC (permalink / raw)
To: Jan Beulich; +Cc: xen-devel, Boris Ostrovsky, linux-kernel
On 01/02/16 12:16, Jan Beulich wrote:
>>>> On 01.02.16 at 13:01, <david.vrabel@citrix.com> wrote:
>> 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?
>
> Exactly - you answered your own question (as does the commit
> referred to).
I misread, sorry. I think I will reword this as:
"Commit 599bad38cf added BUS_NOTIFY_REMOVED_DEVICE to defer the removal
of IOMMU mappings until the driver has been unbound from the device
(i.e., until it is guaranteed that there are no outstanding DMA
transactions).
Naturally we should be using this too."
David
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] Xen/PCI: correct notifier used for device removal
2016-02-01 12:01 ` David Vrabel
2016-02-01 12:16 ` Jan Beulich
@ 2016-02-01 12:16 ` Jan Beulich
2016-02-01 13:03 ` David Vrabel
1 sibling, 1 reply; 10+ messages in thread
From: Jan Beulich @ 2016-02-01 12:16 UTC (permalink / raw)
To: David Vrabel
Cc: xen-devel, Boris Ostrovsky, Konrad Rzeszutek Wilk, linux-kernel
>>> On 01.02.16 at 13:01, <david.vrabel@citrix.com> wrote:
> 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?
Exactly - you answered your own question (as does the commit
referred to).
Jan
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] Xen/PCI: correct notifier used for device removal
2016-02-01 12:01 ` David Vrabel
@ 2016-02-01 12:16 ` Jan Beulich
2016-02-01 12:16 ` Jan Beulich
1 sibling, 0 replies; 10+ messages in thread
From: Jan Beulich @ 2016-02-01 12:16 UTC (permalink / raw)
To: David Vrabel; +Cc: xen-devel, Boris Ostrovsky, linux-kernel
>>> On 01.02.16 at 13:01, <david.vrabel@citrix.com> wrote:
> 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?
Exactly - you answered your own question (as does the commit
referred to).
Jan
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] Xen/PCI: correct notifier used for device removal
2016-02-01 11:58 Jan Beulich
@ 2016-02-01 12:01 ` David Vrabel
2016-02-01 12:16 ` Jan Beulich
2016-02-01 12:16 ` Jan Beulich
2016-02-01 12:01 ` David Vrabel
1 sibling, 2 replies; 10+ messages in thread
From: David Vrabel @ 2016-02-01 12:01 UTC (permalink / raw)
To: Jan Beulich, Boris Ostrovsky, Konrad Rzeszutek Wilk
Cc: xen-devel, linux-kernel
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:
>
>
>
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] Xen/PCI: correct notifier used for device removal
2016-02-01 11:58 Jan Beulich
2016-02-01 12:01 ` David Vrabel
@ 2016-02-01 12:01 ` David Vrabel
1 sibling, 0 replies; 10+ messages in thread
From: David Vrabel @ 2016-02-01 12:01 UTC (permalink / raw)
To: Jan Beulich, Boris Ostrovsky, Konrad Rzeszutek Wilk
Cc: xen-devel, linux-kernel
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:
>
>
>
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH] Xen/PCI: correct notifier used for device removal
@ 2016-02-01 11:58 Jan Beulich
2016-02-01 12:01 ` David Vrabel
2016-02-01 12:01 ` David Vrabel
0 siblings, 2 replies; 10+ messages in thread
From: Jan Beulich @ 2016-02-01 11:58 UTC (permalink / raw)
To: David Vrabel, Boris Ostrovsky, Konrad Rzeszutek Wilk
Cc: xen-devel, linux-kernel
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.
Signed-off-by: Jan Beulich <jbeulich@suse.com>
---
drivers/xen/pci.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- 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:
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2016-02-01 13:12 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-02-01 11:58 [PATCH] Xen/PCI: correct notifier used for device removal Jan Beulich
-- strict thread matches above, loose matches on Subject: below --
2016-02-01 11:58 Jan Beulich
2016-02-01 12:01 ` David Vrabel
2016-02-01 12:16 ` Jan Beulich
2016-02-01 12:16 ` Jan Beulich
2016-02-01 13:03 ` David Vrabel
2016-02-01 13:03 ` David Vrabel
2016-02-01 13:08 ` Jan Beulich
2016-02-01 13:08 ` Jan Beulich
2016-02-01 12:01 ` David Vrabel
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.