Re: [RFC 06/12] Add USB companion controllers support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, Aug 21, 2011 at 10:01:17PM +0300, Marc-André Lureau wrote:
> Companion controllers take an extra 'master' attribute to associate
> them.
> ---
>  docs/formatdomain.html.in                          |   20 +++++++++
>  docs/schemas/domain.rng                            |   15 +++++++
>  src/conf/domain_conf.c                             |   44 ++++++++++++++++++++
>  src/conf/domain_conf.h                             |   18 ++++++++
>  src/qemu/qemu_command.c                            |    7 +++
>  .../qemuxml2argv-usb-ich9-companion.args           |    6 +++
>  .../qemuxml2argv-usb-ich9-companion.xml            |   30 +++++++++++++
>  tests/qemuxml2argvtest.c                           |    5 ++
>  8 files changed, 145 insertions(+), 0 deletions(-)
>  create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-usb-ich9-companion.args
>  create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-usb-ich9-companion.xml
> 
> diff --git a/docs/formatdomain.html.in b/docs/formatdomain.html.in
> index 0a383f6..5c232fa 100644
> --- a/docs/formatdomain.html.in
> +++ b/docs/formatdomain.html.in
> @@ -1243,6 +1243,26 @@
>        sub-element.
>      </p>
>  
> +    <p>
> +      USB companion controllers have an optional
> +      sub-element <code>&lt;master&gt;</code> to specify the exact
> +      relationship of the companion to its master controller.
> +    </p>
> +
> +<pre>
> +  ...
> +  &lt;devices&gt;
> +    &lt;controller type='usb' index='0' model='ich9-ehci1'&gt;
> +      &lt;address type='pci' domain='0' bus='0' slot='4' function='7'/&gt;
> +    &lt;/controller&gt;
> +    &lt;controller type='usb' index='1' model='ich9-uhci1'&gt;
> +      &lt;master bus='0' startport='0'/&gt;
> +      &lt;address type='pci' domain='0' bus='0' slot='4' function='0'/&gt;
> +    &lt;/controller&gt;


The 'index' attribute on controllers is used to link up to the
PCI/USB/Drive address on individual devices.

This example suggests that each companion controller is a new
bus for devices to link upto, but they don't actually work
this way. All devices will always link directly to the echi
controller, regardless of any companions. So we should not
be incrementing the 'index' for the companions.

Also, although I suggested it IIRC, we should not in fact
have a 'bus' attribute on the <master> element, since it
is already implied by the 'index' attribute on the <controller>
All we need todo is have

  <master startport='0'/>

to show that its a slave companion, not a new bus.

Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]