在 KVM 上執行的 VM 上啟用 SSSE3 標誌

在 KVM 上執行的 VM 上啟用 SSSE3 標誌

使用 KVM 時如何將 SSSE3 標誌從主機伺服器轉送到虛擬機器?我嘗試了以下方法。

我的 QEMU 版本是qemu-kvm-1.5.3.我的主機伺服器啟用了 SSSE3 標誌(為簡潔起見,輸出被截斷):

[host]# lscpu | grep Flags | grep ssse3
Flags:                 .... vmx ssse3 ...

其中模型為:

[host]# lscpu | grep "Model name"
Model name:            Intel(R) Xeon(R) CPU E5-2630 v3 @ 2.40GHz

我使用 KVM 部署 VM,並在 XML 檔案中嘗試了以下 CPU 選項:

  1. 主機直通,以便我可以轉送所有標誌:
  <cpu mode='host-passthrough'>
    <topology sockets='1' cores='1' threads='1'/>
  </cpu>
  1. 只需啟用 SSSE3 標誌:
  <cpu>
    <topology sockets='1' cores='1' threads='1'/>
    <feature policy='require' name='ssse3'/>
  </cpu>

但是在虛擬機器中,我無法在輸出中看到 SSSE3 標誌lscpu。事實上,該host-passthrough模式甚至不會在 VM 輸出中顯示 Intel CPU

[host]$ lscpu | grep "Model name"
Model name:            QEMU Virtual CPU version 1.5.3

相關內容