[libvirt] RFC: Check if the host device is assignable earlier

Eric Blake eblake at redhat.com
Mon Sep 24 16:32:53 UTC 2012


On 09/23/2012 10:29 PM, Osier Yang wrote:
> Hi,
> 
> I think we already got enough bugs which are about "try to assign
> a host device, then it fails for not assignable", clearly this
> "try and then fails" approach is not nice.
> 
> The reason for not assignable can be various. E.g.
> 
>   * IOMMU or AMD-V is not enabled/supported
> 
>   * platform doesn't support interrupt remapping
> 
> There is no checking for above reasons now, an assignment will
> get error till the qemu process started. It's nice if checking
> it much earlier, and list whether the host supports device
> assignment as a property of capabilities?

Yes, failing earlier if it can be proven that the passthrough will not
ever succeed seems worthwhile.

> It will also be nice if one could known what devices are assignable
> (list all assignable devices? this needs to enumerate and try
> to unbind/reset/restore the devices, which is not desireable, as
> it could breaks work on host, such as NIC). Or whether a device is
> assignable (this shouldn't cause any problem when doing checking,
> because it's the requested operation, one knowns what he does).
> 
> Assuming a new API to determine whether a host device is assignable

Why would we need a new API?  We can already get at each
virNodeDevicePtr (see 'virsh nodedev-list') and learn about each device
(see 'virsh nodedev-dumpxml'); this seems like something that you would
just add an addditional XML element to that existing API instead of
needing a new API.

-- 
Eric Blake   eblake at redhat.com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 617 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20120924/0fac6054/attachment-0001.sig>


More information about the libvir-list mailing list