xcp-1.6-updates/xen-4.1.hg

changeset 23264:3f158dd40b31

hvm: Print support/enable status of HAP superpage mappings.

Signed-off-by: Keir Fraser <keir@xen.org>
xen-unstable changeset: 24992:0384f791e538
xen-unstable date: Thu Mar 08 09:43:49 2012 +0000
author Keir Fraser <keir@xen.org>
date Fri Mar 09 10:03:04 2012 +0000 (2012-03-09)
parents b01091775dd9
children 0f1958876090
files xen/arch/x86/hvm/hvm.c xen/arch/x86/hvm/vmx/vmcs.c xen/arch/x86/mm/p2m.c xen/include/asm-x86/p2m.h
line diff
     1.1 --- a/xen/arch/x86/hvm/hvm.c	Thu Mar 08 10:05:04 2012 +0000
     1.2 +++ b/xen/arch/x86/hvm/hvm.c	Fri Mar 09 10:03:04 2012 +0000
     1.3 @@ -132,7 +132,15 @@ static int __init hvm_enable(void)
     1.4  
     1.5      printk("HVM: %s enabled\n", hvm_funcs.name);
     1.6      if ( hvm_funcs.hap_supported )
     1.7 -        printk("HVM: Hardware Assisted Paging detected.\n");
     1.8 +    {
     1.9 +        printk("HVM: Hardware Assisted Paging (HAP) detected\n");
    1.10 +        printk("HVM: HAP page sizes: 4kB");
    1.11 +        if ( hvm_funcs.hap_capabilities & HVM_HAP_SUPERPAGE_2MB )
    1.12 +            printk(", 2MB%s", opt_hap_2mb ? "" : " [disabled]");
    1.13 +        if ( hvm_funcs.hap_capabilities & HVM_HAP_SUPERPAGE_1GB )
    1.14 +            printk(", 1GB%s", opt_hap_1gb ? "" : " [disabled]");
    1.15 +        printk("\n");
    1.16 +    }
    1.17  
    1.18      /*
    1.19       * Allow direct access to the PC debug ports 0x80 and 0xed (they are
     2.1 --- a/xen/arch/x86/hvm/vmx/vmcs.c	Thu Mar 08 10:05:04 2012 +0000
     2.2 +++ b/xen/arch/x86/hvm/vmx/vmcs.c	Fri Mar 09 10:03:04 2012 +0000
     2.3 @@ -92,11 +92,6 @@ static void __init vmx_display_features(
     2.4  
     2.5      if ( !printed )
     2.6          printk(" - none\n");
     2.7 -
     2.8 -    if ( cpu_has_vmx_ept_1gb )
     2.9 -        printk("EPT supports 1GB super page.\n");
    2.10 -    if ( cpu_has_vmx_ept_2mb )
    2.11 -        printk("EPT supports 2MB super page.\n");
    2.12  }
    2.13  
    2.14  static u32 adjust_vmx_controls(
     3.1 --- a/xen/arch/x86/mm/p2m.c	Thu Mar 08 10:05:04 2012 +0000
     3.2 +++ b/xen/arch/x86/mm/p2m.c	Fri Mar 09 10:03:04 2012 +0000
     3.3 @@ -40,10 +40,10 @@
     3.4  #define P2M_DEBUGGING 0
     3.5  
     3.6  /* turn on/off 1GB host page table support for hap, default on */
     3.7 -static bool_t __read_mostly opt_hap_1gb = 1;
     3.8 +bool_t __read_mostly opt_hap_1gb = 1;
     3.9  boolean_param("hap_1gb", opt_hap_1gb);
    3.10  
    3.11 -static bool_t __read_mostly opt_hap_2mb = 1;
    3.12 +bool_t __read_mostly opt_hap_2mb = 1;
    3.13  boolean_param("hap_2mb", opt_hap_2mb);
    3.14  
    3.15  /* Printouts */
     4.1 --- a/xen/include/asm-x86/p2m.h	Thu Mar 08 10:05:04 2012 +0000
     4.2 +++ b/xen/include/asm-x86/p2m.h	Fri Mar 09 10:03:04 2012 +0000
     4.3 @@ -31,6 +31,8 @@
     4.4  #include <asm/mem_sharing.h>
     4.5  #include <asm/page.h>    /* for pagetable_t */
     4.6  
     4.7 +extern bool_t opt_hap_1gb, opt_hap_2mb;
     4.8 +
     4.9  /*
    4.10   * The phys_to_machine_mapping maps guest physical frame numbers 
    4.11   * to machine frame numbers.  It only exists for paging_mode_translate