mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
domcaps: Add CPU usable flag
In case a hypervisor is able to tell us a list of supported CPU models and whether each CPU models can be used on the current host, we can propagate this to domain capabilities. This is a better alternative to calling virConnectCompareCPU for each supported CPU model. Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
This commit is contained in:
@@ -156,9 +156,9 @@
|
||||
<mode name='host-passthrough' supported='yes'/>
|
||||
<mode name='host-model' supported='yes'/>
|
||||
<mode name='custom' supported='yes'>
|
||||
<model>Broadwell</model>
|
||||
<model>Broadwell-noTSX</model>
|
||||
<model>Haswell</model>
|
||||
<model usable='no'>Broadwell</model>
|
||||
<model usable='yes'>Broadwell-noTSX</model>
|
||||
<model usable='no'>Haswell</model>
|
||||
...
|
||||
</mode>
|
||||
</cpu>
|
||||
@@ -183,6 +183,10 @@
|
||||
<dd>
|
||||
The <code>mode</code> element contains a list of supported CPU
|
||||
models, each described by a dedicated <code>model</code> element.
|
||||
The <code>usable</code> attribute specifies whether the model can
|
||||
be used on the host. A special value <code>unknown</code> indicates
|
||||
libvirt does not have enough information to provide the usability
|
||||
data.
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
|
||||
@@ -105,6 +105,13 @@
|
||||
<ref name='supported'/>
|
||||
<zeroOrMore>
|
||||
<element name='model'>
|
||||
<attribute name='usable'>
|
||||
<choice>
|
||||
<value>yes</value>
|
||||
<value>no</value>
|
||||
<value>unknown</value>
|
||||
</choice>
|
||||
</attribute>
|
||||
<text/>
|
||||
</element>
|
||||
</zeroOrMore>
|
||||
|
||||
Reference in New Issue
Block a user