[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-unstable] x86/HAP: Add global enable/disable command line option


  • To: xen-changelog@xxxxxxxxxxxxxxxxxxx
  • From: Xen patchbot-unstable <patchbot@xxxxxxx>
  • Date: Wed, 13 Feb 2013 17:11:09 +0000
  • Delivery-date: Wed, 13 Feb 2013 17:11:26 +0000
  • List-id: "Change log for Mercurial \(receive only\)" <xen-changelog.lists.xen.org>

# HG changeset patch
# User Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
# Date 1360663942 -3600
# Node ID 171018fef8f882aeb7acf8279d0f4c5befb2b6ea
# Parent  fd997a96d448ba1893601ef3e742696e53feddb4
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@xxxxxxxxxx>
Acked-by: Tim Deegan <tim@xxxxxxx>
Committed-by: Jan Beulich <jbeulich@xxxxxxxx>
---


diff -r fd997a96d448 -r 171018fef8f8 docs/misc/xen-command-line.markdown
--- a/docs/misc/xen-command-line.markdown       Fri Feb 08 11:06:04 2013 +0100
+++ b/docs/misc/xen-command-line.markdown       Tue Feb 12 11:12:22 2013 +0100
@@ -521,6 +521,14 @@ more importance will be printed.
 The optional `<rate-limited level>` option instructs which severities
 should be rate limited.
 
+### hap
+> `= <boolean>`
+
+> Default: `true`
+
+Flag to globally enable or disable support for Hardware Assisted
+Paging (HAP)
+
 ### hap\_1gb
 > `= <boolean>`
 
@@ -534,7 +542,7 @@ Paging (HAP).
 
 > Default: `true`
 
-Flag to enable 1 GB host page table support for Hardware Assisted
+Flag to enable 2 MB host page table support for Hardware Assisted
 Paging (HAP).
 
 ### hpetbroadcast
diff -r fd997a96d448 -r 171018fef8f8 xen/arch/x86/hvm/hvm.c
--- a/xen/arch/x86/hvm/hvm.c    Fri Feb 08 11:06:04 2013 +0100
+++ b/xen/arch/x86/hvm/hvm.c    Tue Feb 12 11:12:22 2013 +0100
@@ -78,6 +78,10 @@ struct hvm_function_table hvm_funcs __re
 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");

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.