From: Philipp Hahn Date: Tue, 1 Mar 2011 10:23:20 +0000 (+0100) Subject: domain.rng vs. formatdomain.html#elementsUSB X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=a757e60a076e266e4d9fd9dca69ec43323b89d61;p=libvirt.git domain.rng vs. formatdomain.html#elementsUSB The Relax-NG schema for domains regarding doesn't match what's implemented in src/conf/domain_conf.c#virDomainHostdevDefFormat(): The implementation only requires @type, but the schema currently either required none or all three attributes (@mode, @type, and @managed) to be defined together, because they are declared in the same ). Thus the following minimal -example fails to validate: N 4096 /bin/false linux
The schema is changed to match the current implementation: 1. @mode is optional (which defaults to 'subsystem') 2. @type is required 3. @managed is optional (which defaults to 'no') The documentation is updated to mention @managed. Signed-off-by: Philipp Hahn --- diff --git a/docs/formatdomain.html.in b/docs/formatdomain.html.in index d90c57a3db..d39aee0af1 100644 --- a/docs/formatdomain.html.in +++ b/docs/formatdomain.html.in @@ -954,7 +954,7 @@
   ...
   <devices>
-    <hostdev mode='subsystem' type='pci'>
+    <hostdev mode='subsystem' type='pci' managed='yes'>
       <source>
         <address bus='0x06' slot='0x02' function='0x0'/>
       </source>
@@ -966,9 +966,11 @@
     
hostdev
The hostdev element is the main container for describing - host devices. For usb device passthrough mode is always - "subsystem" and type is "usb" for an USB device and "pci" - for a PCI device.. + host devices. For usb device passthrough mode is always + "subsystem" and type is "usb" for a USB device and "pci" + for a PCI device. When managed is "yes" for a PIC + device, it is detached from the host before being passed on to + the guest.
source
The source element describes the device as seen from the host. The USB device can either be addressed by vendor / product id using the diff --git a/docs/schemas/domain.rng b/docs/schemas/domain.rng index 8b215f35df..21c4380492 100644 --- a/docs/schemas/domain.rng +++ b/docs/schemas/domain.rng @@ -1731,12 +1731,14 @@ capabilities - - - usb - pci - - + + + + usb + pci + + + yes