On 12/23/2015 11:01 AM, Ziviani .
wrote:
(Please reply inline rather than top-posting. It makes it much easier to follow the context of the conversation.) What do you mean by "passing the IOMMU group"? Do you mean *just* the iommu group, excluding the information about the devices? This doesn't seem like a good idea, since afaik the iommu group number is something just conjured up by the kernel at boot time, and isn't necessarily predictable or stable between host reboots. Also, it wouldn't allow for assigning only some of the devices/functions in a group while leaving others inactive. I think there are two reasonable possibilities: 1) Follow the apparent path of qemu - accept separate attach calls, one for each function, and use the attach of function 0 as the "action" button that causes all the functions to be attached. 2) Enhance the attach API to accept multiple <hostdev> elements in the XML for a single call, and do "whatever is proper for the current hypervisor" to attach them. As for detach, it's really only possible to detach *all* functions, and it would take more bookkeeping to allowing marking each function for removal and then removing the device when all functions had been marked, so maybe we only allow detach of function 0, and that will always detach everything? (not sure, that's just an idea). As far as I know, nobody is currently working on anything like this for libvirt, so this is your chance to get your hands dirty! (It just occurred to me that method (1) of multifunction attach method outlined above will also need similar extra bookkeeping, just as the "mark each function for removal" detach method would, and this extra bookkeeping would need to survive a restart of libvirtd in the middle of a series of attach/detach calls, making it more complicated, so maybe the 2nd methods would be better. I'd love to hear opinions though.)
|
-- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list