[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] Fix calling point for do_softirq, which should only be checked
# HG changeset patch # User fred@xxxxxxxxxxxxxxxxxxxxx # Node ID 9be7fe98a5565bf8f6297332e0367cd6904f52af # Parent bd77de43ed4ad21f0bf96afc58f1dce0695df12f Fix calling point for do_softirq, which should only be checked at the very point back to guest domain. Or else unexpected domain switch may happen in nested interrupt in Xen. Signed-off-by Kevin Tian <kevin.tian@xxxxxxxxx> diff -r bd77de43ed4a -r 9be7fe98a556 xen/arch/ia64/patch/linux-2.6.11/irq_ia64.c --- a/xen/arch/ia64/patch/linux-2.6.11/irq_ia64.c Tue Aug 2 10:13:02 2005 +++ b/xen/arch/ia64/patch/linux-2.6.11/irq_ia64.c Tue Aug 2 10:47:41 2005 @@ -20,11 +20,19 @@ __do_IRQ(local_vector_to_irq(vector), regs); /* -@@ -167,6 +173,95 @@ +@@ -167,6 +173,103 @@ irq_exit(); } +#ifdef CONFIG_VTI ++#define vmx_irq_enter() \ ++ add_preempt_count(HARDIRQ_OFFSET); ++ ++/* Now softirq will be checked when leaving hypervisor, or else ++ * scheduler irq will be executed too early. ++ */ ++#define vmx_irq_exit(void) \ ++ sub_preempt_count(HARDIRQ_OFFSET); +/* + * That's where the IVT branches when we get an external + * interrupt. This branches to the correct hardware IRQ handler via @@ -72,7 +80,7 @@ + * 16 (without this, it would be ~240, which could easily lead + * to kernel stack overflows). + */ -+ irq_enter(); ++ vmx_irq_enter(); + saved_tpr = ia64_getreg(_IA64_REG_CR_TPR); + ia64_srlz_d(); + while (vector != IA64_SPURIOUS_INT_VECTOR) { @@ -106,7 +114,7 @@ + * handler needs to be able to wait for further keyboard interrupts, which can't + * come through until ia64_eoi() has been done. + */ -+ irq_exit(); ++ vmx_irq_exit(); + if ( wake_dom0 && current != dom0 ) + domain_wake(dom0->vcpu[0]); +} _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |