diff mbox series

[for-4.13,v2] docs/xl: Document pci-assignable state

Message ID 20191126154920.2950420-1-george.dunlap@citrix.com (mailing list archive)
State New, archived
Headers show
Series [for-4.13,v2] docs/xl: Document pci-assignable state | expand

Commit Message

George Dunlap Nov. 26, 2019, 3:49 p.m. UTC
Changesets 319f9a0ba9 ("passthrough: quarantine PCI devices") and
ba2ab00bbb ("IOMMU: default to always quarantining PCI devices")
introduced PCI device "quarantine" behavior, but did not document how
the pci-assignable-add and -remove functions act in regard to this.
Rectify this.

Signed-off-by: George Dunlap <george.dunlap@citrix.com>
Release-acked-by: Juergen Gross <jgross@suse.com>
---
Release justification: This brings documentation into line with the
actual code that will be released.

CC: Ian Jackson <ian.jackson@citrix.com>
CC: Wei Liu <wl@xen.org>
CC: Jan Beulich <jbeulich@suse.com>
CC: Paul Durrant <paul@xen.org>
CC: Juergen Gross <jgross@suse.com>
---
 docs/man/xl.1.pod.in | 31 ++++++++++++++++++++++---------
 1 file changed, 22 insertions(+), 9 deletions(-)

Comments

Ian Jackson Nov. 26, 2019, 4:29 p.m. UTC | #1
George Dunlap writes ("[PATCH for-4.13 v2] docs/xl: Document pci-assignable state"):
> Changesets 319f9a0ba9 ("passthrough: quarantine PCI devices") and
> ba2ab00bbb ("IOMMU: default to always quarantining PCI devices")
> introduced PCI device "quarantine" behavior, but did not document how
> the pci-assignable-add and -remove functions act in regard to this.
> Rectify this.
> 
> Signed-off-by: George Dunlap <george.dunlap@citrix.com>
> Release-acked-by: Juergen Gross <jgross@suse.com>

Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Wei Liu Nov. 27, 2019, 10:14 a.m. UTC | #2
On Tue, Nov 26, 2019 at 03:49:20PM +0000, George Dunlap wrote:
> Changesets 319f9a0ba9 ("passthrough: quarantine PCI devices") and
> ba2ab00bbb ("IOMMU: default to always quarantining PCI devices")
> introduced PCI device "quarantine" behavior, but did not document how
> the pci-assignable-add and -remove functions act in regard to this.
> Rectify this.
> 
> Signed-off-by: George Dunlap <george.dunlap@citrix.com>
> Release-acked-by: Juergen Gross <jgross@suse.com>

Once again:

Acked-by: Wei Liu <wl@xen.org>

I will wait a bit before pushing so that Paul has a chance to comment.

Wei.
Paul Durrant Nov. 27, 2019, 10:16 a.m. UTC | #3
On Wed, 27 Nov 2019 at 10:14, Wei Liu <wl@xen.org> wrote:
>
> On Tue, Nov 26, 2019 at 03:49:20PM +0000, George Dunlap wrote:
> > Changesets 319f9a0ba9 ("passthrough: quarantine PCI devices") and
> > ba2ab00bbb ("IOMMU: default to always quarantining PCI devices")
> > introduced PCI device "quarantine" behavior, but did not document how
> > the pci-assignable-add and -remove functions act in regard to this.
> > Rectify this.
> >
> > Signed-off-by: George Dunlap <george.dunlap@citrix.com>
> > Release-acked-by: Juergen Gross <jgross@suse.com>
>
> Once again:
>
> Acked-by: Wei Liu <wl@xen.org>
>
> I will wait a bit before pushing so that Paul has a chance to comment.
>

LGTM.

Reviewed-by: Paul Durrant <paul@xen.org>

> Wei.
diff mbox series

Patch

diff --git a/docs/man/xl.1.pod.in b/docs/man/xl.1.pod.in
index 2303b81e4f..d4b5e8e362 100644
--- a/docs/man/xl.1.pod.in
+++ b/docs/man/xl.1.pod.in
@@ -1589,10 +1589,12 @@  backend driver in domain 0 rather than a real driver.
 =item B<pci-assignable-add> I<BDF>
 
 Make the device at PCI Bus/Device/Function BDF assignable to guests.
-This will bind the device to the pciback driver.  If it is already
-bound to a driver, it will first be unbound, and the original driver
-stored so that it can be re-bound to the same driver later if desired.
-If the device is already bound, it will return success.
+This will bind the device to the pciback driver and assign it to the
+"quarantine domain".  If it is already bound to a driver, it will
+first be unbound, and the original driver stored so that it can be
+re-bound to the same driver later if desired.  If the device is
+already bound, it will assign it to the quarantine domain and return
+success.
 
 CAUTION: This will make the device unusable by Domain 0 until it is
 returned with pci-assignable-remove.  Care should therefore be taken
@@ -1602,11 +1604,22 @@  being used.
 
 =item B<pci-assignable-remove> [I<-r>] I<BDF>
 
-Make the device at PCI Bus/Device/Function BDF not assignable to guests.  This
-will at least unbind the device from pciback.  If the -r option is specified,
-it will also attempt to re-bind the device to its original driver, making it
-usable by Domain 0 again.  If the device is not bound to pciback, it will
-return success.
+Make the device at PCI Bus/Device/Function BDF not assignable to
+guests.  This will at least unbind the device from pciback, and
+re-assign it from the "quarantine domain" back to domain 0.  If the -r
+option is specified, it will also attempt to re-bind the device to its
+original driver, making it usable by Domain 0 again.  If the device is
+not bound to pciback, it will return success.
+
+Note that this functionality will work even for devices which were not
+made assignable by B<pci-assignable-add>.  This can be used to allow
+dom0 to access devices which were automatically quarantined by Xen
+after domain destruction as a result of Xen's B<iommu=quarantine>
+command-line default.
+
+As always, this should only be done if you trust the guest, or are
+confident that the particular device you're re-assigning to dom0 will
+cancel all in-flight DMA on FLR.
 
 =item B<pci-attach> I<domain-id> I<BDF>