mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-24 14:45:24 +00:00
f7dd3a4e62
The mode can be either of "custom" (default), "host-model", "host-passthrough". The semantics of each mode is described in the following examples: - guest CPU is a default model with specified topology: <cpu> <topology sockets='1' cores='2' threads='1'/> </cpu> - guest CPU matches selected model: <cpu mode='custom' match='exact'> <model>core2duo</model> </cpu> - guest CPU should be a copy of host CPU as advertised by capabilities XML (this is a short cut for manually copying host CPU specification from capabilities to domain XML): <cpu mode='host-model'/> In case a hypervisor does not support the exact host model, libvirt automatically falls back to a closest supported CPU model and removes/adds features to match host. This behavior can be disabled by <cpu mode='host-model'> <model fallback='forbid'/> </cpu> - the same as previous returned by virDomainGetXMLDesc with VIR_DOMAIN_XML_UPDATE_CPU flag: <cpu mode='host-model' match='exact'> <model fallback='allow'>Penryn</model> --+ <vendor>Intel</vendor> | <topology sockets='2' cores='4' threads='1'/> + copied from <feature policy='require' name='dca'/> | capabilities XML <feature policy='require' name='xtpr'/> | ... --+ </cpu> - guest CPU should be exactly the same as host CPU even in the aspects libvirt doesn't model (such domain cannot be migrated unless both hosts contain exactly the same CPUs): <cpu mode='host-passthrough'/> - the same as previous returned by virDomainGetXMLDesc with VIR_DOMAIN_XML_UPDATE_CPU flag: <cpu mode='host-passthrough' match='minimal'> <model>Penryn</model> --+ copied from caps <vendor>Intel</vendor> | XML but doesn't <topology sockets='2' cores='4' threads='1'/> | describe all <feature policy='require' name='dca'/> | aspects of the <feature policy='require' name='xtpr'/> | actual guest CPU ... --+ </cpu>
31 lines
1.2 KiB
XML
31 lines
1.2 KiB
XML
<cpu mode='custom' match='exact'>
|
|
<arch>x86_64</arch>
|
|
<model fallback='allow'>pentium3</model>
|
|
<feature policy='require' name='lahf_lm'/>
|
|
<feature policy='require' name='lm'/>
|
|
<feature policy='require' name='nx'/>
|
|
<feature policy='require' name='syscall'/>
|
|
<feature policy='require' name='popcnt'/>
|
|
<feature policy='require' name='sse4.2'/>
|
|
<feature policy='require' name='sse4.1'/>
|
|
<feature policy='require' name='dca'/>
|
|
<feature policy='require' name='xtpr'/>
|
|
<feature policy='require' name='cx16'/>
|
|
<feature policy='require' name='ssse3'/>
|
|
<feature policy='require' name='tm2'/>
|
|
<feature policy='require' name='est'/>
|
|
<feature policy='require' name='vmx'/>
|
|
<feature policy='require' name='ds_cpl'/>
|
|
<feature policy='require' name='monitor'/>
|
|
<feature policy='require' name='pni'/>
|
|
<feature policy='require' name='pbe'/>
|
|
<feature policy='require' name='tm'/>
|
|
<feature policy='require' name='ht'/>
|
|
<feature policy='require' name='ss'/>
|
|
<feature policy='require' name='sse2'/>
|
|
<feature policy='require' name='acpi'/>
|
|
<feature policy='require' name='ds'/>
|
|
<feature policy='require' name='clflush'/>
|
|
<feature policy='require' name='apic'/>
|
|
</cpu>
|