diff options
author | Andrew Cooper <andrew.cooper3@citrix.com> | 2013-02-12 11:12:22 +0100 |
---|---|---|
committer | Andrew Cooper <andrew.cooper3@citrix.com> | 2013-02-12 11:12:22 +0100 |
commit | bf560076938e168fd6436deda6b6c856313d575b (patch) | |
tree | f16e4ab9cd0e5ea4348eed88484ae63f6f1c99b4 /xen/arch/x86/hvm/hvm.c | |
parent | f1bde87fc08ce8c818a1640a8fe4765d48923091 (diff) | |
download | xen-bf560076938e168fd6436deda6b6c856313d575b.tar.gz xen-bf560076938e168fd6436deda6b6c856313d575b.tar.bz2 xen-bf560076938e168fd6436deda6b6c856313d575b.zip |
x86/HAP: Add global enable/disable command line option
Also, correct a copy&paste error in the documentation.
Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Acked-by: Tim Deegan <tim@xen.org>
Committed-by: Jan Beulich <jbeulich@suse.com>
Diffstat (limited to 'xen/arch/x86/hvm/hvm.c')
-rw-r--r-- | xen/arch/x86/hvm/hvm.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/xen/arch/x86/hvm/hvm.c b/xen/arch/x86/hvm/hvm.c index 34b86f4f39..fcea52c737 100644 --- a/xen/arch/x86/hvm/hvm.c +++ b/xen/arch/x86/hvm/hvm.c @@ -78,6 +78,10 @@ struct hvm_function_table hvm_funcs __read_mostly; unsigned long __attribute__ ((__section__ (".bss.page_aligned"))) hvm_io_bitmap[3*PAGE_SIZE/BYTES_PER_LONG]; +/* Xen command-line option to enable HAP */ +static bool_t __initdata opt_hap_enabled = 1; +boolean_param("hap", opt_hap_enabled); + static int cpu_callback( struct notifier_block *nfb, unsigned long action, void *hcpu) { @@ -123,7 +127,14 @@ static int __init hvm_enable(void) hvm_enabled = 1; printk("HVM: %s enabled\n", hvm_funcs.name); - if ( hvm_funcs.hap_supported ) + if ( !hvm_funcs.hap_supported ) + printk("HVM: Hardware Assisted Paging (HAP) not detected\n"); + else if ( !opt_hap_enabled ) + { + hvm_funcs.hap_supported = 0; + printk("HVM: Hardware Assisted Paging (HAP) detected but disabled\n"); + } + else { printk("HVM: Hardware Assisted Paging (HAP) detected\n"); printk("HVM: HAP page sizes: 4kB"); |