Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
x86/kvm: expose the CPUID of SPEC_CTRL and STIBP to guests
This patch shows an alternative approach to the one posted here: https://www.mail-archive.com/linux-kernel@vger.kernel.org/msg1580364.html The advantages are 1) Simpler; 2) More reasonable because this is used to fill the hardware security hole, for all the x86 cpus that physically support the two CPUIDs, which means the hole already exists physically. All the VMs should use this feature no matter what CPU model they are using. So, exposing the two CPUIDs as long as they are physically supported by the hardware, and this doesn't require the QEMU side hardcode as usual. When the related feature bits are added to the kernel, and we can simply change it to: best->edx |= F(SPEC_CTRL) | F(PRED_CMD); Signed-off-by: Wei Wang <wei.w.wang@intel.com>
- Loading branch information