「KVM」- CPU model and topology(未完) @20210305

簡單介紹

能夠使用如下元素指定CPU「型號」、「特徵」、「拓撲」。socket

<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'/>
...

若是不須要對CPU「型號」及其「特徵」進行限制,能夠簡單的使用一個cpu元素:ide

<cpu>
  <topology sockets='1' cores='2' threads='1'/>
</cpu>

配置結構

一個完整的結構以下:it

<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>

參考文獻

KVM cpu配置模式分類class

相關文章
相關標籤/搜索