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

Re: [libvirt] [RFC] Expose cpu_map.xml via API



On 08/20/2013 05:50 AM, Daniel P. Berrange wrote:
> On Mon, Aug 19, 2013 at 08:19:56PM +0200, Giuseppe Scrivano wrote:
>> ---
>> I have started working on:
>>
>>   https://bugzilla.redhat.com/show_bug.cgi?id=916786
>>
>> +/**
>> + * virConnectGetCPUMapDesc:
>> + *
>> + * @conn: virConnect connection
>> + *
>> + * Get the content of the cpu_map.xml file used by the connection.
>> + *
>> + * Returns XML description of the cpu_map.xml file.
>> + */
>> +char *virConnectGetCPUMapDesc(virConnectPtr conn);
> 
> This is really not at all neccessary, or desirable.
> 
> We now have the ability to query the full CPU flag set from the
> virConnectBaselineCPU API.
> 
> All we're missing is thus a way to get a list of supported CPU
> model names. For that we can just have
> 
>   int virConnectGetCPUModelNames(virConnectPtr conn, char ***models);
> 

That API would at least need receive an 'arch' value to limit the returned
models. And there's other data in cpu_map than just the model name, though API
users likely don't require it (yet).

I think the suggestion elsewhere in the thread for a hypervisor capabilities
or per-emulator capabilities API would work, and in the future we could extend
it with things like available device lists. But we need to think hard about
the XML format to make it as future proof as possible, since there's all sorts
of crazy interdependencies between arch, machine type, domain type,
hvm/pv/exe, etc.

- Cole


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