Received: from [140.186.70.92] (port=40118 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Pa8TT-0008DY-4O for qemu-devel@nongnu.org; Tue, 04 Jan 2011 10:07:00 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Pa8TR-0003WF-Ll for qemu-devel@nongnu.org; Tue, 04 Jan 2011 10:06:58 -0500 Received: from mailgw12.technion.ac.il ([132.68.225.12]:4464) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Pa8TR-0003V7-B4 for qemu-devel@nongnu.org; Tue, 04 Jan 2011 10:06:57 -0500 Date: Tue, 4 Jan 2011 17:06:31 +0200 From: "Nadav Har'El" Message-ID: <20110104150631.GA24238@fermat.math.technion.ac.il> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Subject: [Qemu-devel] [PATCH] Add VMX cpuid feature to qemu64 List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: avi@redhat.com 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 --- 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.