Add host cache information in capabilities

We're only adding only info about L3 caches, we can add more
later (just by changing one line), but for now that's more than enough
without overwhelming anyone.

XML snippet of how this should look like (also seen as part of the commit):

  <cache>
    <bank id='0' level='3' type='both' size='8192' unit='KiB' cpus='0-7'/>
  </cache>

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
This commit is contained in:
Martin Kletzander
2017-05-09 13:12:40 +02:00
parent 90a118fa69
commit 4ad6a73bfc
6 changed files with 273 additions and 1 deletions
+34
View File
@@ -45,6 +45,9 @@
<optional>
<ref name='topology'/>
</optional>
<optional>
<ref name='cache'/>
</optional>
<zeroOrMore>
<ref name='secmodel'/>
</zeroOrMore>
@@ -248,6 +251,37 @@
</element>
</define>
<define name='cache'>
<element name='cache'>
<oneOrMore>
<element name='bank'>
<attribute name='id'>
<ref name='unsignedInt'/>
</attribute>
<attribute name='level'>
<ref name='unsignedInt'/>
</attribute>
<attribute name='type'>
<choice>
<value>both</value>
<value>code</value>
<value>data</value>
</choice>
</attribute>
<attribute name='size'>
<ref name='unsignedInt'/>
</attribute>
<attribute name='unit'>
<ref name='unit'/>
</attribute>
<attribute name='cpus'>
<ref name='cpuset'/>
</attribute>
</element>
</oneOrMore>
</element>
</define>
<define name='guestcaps'>
<element name='guest'>
<ref name='ostype'/>