提交 fc4ee3e6 编写于 作者: J Jiri Denemark

cpu_x86: Propagate vendor to guest's virCPUData

When computing CPU data for a given guest CPU we should set CPUID vendor
bits appropriately so that we don't lose the vendor when transforming
CPU data back to XML description.
Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
上级 b1f6792c
......@@ -1488,6 +1488,11 @@ x86Compute(virCPUDefPtr host,
if (!(guest_model = x86ModelCopy(host_model)))
goto error;
if (cpu->vendor &&
virCPUx86DataAddCPUID(guest_model->data,
&host_model->vendor->cpuid) < 0)
goto error;
if (cpu->type == VIR_CPU_TYPE_GUEST
&& cpu->match == VIR_CPU_MATCH_EXACT)
x86DataSubtract(guest_model->data, diff->data);
......
<cpu mode='custom' match='exact'>
<arch>x86_64</arch>
<model fallback='allow'>core2duo</model>
<vendor>Intel</vendor>
<feature policy='require' name='ds'/>
<feature policy='require' name='acpi'/>
<feature policy='require' name='ss'/>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册