# HG changeset patch
# User awilliam@xxxxxxxxxxx
# Node ID 019b7c756ddb5e588644f97f051b3dc2d6f29509
# Parent a1988768828d6a240d6f3b348bdd124c5b0e6035
[IA64] Add xen boot option "dom0_vcpus_pin"
This patch adds the xen boot option to pin Domain-0 VCPUs.
Signed-off-by: Kouya SHIMURA <kouya@xxxxxxxxxxxxxx>
Signed-off-by: Masaki Kanno <kanno.masaki@xxxxxxxxxxxxxx>
---
xen/arch/ia64/xen/domain.c | 6 +++++-
xen/arch/ia64/xen/xensetup.c | 8 ++++++++
2 files changed, 13 insertions(+), 1 deletion(-)
diff -r a1988768828d -r 019b7c756ddb xen/arch/ia64/xen/domain.c
--- a/xen/arch/ia64/xen/domain.c Sun Sep 10 15:34:14 2006 -0600
+++ b/xen/arch/ia64/xen/domain.c Tue Sep 12 11:29:02 2006 -0600
@@ -54,6 +54,7 @@ static unsigned int dom0_max_vcpus = 1;
static unsigned int dom0_max_vcpus = 1;
integer_param("dom0_max_vcpus", dom0_max_vcpus);
+extern int opt_dom0_vcpus_pin;
extern unsigned long running_on_sim;
extern char dom0_command_line[];
@@ -1020,9 +1021,12 @@ int construct_dom0(struct domain *d,
dom0_max_vcpus = MAX_VIRT_CPUS;
printf ("Dom0 max_vcpus=%d\n", dom0_max_vcpus);
- for ( i = 1; i < dom0_max_vcpus; i++ )
+ for ( i = 1; i < dom0_max_vcpus; i++ ) {
if (alloc_vcpu(d, i, i) == NULL)
printf ("Cannot allocate dom0 vcpu %d\n", i);
+ else if (opt_dom0_vcpus_pin)
+ d->vcpu[i]->cpu_affinity = cpumask_of_cpu(i);
+ }
/* Copy the OS image. */
loaddomainelfimage(d,image_start);
diff -r a1988768828d -r 019b7c756ddb xen/arch/ia64/xen/xensetup.c
--- a/xen/arch/ia64/xen/xensetup.c Sun Sep 10 15:34:14 2006 -0600
+++ b/xen/arch/ia64/xen/xensetup.c Tue Sep 12 11:29:02 2006 -0600
@@ -49,6 +49,10 @@ extern void init_IRQ(void);
extern void init_IRQ(void);
extern void trap_init(void);
+/* opt_dom0_vcpus_pin: If true, dom0 VCPUs are pinned. */
+unsigned int opt_dom0_vcpus_pin = 0;
+boolean_param("dom0_vcpus_pin", opt_dom0_vcpus_pin);
+
/* opt_nosmp: If true, secondary processors are ignored. */
static int opt_nosmp = 0;
boolean_param("nosmp", opt_nosmp);
@@ -517,6 +521,10 @@ printk("num_online_cpus=%d, max_cpus=%d\
0) != 0)
panic("Could not set up DOM0 guest OS\n");
+ /* PIN domain0 VCPU 0 on CPU 0. */
+ if (opt_dom0_vcpus_pin)
+ dom0->vcpu[0]->cpu_affinity = cpumask_of_cpu(0);
+
if (!running_on_sim) // slow on ski and pages are pre-initialized to zero
scrub_heap_pages();
_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog
|