]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
4.17-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 26 Jul 2018 10:24:51 +0000 (12:24 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 26 Jul 2018 10:24:51 +0000 (12:24 +0200)
added patches:
kvm-vmx-support-msr_ia32_arch_capabilities-as-a-feature-msr.patch

queue-4.17/kvm-vmx-support-msr_ia32_arch_capabilities-as-a-feature-msr.patch [new file with mode: 0644]

diff --git a/queue-4.17/kvm-vmx-support-msr_ia32_arch_capabilities-as-a-feature-msr.patch b/queue-4.17/kvm-vmx-support-msr_ia32_arch_capabilities-as-a-feature-msr.patch
new file mode 100644 (file)
index 0000000..3e57520
--- /dev/null
@@ -0,0 +1,39 @@
+From cd28325249a1ca0d771557ce823e0308ad629f98 Mon Sep 17 00:00:00 2001
+From: Paolo Bonzini <pbonzini@redhat.com>
+Date: Mon, 25 Jun 2018 14:04:37 +0200
+Subject: KVM: VMX: support MSR_IA32_ARCH_CAPABILITIES as a feature MSR
+
+From: Paolo Bonzini <pbonzini@redhat.com>
+
+commit cd28325249a1ca0d771557ce823e0308ad629f98 upstream.
+
+This lets userspace read the MSR_IA32_ARCH_CAPABILITIES and check that all
+requested features are available on the host.
+
+Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ arch/x86/kvm/x86.c |    4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+--- a/arch/x86/kvm/x86.c
++++ b/arch/x86/kvm/x86.c
+@@ -1092,6 +1092,7 @@ static u32 msr_based_features[] = {
+       MSR_F10H_DECFG,
+       MSR_IA32_UCODE_REV,
++      MSR_IA32_ARCH_CAPABILITIES,
+ };
+ static unsigned int num_msr_based_features;
+@@ -1100,7 +1101,8 @@ static int kvm_get_msr_feature(struct kv
+ {
+       switch (msr->index) {
+       case MSR_IA32_UCODE_REV:
+-              rdmsrl(msr->index, msr->data);
++      case MSR_IA32_ARCH_CAPABILITIES:
++              rdmsrl_safe(msr->index, &msr->data);
+               break;
+       default:
+               if (kvm_x86_ops->get_msr_feature(msr))