gpt4 book ai didi

ubuntu - Libvirt 没有列出所有支持的 CPU 特性

转载 作者:行者123 更新时间:2023-12-04 18:45:48 26 4
gpt4 key购买 nike

我在我的 Ubuntu Server 16.04 上安装了 libvirt-bin。但奇怪的是,libvirt 并没有列出主机所有支持的 CPU 特性。

当我打开文件/proc/cpuinfo 时,我可以看到“aes”在标志列表中。

但是,当我运行“virsh 功能”时,我得到了下面的结果,这表明主机 cpu 没有功能“aes”。

<capabilities>

<host>
<uuid>30373237-3132-4d32-3236-30383034485a</uuid>
<cpu>
<arch>x86_64</arch>
<model>SandyBridge</model>
<vendor>Intel</vendor>
<topology sockets='1' cores='10' threads='2'/>
<feature name='invpcid'/>
<feature name='erms'/>
<feature name='bmi2'/>
<feature name='smep'/>
<feature name='avx2'/>
<feature name='bmi1'/>
<feature name='fsgsbase'/>
<feature name='abm'/>
<feature name='pdpe1gb'/>
<feature name='rdrand'/>
<feature name='f16c'/>
<feature name='osxsave'/>
<feature name='movbe'/>
<feature name='dca'/>
<feature name='pcid'/>
<feature name='pdcm'/>
<feature name='xtpr'/>
<feature name='fma'/>
<feature name='tm2'/>
<feature name='est'/>
<feature name='smx'/>
<feature name='vmx'/>
<feature name='ds_cpl'/>
<feature name='monitor'/>
<feature name='dtes64'/>
<feature name='pbe'/>
<feature name='tm'/>
<feature name='ht'/>
<feature name='ss'/>
<feature name='acpi'/>
<feature name='ds'/>
<feature name='vme'/>
</cpu>
...

然后我打开文件/usr/share/libvirt/cpu_map.xml,我可以看到下面的CPU型号,这意味着Sandbridge继承自Westmere,它应该有'aes'特性。
<model name='Westmere'>
<model name='Nehalem'/>
<feature name='aes'/>
</model>

<model name='SandyBridge'>
<model name='Westmere'/>
<feature name='pclmuldq'/>
<feature name='x2apic'/>
<feature name='tsc-deadline'/>
<feature name='xsave'/>
<feature name='avx'/>
<feature name='rdtscp'/>
</model>

我认为/proc/cpuinfo 中的标志列表应该是正确的,因为它是由 linux 内核调用 cpuid 生成的。这是 libvirt 中的错误,还是“aes”只是“virsh 功能”输出中列出的一些功能的子集?

更有趣的是,在我启动访客并登录后,我发现在访客操作系统中,'aes' 位于/proc/cpuinfo 中。

任何想法?

谢谢,
托比

最佳答案

在 libvirt CPU 设计中,CPU 型号名称被视为一组 CPU 功能的快捷方式/别名。因此,当您在功能 XML 中查询主机 CPU 模型时,您将看到一些表达核心功能集的 CPU 模型,然后是零个或多个尚未列出的基本 CPU 模型的一部分的功能列表。您的示例将“SandyBridge”显示为功能中的 CPU 型号。这继承自“Westmere”,并且“Westmere”被声明为包含“aes”特性。因此 libvirt 不需要在功能中列出“aes”特性——它只需要列出尚未属于“SandyBridge”模型的特性。

但是,如果您想查看完整扩展的 CPU 功能列表,可以将 .... XML 保存到文件 CPUMODEL.xml 中,然后调用“virsh cpu-baseline --features CPUMODEL.xml”。

关于ubuntu - Libvirt 没有列出所有支持的 CPU 特性,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42590212/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com