hvm: Add command line option to enable ASID support -- on by default
authorGeorge Dunlap <george.dunlap@eu.citrix.com>
Thu, 8 Mar 2012 09:10:32 +0000 (09:10 +0000)
committerGeorge Dunlap <george.dunlap@eu.citrix.com>
Thu, 8 Mar 2012 09:10:32 +0000 (09:10 +0000)
Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com>
Signed-off-by: Keir Fraser <keir@xen.org>
xen/arch/x86/hvm/asid.c

index bfbf0d174e748bb0a602ffc4fbf35eeb7c58bc99..f69b27efcbda1e27b75c20a52b5847c2273cb214 100644 (file)
 #include <xen/percpu.h>
 #include <asm/hvm/asid.h>
 
+/* Xen command-line option to enable ASIDs */
+static int opt_asid_enabled = 1;
+boolean_param("asid", opt_asid_enabled);
+
 /*
  * ASIDs partition the physical TLB.  In the current implementation ASIDs are
  * introduced to reduce the number of TLB flushes.  Each time the guest's
@@ -62,7 +66,7 @@ void hvm_asid_init(int nasids)
     struct hvm_asid_data *data = &this_cpu(hvm_asid_data);
 
     data->max_asid = nasids - 1;
-    data->disabled = (nasids <= 1);
+    data->disabled = !opt_asid_enabled || (nasids <= 1);
 
     if ( g_disabled != data->disabled )
     {