direct-io.hg

changeset 11750:d845c9522d9e

[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@amd.com>=20
Signed-off-by: Tom Woller <thomas.woller@amd.com>=20
author kfraser@localhost.localdomain
date Thu Oct 12 16:12:10 2006 +0100 (2006-10-12)
parents dcee7eca71af
children f14a67a35bec
files xen/arch/x86/hvm/svm/svm.c
line diff
     1.1 --- a/xen/arch/x86/hvm/svm/svm.c	Thu Oct 12 16:09:15 2006 +0100
     1.2 +++ b/xen/arch/x86/hvm/svm/svm.c	Thu Oct 12 16:12:10 2006 +0100
     1.3 @@ -840,6 +840,13 @@ int start_svm(void)
     1.4      
     1.5      if (!(test_bit(X86_FEATURE_SVME, &boot_cpu_data.x86_capability)))
     1.6          return 0;
     1.7 +
     1.8 +    /* check whether SVM feature is disabled in BIOS */
     1.9 +    rdmsr(0xC0010114, eax, edx);
    1.10 +    if ( eax & 0x00000010 ) {
    1.11 +        printk("AMD SVM Extension is disabled in BIOS.\n");
    1.12 +        return 0;
    1.13 +    }
    1.14      
    1.15      if (!(hsa[cpu] = alloc_host_save_area()))
    1.16          return 0;