Hi Daniel,
On Mon, Jul 28, 2008 at 09:26:57AM -0400, Daniel Veillard wrote:
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 ?
Qemu support host:bus.device syntax
for usb devices (useful for the case
of two identical devices). PCI can work like this too of course.
> <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 this looks better. Actually I thought so already after
sending
the patch.
I think an hypervisor could remap the actual port/addresses
of a device so a target may make sense in the future (or not).
Hopefully it does.
It would be nice if we could do that since we'd then
have the necessary data for easy unmapping.
> 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.
Currently
they're all hex as outputet by lsusb.
[..snip..]
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 :-)
Sure. I'll see what I can
come up with. Thanks for the comments.
-- Guido