ia64/xen-unstable

changeset 7628:21d175472d55

This is a fix for some device model corner cases including:
1: mistake sequence of set/clr to virtual IRQ line.
2: wrong sequence of IRQ request clear
3: Add one more place to enable_irq_window.

Signed-off-by: Eddie Dong <eddie.dong@intel.com>
author kaf24@firebug.cl.cam.ac.uk
date Fri Nov 04 11:08:45 2005 +0100 (2005-11-04)
parents 1a5861311b04
children 6a2d93c2b32d
files tools/ioemu/hw/i8259_stub.c xen/arch/x86/dm/i8259.c xen/arch/x86/vmx_io.c
line diff
     1.1 --- a/tools/ioemu/hw/i8259_stub.c	Fri Nov 04 11:06:41 2005 +0100
     1.2 +++ b/tools/ioemu/hw/i8259_stub.c	Fri Nov 04 11:08:45 2005 +0100
     1.3 @@ -55,13 +55,13 @@ void pic_set_irq(int irq, int level)
     1.4      if ( gio->pic_elcr & mask ) {
     1.5          /* level */
     1.6         if ( level ) {
     1.7 +           atomic_clear_bit(irq, &gio->pic_clear_irr);
     1.8             atomic_set_bit(irq, &gio->pic_irr);
     1.9 -           atomic_clear_bit(irq, &gio->pic_clear_irr);
    1.10             global_env->send_event = 1;
    1.11         }
    1.12         else {
    1.13 +           atomic_clear_bit(irq, &gio->pic_irr);
    1.14             atomic_set_bit(irq, &gio->pic_clear_irr);
    1.15 -           atomic_clear_bit(irq, &gio->pic_irr);
    1.16             global_env->send_event = 1;
    1.17         }
    1.18      }
     2.1 --- a/xen/arch/x86/dm/i8259.c	Fri Nov 04 11:06:41 2005 +0100
     2.2 +++ b/xen/arch/x86/dm/i8259.c	Fri Nov 04 11:08:45 2005 +0100
     2.3 @@ -512,10 +512,10 @@ int cpu_get_pic_interrupt(struct vcpu *v
     2.4      if ( !plat->interrupt_request )
     2.5          return -1;
     2.6  
     2.7 +    plat->interrupt_request = 0;
     2.8      /* read the irq from the PIC */
     2.9      intno = pic_read_irq(s);
    2.10      *type = VLAPIC_DELIV_MODE_EXT;
    2.11 -    plat->interrupt_request = 0;
    2.12      return intno;
    2.13  }
    2.14  
     3.1 --- a/xen/arch/x86/vmx_io.c	Fri Nov 04 11:06:41 2005 +0100
     3.2 +++ b/xen/arch/x86/vmx_io.c	Fri Nov 04 11:08:45 2005 +0100
     3.3 @@ -881,6 +881,7 @@ asmlinkage void vmx_intr_assist(void)
     3.4      __vmread(VM_ENTRY_INTR_INFO_FIELD, &intr_fields);
     3.5  
     3.6      if (intr_fields & INTR_INFO_VALID_MASK) {
     3.7 +        enable_irq_window(cpu_exec_control);
     3.8          VMX_DBG_LOG(DBG_LEVEL_1, "vmx_intr_assist: intr_fields: %lx",
     3.9                      intr_fields);
    3.10          return;