[Libvir] Request and proposition about hardware capabilities in virNodeInfo

Philippe Berthault Philippe.Berthault at Bull.net
Wed Nov 15 16:38:54 UTC 2006


Hello,

To administrate virtual machines by using livbvirt, we need to known if 
the underlying hardware platform supports hvm (Intel-VT or AMD-V) or 
not. Currently, this information is returned by the "xm info" command of 
Xen in the "xen_caps" line but there is no equivalent in libvirt. So we 
propose to add this information in libvirt API.

There is three possibilities for doing that:
 1) Add one or several fields in the virNodeInfo structure returned by 
the virNodeGetInfo() function. These fields would be either strings such 
as strings returned by "xm info" or either bit fields with one bit per 
hardware capability.
 2) Add one or several specific functions returning a boolean value for 
each hardware capability we want to test.
 3) Add a specific function which returns either a bit fields of all the 
hardware capabilities or a structure such as virNodeInfo but far more 
complete.

The problem with the proposition #1 is that the size of the virNodeInfo 
structure is changed. This implies for all libvirt users to recompile 
their programs linked with libvirt to avoid a 'core dump' at the 
execution. This is the reason why propositions 2 and 3 exist.

NB: On an IA32 system, we can check flags in /proc/cpuinfo but on an 
IA64 platform with Montecito processors, there is no information about 
hardware capabilities in /proc/cpuinfo and the only way to known if the 
hardware supports hvm is by using the 'xm info' command.

What is your opinion about these propositions ?

Regards.




More information about the libvir-list mailing list