Mailing List Archive

PCI.get_all_records
Hi,

The Xen-Orchestra team where trying to implement a system that allowed you to add attached pci devices to any VM that the host can use. Normally this is done by using LSPCI to get the PCI ID and then passing this through to a VM using the xe other config command. Now, as far as XO can determine, the pci.get_all_records() should get a list of all pci devices attached to the host, but instead is simply lists only any attached gpu and not the rest of the devices such as USB, other pci devices etc. Is pci.get_all_records() the right api command to list all devices attached to the host, or is there no way to do what LSPCI does from the console using XenAPI?

Thanks,

Chris
Re: PCI.get_all_records [ In reply to ]
> The Xen-Orchestra team where trying to implement a system that allowed you to add attached pci devices to any VM that the host can use.  Normally this is done by using LSPCI to get the PCI ID and then passing this through to a VM using the xe other config > command.  Now, as far as XO can determine, the pci.get_all_records() should get a list of all pci devices attached to the host, but instead is simply lists only any attached gpu and not the rest of the devices such as USB, other pci devices etc.
> Is pci.get_all_records() the right api command to list all devices attached to the host, or is there no way to do what LSPCI does from the console using XenAPI?

Hi Chris, when creating PCI objects xapi filters the output of lspci to only create objects for display devices [1] [2], as this is the only class of device for which xapi supports passthrough via the "official" API (VGPUs, GPU groups etc.).

To passthrough other classes of device, at the moment you'll have to query the PCI devices some other way (e.g. with lspci) and then use the other_config method.

[1] https://github.com/xapi-project/xen-api/blob/master/ocaml/xapi/xapi_pci.ml#L26
[2] https://github.com/xapi-project/xen-api/blob/master/ocaml/xapi/xapi_pci.ml#L128

_______________________________________________
Xen-api mailing list
Xen-api@lists.xen.org
http://lists.xen.org/cgi-bin/mailman/listinfo/xen-api
Re: PCI.get_all_records [ In reply to ]
Hi John,

Thanks. So the PCI aspects of the API only expose the supported functions, which in this case are gpus, vgpus etc. as you have stated? Are there any thoughts on exposing this so that passthrough functionality is as simple as VMware have made it for those that do need to pass other sorts of devices through?

Thanks,

Chris

-----Original Message-----
From: John Else [mailto:john.else@citrix.com]
Sent: Thursday, 2 April 2015 11:47 p.m.
To: Chris Beasley; xen-api@lists.xen.org
Subject: RE: PCI.get_all_records

> The Xen-Orchestra team where trying to implement a system that allowed you to add attached pci devices to any VM that the host can use.  Normally this is done by using LSPCI to get the PCI ID and then passing this through to a VM using the xe other config > command.  Now, as far as XO can determine, the pci.get_all_records() should get a list of all pci devices attached to the host, but instead is simply lists only any attached gpu and not the rest of the devices such as USB, other pci devices etc.
> Is pci.get_all_records() the right api command to list all devices attached to the host, or is there no way to do what LSPCI does from the console using XenAPI?

Hi Chris, when creating PCI objects xapi filters the output of lspci to only create objects for display devices [1] [2], as this is the only class of device for which xapi supports passthrough via the "official" API (VGPUs, GPU groups etc.).

To passthrough other classes of device, at the moment you'll have to query the PCI devices some other way (e.g. with lspci) and then use the other_config method.

[1] https://github.com/xapi-project/xen-api/blob/master/ocaml/xapi/xapi_pci.ml#L26
[2] https://github.com/xapi-project/xen-api/blob/master/ocaml/xapi/xapi_pci.ml#L128

_______________________________________________
Xen-api mailing list
Xen-api@lists.xen.org
http://lists.xen.org/cgi-bin/mailman/listinfo/xen-api