diff options
author | Ján Tomko <jtomko@redhat.com> | 2015-03-20 10:25:13 +0100 |
---|---|---|
committer | Ján Tomko <jtomko@redhat.com> | 2015-04-15 19:43:43 +0200 |
commit | d833bb0223548ce00f5118d795664974cc791a77 (patch) | |
tree | dbf230c927dd518a8d654598813a6ce20743ac4f | |
parent | 5b08842d96a6af22571af091cb8b216b691e29de (diff) | |
download | libvirt-d833bb0223548ce00f5118d795664974cc791a77.tar.gz |
Document that USB hostdevs do not need nodeDettach
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>
(cherry picked from commit e600a37d276dddf6f5b674328b94b30e10716a99)
Signed-off-by: Ján Tomko <jtomko@redhat.com>
-rw-r--r-- | docs/formatdomain.html.in | 19 | ||||
-rw-r--r-- | tools/virsh.pod | 17 |
2 files changed, 17 insertions, 19 deletions
diff --git a/docs/formatdomain.html.in b/docs/formatdomain.html.in index 0786a4959b..12172a468b 100644 --- a/docs/formatdomain.html.in +++ b/docs/formatdomain.html.in @@ -2962,21 +2962,20 @@ 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 diff --git a/tools/virsh.pod b/tools/virsh.pod index eae91957e2..c879981b65 100644 --- a/tools/virsh.pod +++ b/tools/virsh.pod @@ -2282,7 +2282,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. @@ -2532,15 +2532,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. @@ -2598,8 +2597,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> |