All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] Add VMX cpuid feature to qemu64
@ 2011-01-04 15:06 Nadav Har'El
  2011-01-04 15:53 ` Alexander Graf
  0 siblings, 1 reply; 9+ messages in thread
From: Nadav Har'El @ 2011-01-04 15:06 UTC (permalink / raw)
  To: qemu-devel; +Cc: avi

This patch adds the "VMX" cpuid feature to the default "qemu64" CPU type.
If KVM doesn't support this feature (i.e., nested VMX is not in the code,
or not enabled) it will mask out this bit.

Note that other relevant CPU types, such as "core2duo" already correctly
include the VMX feature, and "qemu64" already includes the SVM feature
needed for nested SVM (again, KVM will remove this bit if it doesn't support
nested SVM), so there is no reason not to list the VMX feature as well.

Signed-off-by: Nadav Har'El <nyh@il.ibm.com>
---
 target-i386/cpuid.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

--- .before/target-i386/cpuid.c	2011-01-04 17:00:21.000000000 +0200
+++ .after/target-i386/cpuid.c	2011-01-04 17:00:21.000000000 +0200
@@ -288,7 +288,8 @@ static x86_def_t builtin_x86_defs[] = {
         .features = PPRO_FEATURES |
             CPUID_MTRR | CPUID_CLFLUSH | CPUID_MCA |
             CPUID_PSE36,
-        .ext_features = CPUID_EXT_SSE3 | CPUID_EXT_CX16 | CPUID_EXT_POPCNT,
+        .ext_features = CPUID_EXT_SSE3 | CPUID_EXT_CX16 | CPUID_EXT_POPCNT |
+	    CPUID_EXT_VMX,
         .ext2_features = (PPRO_FEATURES & EXT2_FEATURE_MASK) |
             CPUID_EXT2_LM | CPUID_EXT2_SYSCALL | CPUID_EXT2_NX,
         .ext3_features = CPUID_EXT3_LAHF_LM | CPUID_EXT3_SVM |

-- 
Nadav Har'El                        |      Tuesday, Jan  4 2011, 28 Tevet 5771
nyh@math.technion.ac.il             |-----------------------------------------
Phone +972-523-790466, ICQ 13349191 |We are Microsoft. You will be
http://nadav.harel.org.il           |assimilated. Resistance is futile.

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

end of thread, other threads:[~2011-01-05  9:22 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-01-04 15:06 [Qemu-devel] [PATCH] Add VMX cpuid feature to qemu64 Nadav Har'El
2011-01-04 15:53 ` Alexander Graf
2011-01-04 21:39   ` Nadav Har'El
2011-01-04 21:55     ` Alexander Graf
2011-01-05  8:17       ` Nadav Har'El
2011-01-05  8:32         ` Avi Kivity
2011-01-05  8:50           ` Nadav Har'El
2011-01-05  9:06             ` Avi Kivity
2011-01-05  9:22               ` Nadav Har'El

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.