Allow for CPU topology specification without model

Currently CPU topology may only be specified together with CPU model:
    <cpu match='exact'>
        <model>name</model>
        <topology sockets='1' cores='2' threads='3'/>
    </cpu>

This patch allows for CPU topology specification without the need for
also specifying CPU model:
    <cpu>
        <topology sockets='1' cores='2' threads='3'/>
    </cpu>

'match' attribute and 'model' element are made optional with the
restriction that 'match' attribute has to be set when 'model' is
present.

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
This commit is contained in:
Jiri Denemark
2010-01-12 15:25:36 +01:00
committed by Matthias Bolte
parent 16a4d22b4b
commit ce4896fb65
2 changed files with 52 additions and 27 deletions

View File

@@ -1307,17 +1307,21 @@
-->
<define name="cpu">
<element name="cpu">
<attribute name="match">
<choice>
<value>minimum</value>
<value>exact</value>
<value>strict</value>
</choice>
</attribute>
<optional>
<attribute name="match">
<choice>
<value>minimum</value>
<value>exact</value>
<value>strict</value>
</choice>
</attribute>
</optional>
<interleave>
<element name="model">
<text/>
</element>
<optional>
<element name="model">
<text/>
</element>
</optional>
<optional>
<element name="topology">
<attribute name="sockets">