basic introduction
The following elements can be used to specify the CPU "model", "feature", and "topology".
<cpu match='exact'> <model fallback='allow'>core2duo</model> <vendor>Intel</vendor> <topology sockets='1' cores='2' threads='1'/> <cache level='3' mode='emulate'/> <feature policy='disable' name='lahf_lm'/> </cpu>
<cpu mode='host-model'> <model fallback='forbid'/> <topology sockets='1' cores='2' threads='1'/> </cpu>
<cpu mode='host-passthrough'> <cache mode='passthrough'/> <feature policy='disable' name='lahf_lm'/> ...
If there is no need to restrict the CPU "model" and its "features", you can simply use a cpu element:
<cpu> <topology sockets='1' cores='2' threads='1'/> </cpu>
Configuration structure
A complete structure is as follows:
<cpu match="minimum/exact/strict" check="none/partial/full" mode="custom/host-model/host-passthrough"> <model /> <vendor /> <topology sockets='1' cores='2' threads='1'/> <feature /> <cache /> <numa> <cell id="" cpus="" memory="" unit="" memAccess="" discard=""> <distances> <sibling id='' value=''/> </distances> </cell> </numa> </cpu>