WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [xen-unstable] [IA64] Introduce dom0_vhpt_size_log2 boot

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] [IA64] Introduce dom0_vhpt_size_log2 boot option to change dom0 vhpt size
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Wed, 23 Jan 2008 01:11:30 -0800
Delivery-date: Wed, 23 Jan 2008 01:17:36 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Alex Williamson <alex.williamson@xxxxxx>
# Date 1201015580 25200
# Node ID 564fa97594a6538a16acb68d8099b71766533918
# Parent  ff90abf572f2d5aa7d4a7f764b3c343b66a06210
[IA64] Introduce dom0_vhpt_size_log2 boot option to change dom0 vhpt size

Signed-off-by: Isaku Yamahata <yamahata@xxxxxxxxxxxxx>
---
 xen/arch/ia64/xen/dom0_ops.c |   16 ++--------------
 xen/arch/ia64/xen/vhpt.c     |   16 ++++++++++++++++
 xen/arch/ia64/xen/xensetup.c |    7 +++++++
 xen/include/asm-ia64/vhpt.h  |    8 ++++++++
 4 files changed, 33 insertions(+), 14 deletions(-)

diff -r ff90abf572f2 -r 564fa97594a6 xen/arch/ia64/xen/dom0_ops.c
--- a/xen/arch/ia64/xen/dom0_ops.c      Fri Jan 18 14:11:20 2008 -0700
+++ b/xen/arch/ia64/xen/dom0_ops.c      Tue Jan 22 08:26:20 2008 -0700
@@ -20,6 +20,7 @@
 #include <xen/guest_access.h>
 #include <asm/vmx.h>
 #include <asm/dom_fw.h>
+#include <asm/vhpt.h>
 #include <xen/iocap.h>
 #include <xen/errno.h>
 #include <xen/nodemask.h>
@@ -121,20 +122,7 @@ long arch_do_domctl(xen_domctl_t *op, XE
                     for_each_vcpu (d, v)
                         v->arch.breakimm = d->arch.breakimm;
                 }
-#ifdef CONFIG_XEN_IA64_PERVCPU_VHPT
-                if (ds->vhpt_size_log2 == -1) {
-                    d->arch.has_pervcpu_vhpt = 0;
-                    ds->vhpt_size_log2 = -1;
-                    printk(XENLOG_INFO "XEN_DOMCTL_arch_setup: "
-                           "domain %d VHPT is global.\n", d->domain_id);
-                } else {
-                    d->arch.has_pervcpu_vhpt = 1;
-                    d->arch.vhpt_size_log2 = ds->vhpt_size_log2;
-                    printk(XENLOG_INFO "XEN_DOMCTL_arch_setup: "
-                           "domain %d VHPT is per vcpu. size=2**%d\n",
-                           d->domain_id, ds->vhpt_size_log2);
-                }
-#endif
+                domain_set_vhpt_size(d, ds->vhpt_size_log2);
                 if (ds->xsi_va)
                     d->arch.shared_info_va = ds->xsi_va;
                 ret = dom_fw_setup(d, ds->bp, ds->maxmem);
diff -r ff90abf572f2 -r 564fa97594a6 xen/arch/ia64/xen/vhpt.c
--- a/xen/arch/ia64/xen/vhpt.c  Fri Jan 18 14:11:20 2008 -0700
+++ b/xen/arch/ia64/xen/vhpt.c  Tue Jan 22 08:26:20 2008 -0700
@@ -153,6 +153,22 @@ void __init vhpt_init(void)
 }
 
 #ifdef CONFIG_XEN_IA64_PERVCPU_VHPT
+void
+domain_set_vhpt_size(struct domain *d, int8_t vhpt_size_log2)
+{
+       if (vhpt_size_log2 == -1) {
+               d->arch.has_pervcpu_vhpt = 0;
+               printk(XENLOG_INFO "XEN_DOMCTL_arch_setup: "
+                      "domain %d VHPT is global.\n", d->domain_id);
+       } else {
+               d->arch.has_pervcpu_vhpt = 1;
+               d->arch.vhpt_size_log2 = vhpt_size_log2;
+               printk(XENLOG_INFO "XEN_DOMCTL_arch_setup: "
+                      "domain %d VHPT is per vcpu. size=2**%d\n",
+                      d->domain_id, vhpt_size_log2);
+       }
+}
+
 int
 pervcpu_vhpt_alloc(struct vcpu *v)
 {
diff -r ff90abf572f2 -r 564fa97594a6 xen/arch/ia64/xen/xensetup.c
--- a/xen/arch/ia64/xen/xensetup.c      Fri Jan 18 14:11:20 2008 -0700
+++ b/xen/arch/ia64/xen/xensetup.c      Tue Jan 22 08:26:20 2008 -0700
@@ -22,6 +22,7 @@
 #include <asm/meminit.h>
 #include <asm/page.h>
 #include <asm/setup.h>
+#include <asm/vhpt.h>
 #include <xen/string.h>
 #include <asm/vmx.h>
 #include <linux/efi.h>
@@ -328,6 +329,11 @@ is_platform_hp_ski(void)
 
     return 1;
 }
+
+#ifdef CONFIG_XEN_IA64_PERVCPU_VHPT
+static int __initdata dom0_vhpt_size_log2;
+integer_param("dom0_vhpt_size_log2", dom0_vhpt_size_log2);
+#endif
 
 void __init start_kernel(void)
 {
@@ -630,6 +636,7 @@ printk("num_online_cpus=%d, max_cpus=%d\
     dom0 = domain_create(0, 0, DOM0_SSIDREF);
     if (dom0 == NULL)
         panic("Error creating domain 0\n");
+    domain_set_vhpt_size(dom0, dom0_vhpt_size_log2);
     dom0_vcpu0 = alloc_vcpu(dom0, 0, 0);
     if (dom0_vcpu0 == NULL || vcpu_late_initialise(dom0_vcpu0) != 0)
         panic("Cannot allocate dom0 vcpu 0\n");
diff -r ff90abf572f2 -r 564fa97594a6 xen/include/asm-ia64/vhpt.h
--- a/xen/include/asm-ia64/vhpt.h       Fri Jan 18 14:11:20 2008 -0700
+++ b/xen/include/asm-ia64/vhpt.h       Tue Jan 22 08:26:20 2008 -0700
@@ -55,8 +55,16 @@ DECLARE_PER_CPU (unsigned long, vhpt_pen
 #endif
 
 #include <xen/sched.h>
+#ifdef CONFIG_XEN_IA64_PERVCPU_VHPT
+void domain_set_vhpt_size(struct domain *d, int8_t vhpt_size_log2);
 int pervcpu_vhpt_alloc(struct vcpu *v);
 void pervcpu_vhpt_free(struct vcpu *v);
+#else
+#define domain_set_vhpt_size(d, vhpt_size_log2) do { } while (0)
+#define pervcpu_vhpt_alloc(v)                   (0)
+#define pervcpu_vhpt_free(v)                    do { } while (0)
+#endif
+
 static inline unsigned long
 vcpu_vhpt_maddr(struct vcpu* v)
 {

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] [IA64] Introduce dom0_vhpt_size_log2 boot option to change dom0 vhpt size, Xen patchbot-unstable <=