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

本文详细解读了KVM中CPU配置的不同模式,包括精确匹配、主机模型和直通模式,以及它们各自的结构和使用场景。还介绍了如何配置CPU型号、特性、拓扑和缓存策略。适合理解KVM虚拟化中CPU配置的开发者和技术人员。

简单介绍

可以使用以下元素指定CPU「型号」、「特征」、「拓扑」。

<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元素:

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

配置结构

一个完整的结构如下:

<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配置模式分类

评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值