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: Jiri Denemark <jdenemar@redhat.com>
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'/>