mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-03-07 17:28:15 +00:00
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: Jiri Denemark <jdenemar@redhat.com>
This commit is contained in:
parent
b1f6792cb6
commit
fc4ee3e674
@ -1488,6 +1488,11 @@ x86Compute(virCPUDefPtr host,
|
|||||||
if (!(guest_model = x86ModelCopy(host_model)))
|
if (!(guest_model = x86ModelCopy(host_model)))
|
||||||
goto error;
|
goto error;
|
||||||
|
|
||||||
|
if (cpu->vendor &&
|
||||||
|
virCPUx86DataAddCPUID(guest_model->data,
|
||||||
|
&host_model->vendor->cpuid) < 0)
|
||||||
|
goto error;
|
||||||
|
|
||||||
if (cpu->type == VIR_CPU_TYPE_GUEST
|
if (cpu->type == VIR_CPU_TYPE_GUEST
|
||||||
&& cpu->match == VIR_CPU_MATCH_EXACT)
|
&& cpu->match == VIR_CPU_MATCH_EXACT)
|
||||||
x86DataSubtract(guest_model->data, diff->data);
|
x86DataSubtract(guest_model->data, diff->data);
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
<cpu mode='custom' match='exact'>
|
<cpu mode='custom' match='exact'>
|
||||||
<arch>x86_64</arch>
|
<arch>x86_64</arch>
|
||||||
<model fallback='allow'>core2duo</model>
|
<model fallback='allow'>core2duo</model>
|
||||||
|
<vendor>Intel</vendor>
|
||||||
<feature policy='require' name='ds'/>
|
<feature policy='require' name='ds'/>
|
||||||
<feature policy='require' name='acpi'/>
|
<feature policy='require' name='acpi'/>
|
||||||
<feature policy='require' name='ss'/>
|
<feature policy='require' name='ss'/>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user