[PATCH 0/2] KVM: x86: Propagate AMD-specific IBRS bits to guests

Takahiro Itazuri
2023-02-27T21:14:42Z

VMMs retrieve supported CPUID features via KVM_GET_SUPPORTED_CPUID to
construct CPUID information to be passed to KVM_SET_CPUID2. Most CPUID
feature bits related to speculative attacks are propagated from host
CPUID. But AMD processors have AMD-specific IBRS related bits in CPUID
Fn8000_0008_EBX (ref: AMD64 Architecture Programmer's Manual Volume 3:
General-Purpose and System Instructions) and some bits are not
propagated to guests.

Enable propagation of these bits to guests, so that VMMs don't have to
enable them explicitly based on host CPUID.

Takahiro Itazuri (2):
x86/cpufeatures: Add AMD-specific IBRS bits
KVM: x86: Propagate AMD-specific IBRS related bits

arch/x86/include/asm/cpufeatures.h | 3 +++
arch/x86/kvm/cpuid.c | 5 +++--
2 files changed, 6 insertions(+), 2 deletions(-)

--
2.38.0