]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/libvirt.git/commitdiff
Document that USB hostdevs do not need nodeDettach
authorJán Tomko <jtomko@redhat.com>
Fri, 20 Mar 2015 09:25:13 +0000 (10:25 +0100)
committerJán Tomko <jtomko@redhat.com>
Wed, 25 Mar 2015 07:42:21 +0000 (08:42 +0100)
The virNodeDeviceDettach API only works on PCI devices.

Originally added by commit 10d3272e, but the API never
supported USB devices.

Reported by: Martin Polednik <mpolednik@redhat.com>

docs/formatdomain.html.in
tools/virsh.pod

index 82aa14f3f487b7268cb2f0f1b39f0e57b8398010..7766c5e2fcb4e2a45e926e736760bfacf1801925 100644 (file)
         with additional attributes noted.
         <dl>
           <dt>usb</dt>
-          <dd>For USB devices, the user is responsible to call
-            <code>virNodeDeviceDettach</code> (or
-            <code>virsh nodedev-detach</code>) before starting the guest
-            or hot-plugging the device and <code>virNodeDeviceReAttach</code>
-            (or <code>virsh nodedev-reattach</code>) after hot-unplug or
-            stopping the guest.
+          <dd>USB devices are detached from the host on guest startup
+            and reattached after the guest exits or the device is
+            hot-unplugged.
           </dd>
           <dt>pci</dt>
           <dd>For PCI devices, when <code>managed</code> is "yes" it is
             detached from the host before being passed on to the guest
             and reattached to the host after the guest exits. If
-            <code>managed</code> is omitted or "no", follow the steps
-            described for a USB device to detach before starting the
-            guest or hot-plugging and reattach after stopping the guest
-            or hot-unplug.
+            <code>managed</code> is omitted or "no", the user is
+            responsible to call <code>virNodeDeviceDetachFlags</code>
+            (or <code>virsh nodedev-detach</code> before starting the guest
+            or hot-plugging the device and <code>virNodeDeviceReAttach</code>
+            (or <code>virsh nodedev-reattach</code>) after hot-unplug or
+            stopping the guest.
           </dd>
           <dt>scsi</dt>
           <dd>For SCSI devices, user is responsible to make sure the device
index 8262a45b9bd0015aa86ce4e8c969ad38f2a30fe1..4d825c17710f54f060dbc3c8e356bab3fad6fbf6 100644 (file)
@@ -2385,7 +2385,7 @@ attach taking effect the next time libvirt starts the domain.
 For cdrom and floppy devices, this command only replaces the media
 within an existing device; consider using B<update-device> for this
 usage.  For passthrough host devices, see also B<nodedev-detach>,
-needed if the device does not use managed mode.
+needed if the PCI device does not use managed mode.
 
 If I<--live> is specified, affect a running domain.
 If I<--config> is specified, affect the next startup of a persistent domain.
@@ -2646,15 +2646,14 @@ L<http://libvirt.org/formatnode.html>.
 
 Passthrough devices cannot be simultaneously used by the host and its
 guest domains, nor by multiple active guests at once.  If the
-<hostdev> description includes the attribute B<managed='yes'>, and the
-hypervisor driver supports it, then the device is in managed mode, and
+<hostdev> description of a PCI device includes the attribute B<managed='yes'>,
+and the hypervisor driver supports it, then the device is in managed mode, and
 attempts to use that passthrough device in an active guest will
 automatically behave as if B<nodedev-detach> (guest start, device
 hot-plug) and B<nodedev-reattach> (guest stop, device hot-unplug) were
-called at the right points (currently, qemu does this for PCI devices,
-but not USB).  If a device is not marked as managed, then it must
-manually be detached before guests can use it, and manually reattached
-to be returned to the host.  Also, if a device is manually detached,
+called at the right points.  If a PCI device is not marked as managed,
+then it must manually be detached before guests can use it, and manually
+reattached to be returned to the host.  Also, if a device is manually detached,
 then the host does not regain control of the device without a matching
 reattach, even if the guests use the device in managed mode.
 
@@ -2712,8 +2711,8 @@ I<cap> and I<--tree> are mutually exclusive.
 
 Declare that I<nodedev> is no longer in use by any guests, and that
 the host can resume normal use of the device.  This is done
-automatically for devices in managed mode, but must be done explicitly
-to match any explicit B<nodedev-detach>.
+automatically for PCI devices in managed mode and USB devices, but
+must be done explicitly to match any explicit B<nodedev-detach>.
 
 =item B<nodedev-reset> I<nodedev>