mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
cpu: Add support for CPU vendor
By specifying <vendor> element in CPU requirements a guest can be restricted to run only on CPUs by a given vendor. Host CPU vendor is also specified in capabilities XML. The vendor is checked when migrating a guest but it's not forced, i.e., guests configured without <vendor> element can be freely migrated.
This commit is contained in:
@@ -22,6 +22,7 @@ BIOS you will see</p>
|
||||
<vmx/>
|
||||
</features>
|
||||
<model>core2duo</model>
|
||||
<vendor>Intel</vendor>
|
||||
<topology sockets="1" cores="2" threads="1"/>
|
||||
<feature name="lahf_lm"/>
|
||||
<feature name='xtpr'/>
|
||||
|
||||
@@ -220,6 +220,7 @@
|
||||
...
|
||||
<cpu match='exact'>
|
||||
<model>core2duo</model>
|
||||
<vendor>Intel</vendor>
|
||||
<topology sockets='1' cores='2' threads='1'/>
|
||||
<feature policy='disable' name='lahf_lm'/>
|
||||
</cpu>
|
||||
@@ -267,6 +268,13 @@
|
||||
definition can be found in <code>cpu_map.xml</code> file installed
|
||||
in libvirt's data directory.</dd>
|
||||
|
||||
<dt><code>vendor</code></dt>
|
||||
<dd><span class="since">Since 0.8.3</span> the content of the
|
||||
<code>vendor</code> element specifies CPU vendor requested by the
|
||||
guest. If this element is missing, the guest can be run on a CPU
|
||||
matching given features regardless on its vendor. The list of
|
||||
supported vendors can be found in <code>cpu_map.xml</code>.</dd>
|
||||
|
||||
<dt><code>topology</code></dt>
|
||||
<dd>The <code>topology</code> element specifies requested topology of
|
||||
virtual CPU provided to the guest. Three non-zero values have to be
|
||||
|
||||
@@ -79,6 +79,11 @@
|
||||
<element name='model'>
|
||||
<text/>
|
||||
</element>
|
||||
<optional>
|
||||
<element name='vendor'>
|
||||
<text/>
|
||||
</element>
|
||||
</optional>
|
||||
<element name='topology'>
|
||||
<attribute name='sockets'>
|
||||
<ref name='positiveInteger'/>
|
||||
|
||||
@@ -1557,6 +1557,7 @@
|
||||
<interleave>
|
||||
<ref name="cpuModel"/>
|
||||
<optional>
|
||||
<ref name="cpuVendor"/>
|
||||
<ref name="cpuTopology"/>
|
||||
</optional>
|
||||
<zeroOrMore>
|
||||
@@ -1584,6 +1585,12 @@
|
||||
</element>
|
||||
</define>
|
||||
|
||||
<define name="cpuVendor">
|
||||
<element name="vendor">
|
||||
<text/>
|
||||
</element>
|
||||
</define>
|
||||
|
||||
<define name="cpuFeature">
|
||||
<element name="feature">
|
||||
<attribute name="policy">
|
||||
|
||||
Reference in New Issue
Block a user