mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 02:01:24 +01:00
[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@jp.fujitsu.com> Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
This commit is contained in:
1 parent
296b9322bc
commit
2e32ced759
2 files changed
+13
-1
No files matched your search
@@ -54,6 +54,7 @@ unsigned long dom0_align = 64*1024*1024;
|
||||
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);
|
||||
|
||||
@@ -49,6 +49,10 @@ extern void mem_init(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\n",num_online_cpus(),max_cpus);
|
||||
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();
|
||||
|
||||
|
||||