From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1K3Yv6-0008WC-Dl for qemu-devel@nongnu.org; Tue, 03 Jun 2008 11:59:32 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1K3Yv4-0008Tr-LG for qemu-devel@nongnu.org; Tue, 03 Jun 2008 11:59:31 -0400 Received: from [199.232.76.173] (port=53839 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1K3Yv4-0008Th-Dj for qemu-devel@nongnu.org; Tue, 03 Jun 2008 11:59:30 -0400 Received: from mx2.suse.de ([195.135.220.15]:33427) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1K3Yv4-000097-Pi for qemu-devel@nongnu.org; Tue, 03 Jun 2008 11:59:31 -0400 Message-ID: <48455CEA.40507@suse.de> Date: Tue, 03 Jun 2008 17:02:02 +0200 From: Alexander Graf MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="------------000507020101050107000607" Subject: [Qemu-devel] [PATCH] enable SVM EFER bit Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: fabrice@bellard.org Cc: qemu-devel@nongnu.org This is a multi-part message in MIME format. --------------000507020101050107000607 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Due to the recently introduces checks for SVM activation, the SVM instructions currently throw a #UD exception if they are not activated. The activation happens through a write to the EFER which does not support the SVM bit yet. This patch adds the SVME bit to the EFER MSR write. It makes KVM work for me again. Alex --------------000507020101050107000607 Content-Type: text/x-patch; name="svm.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="svm.patch" Index: target-i386/op_helper.c =================================================================== --- target-i386/op_helper.c (revision 4652) +++ target-i386/op_helper.c (working copy) @@ -3069,6 +3069,8 @@ update_mask |= MSR_EFER_FFXSR; if (env->cpuid_ext2_features & CPUID_EXT2_NX) update_mask |= MSR_EFER_NXE; + if (env->cpuid_ext3_features & CPUID_EXT3_SVM) + update_mask |= MSR_EFER_SVME; env->efer = (env->efer & ~update_mask) | (val & update_mask); } --------------000507020101050107000607--