direct-io.hg

changeset 11751:f14a67a35bec

[HVM][SVM] Use proper name for the K8 VM_CR MSR.
Signed-off-by: Keir Fraser <keir@xensource.com>
author kfraser@localhost.localdomain
date Thu Oct 12 17:53:51 2006 +0100 (2006-10-12)
parents d845c9522d9e
children 49d096ef3d76
files xen/arch/x86/hvm/svm/svm.c xen/include/asm-x86/msr.h
line diff
     1.1 --- a/xen/arch/x86/hvm/svm/svm.c	Thu Oct 12 16:12:10 2006 +0100
     1.2 +++ b/xen/arch/x86/hvm/svm/svm.c	Thu Oct 12 17:53:51 2006 +0100
     1.3 @@ -842,12 +842,13 @@ int start_svm(void)
     1.4          return 0;
     1.5  
     1.6      /* check whether SVM feature is disabled in BIOS */
     1.7 -    rdmsr(0xC0010114, eax, edx);
     1.8 -    if ( eax & 0x00000010 ) {
     1.9 +    rdmsr(MSR_K8_VM_CR, eax, edx);
    1.10 +    if ( eax & K8_VMCR_SVME_DISABLE )
    1.11 +    {
    1.12          printk("AMD SVM Extension is disabled in BIOS.\n");
    1.13          return 0;
    1.14      }
    1.15 -    
    1.16 +
    1.17      if (!(hsa[cpu] = alloc_host_save_area()))
    1.18          return 0;
    1.19      
     2.1 --- a/xen/include/asm-x86/msr.h	Thu Oct 12 16:12:10 2006 +0100
     2.2 +++ b/xen/include/asm-x86/msr.h	Thu Oct 12 17:53:51 2006 +0100
     2.3 @@ -302,8 +302,14 @@ static inline void wrmsrl(unsigned int m
     2.4  
     2.5  #define MSR_K8_TOP_MEM1			0xC001001A
     2.6  #define MSR_K8_TOP_MEM2			0xC001001D
     2.7 +#define MSR_K8_SYSCFG			0xC0010010
     2.8 +#define MSR_K8_HWCR			0xC0010015
     2.9 +#define MSR_K8_VM_CR			0xC0010114
    2.10  #define MSR_K8_VM_HSAVE_PA		0xC0010117
    2.11 -#define MSR_K8_SYSCFG			0xC0000010	
    2.12 +
    2.13 +/* MSR_K8_VM_CR bits: */
    2.14 +#define _K8_VMCR_SVME_DISABLE		4
    2.15 +#define K8_VMCR_SVME_DISABLE		(1 << _K8_VMCR_SVME_DISABLE)
    2.16  
    2.17  /* Centaur-Hauls/IDT defined MSRs. */
    2.18  #define MSR_IDT_FCR1			0x107