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

[Xen-changelog] [xen-3.0.3-testing] [HVM][SVM] Check if SVM is disabled by the BIOS before enabling it.



# HG changeset patch
# User kfraser@xxxxxxxxxxxxxxxxxxxxx
# Date 1160665930 -3600
# Node ID d845c9522d9e26d7b3cbd6a193d583a47fe3c787
# Parent  dcee7eca71afd3525543388d4aa22ec95564cdc1
[HVM][SVM] Check if SVM is disabled by the BIOS before enabling it.

Newer BIOS implementations will be able to disable the SVM feature,
although an additional test of an MSR  (VMCR 0xC0010114 bit 4) is
necessary (set equals disabled).  Bit 4 of MSR 0xc0010114 returns 0
(SVM enabled) on machines with older BIOS' without the SVM disable
feature support.

Signed-off-by: Wei Huang <wei.huang2@xxxxxxx>=20
Signed-off-by: Tom Woller <thomas.woller@xxxxxxx>=20
---
 xen/arch/x86/hvm/svm/svm.c |    7 +++++++
 1 files changed, 7 insertions(+)

diff -r dcee7eca71af -r d845c9522d9e xen/arch/x86/hvm/svm/svm.c
--- a/xen/arch/x86/hvm/svm/svm.c        Thu Oct 12 16:09:15 2006 +0100
+++ b/xen/arch/x86/hvm/svm/svm.c        Thu Oct 12 16:12:10 2006 +0100
@@ -840,6 +840,13 @@ int start_svm(void)
     
     if (!(test_bit(X86_FEATURE_SVME, &boot_cpu_data.x86_capability)))
         return 0;
+
+    /* check whether SVM feature is disabled in BIOS */
+    rdmsr(0xC0010114, eax, edx);
+    if ( eax & 0x00000010 ) {
+        printk("AMD SVM Extension is disabled in BIOS.\n");
+        return 0;
+    }
     
     if (!(hsa[cpu] = alloc_host_save_area()))
         return 0;

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.