diff options
author | Keir Fraser <keir@xen.org> | 2012-03-09 10:03:04 +0000 |
---|---|---|
committer | Keir Fraser <keir@xen.org> | 2012-03-09 10:03:04 +0000 |
commit | d06fbe3b38c04fabdb926382ec0ca4a275531f72 (patch) | |
tree | c2cf5eb2c7ee0ccb112ab62aa63c1ac49bb3347a | |
parent | cca14182abc7bd97c15603da1141d5a62610c850 (diff) | |
download | xen-d06fbe3b38c04fabdb926382ec0ca4a275531f72.tar.gz xen-d06fbe3b38c04fabdb926382ec0ca4a275531f72.tar.bz2 xen-d06fbe3b38c04fabdb926382ec0ca4a275531f72.zip |
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
-rw-r--r-- | xen/arch/x86/hvm/hvm.c | 10 | ||||
-rw-r--r-- | xen/arch/x86/hvm/vmx/vmcs.c | 5 | ||||
-rw-r--r-- | xen/arch/x86/mm/p2m.c | 4 | ||||
-rw-r--r-- | xen/include/asm-x86/p2m.h | 2 |
4 files changed, 13 insertions, 8 deletions
diff --git a/xen/arch/x86/hvm/hvm.c b/xen/arch/x86/hvm/hvm.c index b7d6ffa163..109c72b3ea 100644 --- a/xen/arch/x86/hvm/hvm.c +++ b/xen/arch/x86/hvm/hvm.c @@ -132,7 +132,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 b98ce3ab13..6966accd1b 100644 --- a/xen/arch/x86/hvm/vmx/vmcs.c +++ b/xen/arch/x86/hvm/vmx/vmcs.c @@ -92,11 +92,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 262c24a574..7ff70a69c7 100644 --- a/xen/arch/x86/mm/p2m.c +++ b/xen/arch/x86/mm/p2m.c @@ -40,10 +40,10 @@ #define P2M_DEBUGGING 0 /* 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 92e0703667..4dbe6def10 100644 --- a/xen/include/asm-x86/p2m.h +++ b/xen/include/asm-x86/p2m.h @@ -31,6 +31,8 @@ #include <asm/mem_sharing.h> #include <asm/page.h> /* 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 |