586e33f432
21089-x86-startup-irq-from-setup-gsi.patch 21109-x86-cpu-hotplug.patch 21150-shadow-race.patch 21160-sysctl-debug-keys.patch - Updated to Xen 4.0.0 FCS, changeset 21091 - Change default lock dir (when domain locking is enabled) to /var/lib/xen/images/vm_locks - Support SXP config files in xendomains script OBS-URL: https://build.opensuse.org/package/show/Virtualization/xen?expand=0&rev=39
119 lines
3.7 KiB
Diff
119 lines
3.7 KiB
Diff
- fix tasklet_schedule_cpu() when invoked from the tasklet's handler
|
|
- properly balance (un-)pausing in continue_hypercall_on_cpu() code
|
|
paths
|
|
- bump domctl interface version (due to the addition of the "cpupool"
|
|
member to struct xen_domctl_getdomaininfo)
|
|
- move and rename csched_priv to make sure eventual backported
|
|
upstream patches using the variable get correctly adjusted (i.e.
|
|
missing adjustments get detected at build time)
|
|
- remove boot time per-CPU pool assignment messages (bnc#572146)
|
|
|
|
--- a/xen/arch/x86/domain.c
|
|
+++ b/xen/arch/x86/domain.c
|
|
@@ -1581,6 +1581,7 @@ int continue_hypercall_on_cpu(int cpu, v
|
|
|
|
v->arch.schedule_tail = continue_hypercall_on_cpu_helper;
|
|
v->arch.continue_info = info;
|
|
+ vcpu_pause_nosync(v);
|
|
}
|
|
else
|
|
{
|
|
@@ -1591,7 +1592,6 @@ int continue_hypercall_on_cpu(int cpu, v
|
|
info->func = func;
|
|
info->data = data;
|
|
|
|
- vcpu_pause_nosync(v);
|
|
tasklet_schedule_cpu(&info->tasklet, cpu);
|
|
raise_softirq(SCHEDULE_SOFTIRQ);
|
|
|
|
--- a/xen/common/sched_credit.c
|
|
+++ b/xen/common/sched_credit.c
|
|
@@ -176,7 +176,6 @@ struct csched_private {
|
|
/*
|
|
* Global variables
|
|
*/
|
|
-static struct csched_private csched_priv;
|
|
static struct csched_private *csched_priv0 = NULL;
|
|
|
|
static void csched_tick(void *_cpu);
|
|
@@ -1524,11 +1523,13 @@ static void csched_tick_resume(struct sc
|
|
}
|
|
}
|
|
|
|
+static struct csched_private _csched_priv;
|
|
+
|
|
struct scheduler sched_credit_def = {
|
|
.name = "SMP Credit Scheduler",
|
|
.opt_name = "credit",
|
|
.sched_id = XEN_SCHEDULER_CREDIT,
|
|
- .sched_data = &csched_priv,
|
|
+ .sched_data = &_csched_priv,
|
|
|
|
.init_domain = csched_dom_init,
|
|
.destroy_domain = csched_dom_destroy,
|
|
--- a/xen/common/softirq.c
|
|
+++ b/xen/common/softirq.c
|
|
@@ -104,12 +104,15 @@ static void tasklet_schedule_list(struct
|
|
{
|
|
BUG_ON(!list_empty(&t->list));
|
|
list_add_tail(&t->list, tlist);
|
|
+ t->scheduled_on = NR_CPUS;
|
|
}
|
|
t->is_scheduled = 1;
|
|
if ( cpu == smp_processor_id() )
|
|
raise_softirq(TASKLET_SOFTIRQ);
|
|
- else
|
|
+ else if ( !t->is_running )
|
|
cpu_raise_softirq(cpu, TASKLET_SOFTIRQ);
|
|
+ else
|
|
+ t->scheduled_on = cpu;
|
|
}
|
|
|
|
spin_unlock_irqrestore(&tasklet_lock, flags);
|
|
@@ -156,7 +159,15 @@ static void tasklet_action(void)
|
|
if ( t->is_scheduled )
|
|
{
|
|
BUG_ON(t->is_dead || !list_empty(&t->list));
|
|
- list_add_tail(&t->list, tlist);
|
|
+ if ( t->scheduled_on >= NR_CPUS )
|
|
+ list_add_tail(&t->list, tlist);
|
|
+ else
|
|
+ {
|
|
+ unsigned int cpu = t->scheduled_on;
|
|
+
|
|
+ list_add_tail(&t->list, &per_cpu(tasklet_list_pcpu, cpu));
|
|
+ cpu_raise_softirq(cpu, TASKLET_SOFTIRQ);
|
|
+ }
|
|
}
|
|
|
|
/*
|
|
--- a/xen/include/public/domctl.h
|
|
+++ b/xen/include/public/domctl.h
|
|
@@ -35,7 +35,7 @@
|
|
#include "xen.h"
|
|
#include "grant_table.h"
|
|
|
|
-#define XEN_DOMCTL_INTERFACE_VERSION 0x00000006
|
|
+#define XEN_DOMCTL_INTERFACE_VERSION 0x00000007
|
|
|
|
struct xenctl_cpumap {
|
|
XEN_GUEST_HANDLE_64(uint8) bitmap;
|
|
--- a/xen/include/xen/softirq.h
|
|
+++ b/xen/include/xen/softirq.h
|
|
@@ -50,12 +50,14 @@ struct tasklet
|
|
bool_t is_scheduled;
|
|
bool_t is_running;
|
|
bool_t is_dead;
|
|
+ unsigned int scheduled_on;
|
|
void (*func)(unsigned long);
|
|
unsigned long data;
|
|
};
|
|
|
|
#define DECLARE_TASKLET(name, func, data) \
|
|
- struct tasklet name = { LIST_HEAD_INIT(name.list), 0, 0, 0, func, data }
|
|
+ struct tasklet name = { LIST_HEAD_INIT(name.list), 0, 0, 0, NR_CPUS, \
|
|
+ func, data }
|
|
|
|
void tasklet_schedule(struct tasklet *t);
|
|
void tasklet_schedule_cpu(struct tasklet *t, int cpu);
|