如果AMD SVM虚拟化被禁用,Linux将最终通过/proc/cpuinfo指示

2023年 10月 3日 25.9k 0

通过查看中的标志,可以很容易地检查是否存在Intel虚拟化(VMX)支持并启用它
/proc/cpuinfo
但到目前为止,AMD虚拟化(SVM)一直通过
/proc/cpuinfo
即使在BIOS/平台已经禁用SVM功能时也是如此。最后,对于Linux 6.7,这种疏忽正在得到纠正。

从即将到来的Linux 6.7内核周期开始——尽管可能会作为对现有内核系列的修复进行后移植——是Red Hat的一个补丁,不再通过
/proc/cpuinfo
用于在BIOS中禁用SVM的情况。这与Intel VMX在被平台/BIOS禁用时不通过/proc/cpuinfo显示的行为相匹配,这使得通过这个方便且广泛使用的接口检查虚拟化是否可用变得更加容易。

此修补程序
by Red Hat's Paolo Bonzini has been queued into TIP's x86/cpu branch ahead of the Linux 6.7 merge window coming up in about one month. For AMD (and Hygon) processors it will now read the appropriate MSR to verify whether SVM has been disabled -- and if so to clear the CPU capability so it won't show in /proc/cpuinfo. Up to now the only indication of AMD SVM being disabled by the BIOS was appearing in the kernel log -- or simply KVM virtualization failing to work. A small but useful change.

相关文章

塑造我成为 CTO 之路的“秘诀”
“人工智能教母”的公司估值达 10 亿美金
教授吐槽:985 高校成高级蓝翔!研究生基本废了,只为房子、票子……
Windows 蓝屏中断提醒开发者:Rust 比 C/C++ 更好
Claude 3.5 Sonnet 在伽利略幻觉指数中名列前茅
上海新增 11 款已完成登记生成式 AI 服务

发布评论