ia64/xen-unstable

changeset 5952:9be7fe98a556

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@intel.com>
author fred@xuni-t01.sc.intel.com
date Tue Aug 02 02:47:41 2005 -0800 (2005-08-02)
parents bd77de43ed4a
children e173a853dc46
files xen/arch/ia64/patch/linux-2.6.11/irq_ia64.c
line diff
     1.1 --- a/xen/arch/ia64/patch/linux-2.6.11/irq_ia64.c	Tue Aug 02 02:13:02 2005 -0800
     1.2 +++ b/xen/arch/ia64/patch/linux-2.6.11/irq_ia64.c	Tue Aug 02 02:47:41 2005 -0800
     1.3 @@ -20,11 +20,19 @@
     1.4   			__do_IRQ(local_vector_to_irq(vector), regs);
     1.5   
     1.6   			/*
     1.7 -@@ -167,6 +173,95 @@
     1.8 +@@ -167,6 +173,103 @@
     1.9   	irq_exit();
    1.10   }
    1.11   
    1.12  +#ifdef  CONFIG_VTI
    1.13 ++#define vmx_irq_enter()		\
    1.14 ++	add_preempt_count(HARDIRQ_OFFSET);
    1.15 ++
    1.16 ++/* Now softirq will be checked when leaving hypervisor, or else
    1.17 ++ * scheduler irq will be executed too early.
    1.18 ++ */
    1.19 ++#define vmx_irq_exit(void)	\
    1.20 ++	sub_preempt_count(HARDIRQ_OFFSET);
    1.21  +/*
    1.22  + * That's where the IVT branches when we get an external
    1.23  + * interrupt. This branches to the correct hardware IRQ handler via
    1.24 @@ -72,7 +80,7 @@
    1.25  +	 * 16 (without this, it would be ~240, which could easily lead
    1.26  +	 * to kernel stack overflows).
    1.27  +	 */
    1.28 -+	irq_enter();
    1.29 ++	vmx_irq_enter();
    1.30  +	saved_tpr = ia64_getreg(_IA64_REG_CR_TPR);
    1.31  +	ia64_srlz_d();
    1.32  +	while (vector != IA64_SPURIOUS_INT_VECTOR) {
    1.33 @@ -106,7 +114,7 @@
    1.34  +	 * handler needs to be able to wait for further keyboard interrupts, which can't
    1.35  +	 * come through until ia64_eoi() has been done.
    1.36  +	 */
    1.37 -+	irq_exit();
    1.38 ++	vmx_irq_exit();
    1.39  +	if ( wake_dom0 && current != dom0 ) 
    1.40  +		domain_wake(dom0->vcpu[0]);
    1.41  +}