]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/libvirt.git/commit
conf: cpu: Fix parsing of vendor_id
authorKen ICHIKAWA <ichikawa.ken@jp.fujitsu.com>
Mon, 17 Dec 2012 08:05:59 +0000 (17:05 +0900)
committerPeter Krempa <pkrempa@redhat.com>
Mon, 17 Dec 2012 15:55:54 +0000 (16:55 +0100)
commit1190a824694cf3bc7c786c4367202f829da2a739
tree54c1f2dd42250dc9fc9d429a69bf55bb89278d3a
parent77d3a8097480e388f1ce3129fe530f235b05f93b
conf: cpu: Fix parsing of vendor_id

This patch fixes a problem that vendor_id attribute can not be defined
when fallback attribute is not defined.

If I define domain xml like below:
<domain>
  <cpu>
    <model vendor_id='aaaabbbbcccc'>core2duo</model>
  </cpu>
</domain>

In dumpxml, vendor_id is not reflected:
<domain>
  <cpu mode='custom' match='exact'>
    <model fallback='allow'>core2duo</model>
  </cpu>
</domain>

The expected output is:
<domain>
  <cpu mode='custom' match='exact'>
    <model fallback='allow' vendor_id='aaaabbbbcccc'>core2duo</model>
  </cpu>
</domain>

If the fallback attribute and vendor_id attribute is defined at the same
time, it's reflected as expected.

Signed-off-by: Ken ICHIKAWA <ichikawa.ken@jp.fujitsu.com>
src/conf/cpu_conf.c