kvm/svm: PKU not currently supported
authorJohn Allen <john.allen@amd.com>
Thu, 19 Dec 2019 20:17:59 +0000 (14:17 -0600)
committerPaolo Bonzini <pbonzini@redhat.com>
Mon, 27 Jan 2020 18:59:35 +0000 (19:59 +0100)
commita47970ed74a535b1accb4bc73643fd5a93993c3e
tree31d40bc27e0c957f81ab4ce892ec9c20ad480167
parent8bd826d629d6ff4a4e647079db15d64d06346004
kvm/svm: PKU not currently supported

Current SVM implementation does not have support for handling PKU. Guests
running on a host with future AMD cpus that support the feature will read
garbage from the PKRU register and will hit segmentation faults on boot as
memory is getting marked as protected that should not be. Ensure that cpuid
from SVM does not advertise the feature.

Signed-off-by: John Allen <john.allen@amd.com>
Cc: stable@vger.kernel.org
Fixes: 0556cbdc2fbc ("x86/pkeys: Don't check if PKRU is zero before writing it")
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/include/asm/kvm_host.h
arch/x86/kvm/cpuid.c
arch/x86/kvm/svm.c
arch/x86/kvm/vmx/capabilities.h
arch/x86/kvm/vmx/vmx.c