From: Keir Fraser Date: Thu, 8 Mar 2012 09:43:49 +0000 (+0000) Subject: hvm: Print support/enable status of HAP superpage mappings. X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=450f664f73f52c805b9e4bcb1f3545ea09039b22;p=xen.git hvm: Print support/enable status of HAP superpage mappings. Signed-off-by: Keir Fraser --- diff --git a/xen/arch/x86/hvm/hvm.c b/xen/arch/x86/hvm/hvm.c index f7a4a3717f..e926c581a9 100644 --- a/xen/arch/x86/hvm/hvm.c +++ b/xen/arch/x86/hvm/hvm.c @@ -131,7 +131,15 @@ static int __init hvm_enable(void) printk("HVM: %s enabled\n", hvm_funcs.name); if ( hvm_funcs.hap_supported ) - printk("HVM: Hardware Assisted Paging detected.\n"); + { + printk("HVM: Hardware Assisted Paging (HAP) detected\n"); + printk("HVM: HAP page sizes: 4kB"); + if ( hvm_funcs.hap_capabilities & HVM_HAP_SUPERPAGE_2MB ) + printk(", 2MB%s", opt_hap_2mb ? "" : " [disabled]"); + if ( hvm_funcs.hap_capabilities & HVM_HAP_SUPERPAGE_1GB ) + printk(", 1GB%s", opt_hap_1gb ? "" : " [disabled]"); + printk("\n"); + } /* * Allow direct access to the PC debug ports 0x80 and 0xed (they are diff --git a/xen/arch/x86/hvm/vmx/vmcs.c b/xen/arch/x86/hvm/vmx/vmcs.c index fe4527aa75..38b5d03e7a 100644 --- a/xen/arch/x86/hvm/vmx/vmcs.c +++ b/xen/arch/x86/hvm/vmx/vmcs.c @@ -93,11 +93,6 @@ static void __init vmx_display_features(void) if ( !printed ) printk(" - none\n"); - - if ( cpu_has_vmx_ept_1gb ) - printk("EPT supports 1GB super page.\n"); - if ( cpu_has_vmx_ept_2mb ) - printk("EPT supports 2MB super page.\n"); } static u32 adjust_vmx_controls( diff --git a/xen/arch/x86/mm/p2m.c b/xen/arch/x86/mm/p2m.c index 45ed6e2766..bb54969ee5 100644 --- a/xen/arch/x86/mm/p2m.c +++ b/xen/arch/x86/mm/p2m.c @@ -40,10 +40,10 @@ #include "mm-locks.h" /* turn on/off 1GB host page table support for hap, default on */ -static bool_t __read_mostly opt_hap_1gb = 1; +bool_t __read_mostly opt_hap_1gb = 1; boolean_param("hap_1gb", opt_hap_1gb); -static bool_t __read_mostly opt_hap_2mb = 1; +bool_t __read_mostly opt_hap_2mb = 1; boolean_param("hap_2mb", opt_hap_2mb); /* Printouts */ diff --git a/xen/include/asm-x86/p2m.h b/xen/include/asm-x86/p2m.h index 44104fcbe5..a8be50d52c 100644 --- a/xen/include/asm-x86/p2m.h +++ b/xen/include/asm-x86/p2m.h @@ -32,6 +32,8 @@ #include #include /* for pagetable_t */ +extern bool_t opt_hap_1gb, opt_hap_2mb; + /* * The phys_to_machine_mapping maps guest physical frame numbers * to machine frame numbers. It only exists for paging_mode_translate