public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
* [Patch v5 3/4] Mask function7 ebx against host capability word9
@ 2011-05-30  3:01 Yang, Wei Y
  2011-05-30 11:44 ` Avi Kivity
  0 siblings, 1 reply; 2+ messages in thread
From: Yang, Wei Y @ 2011-05-30  3:01 UTC (permalink / raw)
  To: Avi Kivity; +Cc: kvm@vger.kernel.org


This patch masks CPUID leaf 7 ebx against host capability word9.
 
 Signed-off-by: Yang, Wei <wei.y.yang@intel.com>
 Signed-off-by: Shan, Haitao <haitao.shan@intel.com>
 Signed-off-by: Li, Xin <xin.li@intel.com>

---
 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


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-05-30 11:44 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-05-30  3:01 [Patch v5 3/4] Mask function7 ebx against host capability word9 Yang, Wei Y
2011-05-30 11:44 ` Avi Kivity

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox