Re: [libvirt] [PATCH/RFC]: hostdev passthrough support

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

 



On Fri, Jul 25, 2008 at 04:17:30PM -0400, Guido Günther wrote:
> Hi,
> attached is some basic support for host device passthrough. It enables
> you to passthrough usb devices in qemu/kvm via:
> 
> <devices>
>  <hostdev type='usb' vendor='0204' product='6025'/>

  you meant type='pci' there right ?

>  <hostdev type='usb' bus='001' device='007'/>
> </devices>

  Hum, on the format level I think this need a bit more discussion.
the type is better caracterized as a bus informations.
Also I'm not sure if we should keep a flat single element or 
(expecting possible further complex descriptions later) go for a 
more structured description like

  <hostdev type='pci'>
    <source vendor='0204' product='6025'/>
  </hostdev>

I think an hypervisor could remap the actual port/addresses
of a device so a target may make sense in the future (or not).


> I didn't implement unplug yet since this needs some modifications to
> qemu/kvm to be able to identify the correct device to unplug.
> Does this look reasonable?

  I also think we need to clarify the naming conventions, are numbers
provided decimal, if yes then is an 0x hexadecimal version allowed too.
I also see how a more high level description might be useful, 

  <hostdev type='usb'>
    <source vendor='Sennheiser'/>
  </hostdev>

or 

  <hostdev type='usb'>
    <source product='headset'/>
  </hostdev>
  
in that case this means that libvirt has some lookup to do, but in the
end the XML format becomes more portable which is an important property IMHO.

  From an implementation perspective, the patch looks very clean to me
aside maybe some Hostdev type vs. Bus naming for the enum, but maybe we need
to give a bit more thoughs one the format first :-)

Daniel

-- 
Red Hat Virtualization group http://redhat.com/virtualization/
Daniel Veillard      | virtualization library  http://libvirt.org/
veillard@xxxxxxxxxx  | libxml GNOME XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine  http://rpmfind.net/

--
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]