This patch masks CPUID leaf 7 ebx against host capability word9.
Signed-off-by: Yang, Wei <[email protected]>
Signed-off-by: Shan, Haitao <[email protected]>
Signed-off-by: Li, Xin <[email protected]>
---
arch/x86/kvm/x86.c | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
index 91bfc40..6e90d71 100644
--- a/arch/x86/kvm/x86.c
+++ b/arch/x86/kvm/x86.c
@@ -2387,7 +2387,7 @@ static void do_cpuid_ent(struct kvm_cpuid_entry2 *entry,
u32 function,
}
break;
}
- /* function 4 and 0xb have additional index. */
+ /* function 4 has additional index. */
case 4: {
int i, cache_type;
@@ -2404,6 +2404,11 @@ static void do_cpuid_ent(struct kvm_cpuid_entry2 *entry,
u32 function,
}
break;
}
+ case 7:
+ /* Mask ebx against host capability word 9 */
+ if (index == 0) cpuid_mask(&entry->ebx, 9);
+ break;
+ /* function 0xb has additional index. */
case 0xb: {
int i, level_type;
--
1.7.4.1
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html