mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
Show host model in domain capabilities
The domain capabilities XML is capable of showing whether each guest CPU
mode is supported or not with a possibility to provide additional
details. This patch enhances host-model capability to advertise the
exact CPU model which will be used as a host-model:
<cpu>
...
<mode name='host-model' supported='yes'>
<model fallback='allow'>Broadwell</model>
<vendor>Intel</vendor>
<feature policy='disable' name='aes'/>
<feature policy='require' name='vmx'/>
</mode>
...
</cpu>
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
This commit is contained in:
@@ -154,7 +154,12 @@
|
||||
...
|
||||
<cpu>
|
||||
<mode name='host-passthrough' supported='yes'/>
|
||||
<mode name='host-model' supported='yes'/>
|
||||
<mode name='host-model' supported='yes'>
|
||||
<model fallback='allow'>Broadwell</model>
|
||||
<vendor>Intel</vendor>
|
||||
<feature policy='disable' name='aes'/>
|
||||
<feature policy='require' name='vmx'/>
|
||||
</mode>
|
||||
<mode name='custom' supported='yes'>
|
||||
<model usable='no'>Broadwell</model>
|
||||
<model usable='yes'>Broadwell-noTSX</model>
|
||||
@@ -177,7 +182,19 @@
|
||||
<dd>No mode specific details are provided.</dd>
|
||||
|
||||
<dt><code>host-model</code></dt>
|
||||
<dd>No mode specific details are provided yet.</dd>
|
||||
<dd>
|
||||
If <code>host-model</code> is supported by the hypervisor, the
|
||||
<code>mode</code> describes the guest CPU which will be used when
|
||||
starting a domain with <code>host-model</code> CPU. The hypervisor
|
||||
specifics (such as unsupported CPU models or features, machine type,
|
||||
etc.) may be accounted for in this guest CPU specification and thus
|
||||
the CPU can be different from the one shown in host capabilities XML.
|
||||
This is indicated by the <code>fallback</code> attribute of the
|
||||
<code>model</code> sub element: <code>allow</code> means not all
|
||||
specifics were accounted for and thus the CPU a guest will see may
|
||||
be different; <code>forbid</code> indicates that the CPU a guest will
|
||||
see should match this CPU definition.
|
||||
</dd>
|
||||
|
||||
<dt><code>custom</code></dt>
|
||||
<dd>
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
<!-- A Relax NG schema for the libvirt domain capabilities XML format -->
|
||||
<grammar xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
|
||||
<include href='basictypes.rng'/>
|
||||
<include href='cputypes.rng'/>
|
||||
<start>
|
||||
<ref name='domainCapabilities'/>
|
||||
</start>
|
||||
@@ -94,6 +95,15 @@
|
||||
<value>host-model</value>
|
||||
</attribute>
|
||||
<ref name='supported'/>
|
||||
<optional>
|
||||
<ref name="cpuModel"/>
|
||||
<optional>
|
||||
<ref name="cpuVendor"/>
|
||||
</optional>
|
||||
<zeroOrMore>
|
||||
<ref name="cpuFeature"/>
|
||||
</zeroOrMore>
|
||||
</optional>
|
||||
</element>
|
||||
</define>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user