qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH] Add VMX cpuid feature to qemu64


From: Nadav Har'El
Subject: [Qemu-devel] [PATCH] Add VMX cpuid feature to qemu64
Date: Tue, 4 Jan 2011 17:06:31 +0200
User-agent: Mutt/1.4.2.2i

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 <address@hidden>
---
 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
address@hidden             |-----------------------------------------
Phone +972-523-790466, ICQ 13349191 |We are Microsoft. You will be
http://nadav.harel.org.il           |assimilated. Resistance is futile.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]