This is a note to let you know that I've just added the patch titled
x86, kvm: correctly access the KVM_CPUID_FEATURES leaf at 0x40000101
to the 3.12-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
x86-kvm-correctly-access-the-kvm_cpuid_features-leaf-at-0x40000101.patch
and it can be found in the queue-3.12 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <[email protected]> know about it.
>From 77f01bdfa5e55dc19d3eb747181d2730a9bb3ca8 Mon Sep 17 00:00:00 2001
From: Paolo Bonzini <[email protected]>
Date: Mon, 27 Jan 2014 14:51:44 +0100
Subject: x86, kvm: correctly access the KVM_CPUID_FEATURES leaf at 0x40000101
From: Paolo Bonzini <[email protected]>
commit 77f01bdfa5e55dc19d3eb747181d2730a9bb3ca8 upstream.
When Hyper-V hypervisor leaves are present, KVM must relocate
its own leaves at 0x40000100, because Windows does not look for
Hyper-V leaves at indices other than 0x40000000. In this case,
the KVM features are at 0x40000101, but the old code would always
look at 0x40000001.
Fix by using kvm_cpuid_base(). This also requires making the
function non-inline, since kvm_cpuid_base() is static.
Fixes: 1085ba7f552d84aa8ac0ae903fa8d0cc2ff9f79d
Cc: [email protected]
Signed-off-by: Paolo Bonzini <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
---
arch/x86/include/asm/kvm_para.h | 11 ++++++-----
arch/x86/kernel/kvm.c | 5 +++++
2 files changed, 11 insertions(+), 5 deletions(-)
--- a/arch/x86/include/asm/kvm_para.h
+++ b/arch/x86/include/asm/kvm_para.h
@@ -85,13 +85,9 @@ static inline long kvm_hypercall4(unsign
return ret;
}
-static inline unsigned int kvm_arch_para_features(void)
-{
- return cpuid_eax(KVM_CPUID_FEATURES);
-}
-
#ifdef CONFIG_KVM_GUEST
bool kvm_para_available(void);
+unsigned int kvm_arch_para_features(void);
void __init kvm_guest_init(void);
void kvm_async_pf_task_wait(u32 token);
void kvm_async_pf_task_wake(u32 token);
@@ -115,6 +111,11 @@ static inline bool kvm_para_available(vo
{
return 0;
}
+
+static inline unsigned int kvm_arch_para_features(void)
+{
+ return 0;
+}
static inline u32 kvm_read_and_reset_pf_reason(void)
{
--- a/arch/x86/kernel/kvm.c
+++ b/arch/x86/kernel/kvm.c
@@ -527,6 +527,11 @@ bool kvm_para_available(void)
}
EXPORT_SYMBOL_GPL(kvm_para_available);
+unsigned int kvm_arch_para_features(void)
+{
+ return cpuid_eax(kvm_cpuid_base() | KVM_CPUID_FEATURES);
+}
+
static uint32_t __init kvm_detect(void)
{
return kvm_cpuid_base();
Patches currently in stable-queue which might be from [email protected] are
queue-3.12/kvm-x86-fix-apic_base-enable-check.patch
queue-3.12/kvm-x86-limit-pit-timer-frequency.patch
queue-3.12/x86-kvm-correctly-access-the-kvm_cpuid_features-leaf-at-0x40000101.patch
queue-3.12/x86-kvm-cache-the-base-of-the-kvm-cpuid-leaves.patch
--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html