ia64/xen-unstable

changeset 9957:0afdf20b3efa

Merged.
author emellor@leeni.uk.xensource.com
date Fri May 05 18:36:26 2006 +0100 (2006-05-05)
parents d61fc1f33954 7fd7f276bb38
children 491f3f48704e
files
line diff
     1.1 --- a/linux-2.6-xen-sparse/drivers/xen/netback/netback.c	Fri May 05 18:36:12 2006 +0100
     1.2 +++ b/linux-2.6-xen-sparse/drivers/xen/netback/netback.c	Fri May 05 18:36:26 2006 +0100
     1.3 @@ -659,6 +659,7 @@ static void net_tx_action(unsigned long 
     1.4  
     1.5  		skb->data_len  = txreq.size - data_len;
     1.6  		skb->len      += skb->data_len;
     1.7 +		skb->truesize += skb->data_len;
     1.8  
     1.9  		skb->dev      = netif->dev;
    1.10  		skb->protocol = eth_type_trans(skb, skb->dev);
     2.1 --- a/linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_probe.c	Fri May 05 18:36:12 2006 +0100
     2.2 +++ b/linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_probe.c	Fri May 05 18:36:26 2006 +0100
     2.3 @@ -1069,6 +1069,11 @@ static int __init wait_for_devices(void)
     2.4  {
     2.5  	unsigned long timeout = jiffies + 10*HZ;
     2.6  
     2.7 +	if (xen_init() < 0) {
     2.8 +		DPRINTK("failed");
     2.9 +		return -ENODEV;
    2.10 +	}
    2.11 +
    2.12  	while (time_before(jiffies, timeout)) {
    2.13  		if (all_devices_ready())
    2.14  			return 0;
     3.1 --- a/linux-2.6-xen-sparse/scripts/Makefile.xen	Fri May 05 18:36:12 2006 +0100
     3.2 +++ b/linux-2.6-xen-sparse/scripts/Makefile.xen	Fri May 05 18:36:26 2006 +0100
     3.3 @@ -2,9 +2,9 @@
     3.4  # cherrypickxen($1 = allobj)
     3.5  cherrypickxen = $(foreach var, $(1), \
     3.6  		$(shell o=$(var); \
     3.7 -			c=$${o/%.o/-xen.c}; \
     3.8 -			s=$${o/%.o/-xen.S}; \
     3.9 -			oxen=$${o/%.o/-xen.o}; \
    3.10 +			c=$${o%.o}-xen.c; \
    3.11 +			s=$${o%.o}-xen.S; \
    3.12 +			oxen=$${o%.o}-xen.o; \
    3.13  			[ -f $(srctree)/$(src)/$${c} ] || \
    3.14  			   [ -f $(srctree)/$(src)/$${s} ] \
    3.15  				&& echo $$oxen \
     4.1 --- a/tools/ioemu/configure	Fri May 05 18:36:12 2006 +0100
     4.2 +++ b/tools/ioemu/configure	Fri May 05 18:36:26 2006 +0100
     4.3 @@ -230,7 +230,7 @@ fi
     4.4  
     4.5  if test -z "$vnc"; then
     4.6  
     4.7 -if libvncserver-config --version >& /dev/null; then
     4.8 +if libvncserver-config --version > /dev/null 2>&1; then
     4.9      vnc=yes
    4.10  else
    4.11      vnc=no
     5.1 --- a/tools/python/xen/xend/XendBootloader.py	Fri May 05 18:36:12 2006 +0100
     5.2 +++ b/tools/python/xen/xend/XendBootloader.py	Fri May 05 18:36:26 2006 +0100
     5.3 @@ -19,7 +19,7 @@ import sxp
     5.4  from XendLogging import log
     5.5  from XendError import VmError
     5.6  
     5.7 -def bootloader(blexec, disk, quiet = 0, blargs = None):
     5.8 +def bootloader(blexec, disk, quiet = 0, blargs = None, imgcfg = None):
     5.9      """Run the boot loader executable on the given disk and return a
    5.10      config image.
    5.11      @param blexec  Binary to use as the boot loader
    5.12 @@ -86,4 +86,10 @@ def bootloader(blexec, disk, quiet = 0, 
    5.13      pin = sxp.Parser()
    5.14      pin.input(ret)
    5.15      pin.input_eof()
    5.16 -    return pin.val
    5.17 +    blcfg = pin.val
    5.18 +
    5.19 +    if imgcfg is None:
    5.20 +        return blcfg
    5.21 +    else:
    5.22 +        c = sxp.merge(blcfg, imgcfg)
    5.23 +        return c
     6.1 --- a/tools/python/xen/xend/XendDomainInfo.py	Fri May 05 18:36:12 2006 +0100
     6.2 +++ b/tools/python/xen/xend/XendDomainInfo.py	Fri May 05 18:36:26 2006 +0100
     6.3 @@ -1633,7 +1633,8 @@ class XendDomainInfo:
     6.4                  continue
     6.5              fn = blkdev_uname_to_file(disk)
     6.6              blcfg = bootloader(self.info['bootloader'], fn, 1,
     6.7 -                               self.info['bootloader_args'])
     6.8 +                               self.info['bootloader_args'],
     6.9 +                               self.info['image'])
    6.10              break
    6.11          if blcfg is None:
    6.12              msg = "Had a bootloader specified, but can't find disk"
     7.1 --- a/tools/python/xen/xend/server/pciif.py	Fri May 05 18:36:12 2006 +0100
     7.2 +++ b/tools/python/xen/xend/server/pciif.py	Fri May 05 18:36:26 2006 +0100
     7.3 @@ -94,7 +94,7 @@ class PciController(DevController):
     7.4  
     7.5          else:
     7.6              # Xen 2.0 configuration compatibility
     7.7 -            domain = get_param(dev_config, 'domain', 0)
     7.8 +            domain = get_param(config, 'domain', 0)
     7.9              bus  = get_param(config, 'bus')
    7.10              slot = get_param(config, 'dev')
    7.11              func = get_param(config, 'func')
     8.1 --- a/tools/python/xen/xm/create.py	Fri May 05 18:36:12 2006 +0100
     8.2 +++ b/tools/python/xen/xm/create.py	Fri May 05 18:36:26 2006 +0100
     8.3 @@ -448,8 +448,11 @@ def strip(pre, s):
     8.4  def configure_image(vals):
     8.5      """Create the image config.
     8.6      """
     8.7 +    if not vals.builder:
     8.8 +        return None
     8.9      config_image = [ vals.builder ]
    8.10 -    config_image.append([ 'kernel', os.path.abspath(vals.kernel) ])
    8.11 +    if vals.kernel:
    8.12 +        config_image.append([ 'kernel', os.path.abspath(vals.kernel) ])
    8.13      if vals.ramdisk:
    8.14          config_image.append([ 'ramdisk', os.path.abspath(vals.ramdisk) ])
    8.15      if vals.cmdline_ip:
    8.16 @@ -616,7 +619,7 @@ def configure_hvm(config_image, vals):
    8.17          if (vals.__dict__[a]):
    8.18              config_image.append([a, vals.__dict__[a]])
    8.19  
    8.20 -def run_bootloader(vals):
    8.21 +def run_bootloader(vals, config_image):
    8.22      if not os.access(vals.bootloader, os.X_OK):
    8.23          err("Bootloader isn't executable")
    8.24      if len(vals.disk) < 1:
    8.25 @@ -630,7 +633,7 @@ def run_bootloader(vals):
    8.26          vals.bootargs = "--entry=%s" %(vals.bootentry,)
    8.27  
    8.28      return bootloader(vals.bootloader, file, not vals.console_autoconnect,
    8.29 -                      vals.bootargs)
    8.30 +                      vals.bootargs, config_image)
    8.31  
    8.32  def make_config(vals):
    8.33      """Create the domain configuration.
    8.34 @@ -662,13 +665,12 @@ def make_config(vals):
    8.35      if vals.tpmif:
    8.36          config.append(['backend', ['tpmif']])
    8.37  
    8.38 +    config_image = configure_image(vals)
    8.39      if vals.bootloader:
    8.40 -        config_image = run_bootloader(vals)
    8.41 +        config_image = run_bootloader(vals, config_image)
    8.42          config.append(['bootloader', vals.bootloader])
    8.43          if vals.bootargs:
    8.44              config.append(['bootloader_args'], vals.bootargs)
    8.45 -    else:
    8.46 -        config_image = configure_image(vals)
    8.47      config.append(['image', config_image])
    8.48  
    8.49      config_devs = []
     9.1 --- a/xen/arch/x86/domain.c	Fri May 05 18:36:12 2006 +0100
     9.2 +++ b/xen/arch/x86/domain.c	Fri May 05 18:36:26 2006 +0100
     9.3 @@ -753,7 +753,10 @@ int __sync_lazy_execstate(void)
     9.4      switch_required = (this_cpu(curr_vcpu) != current);
     9.5  
     9.6      if ( switch_required )
     9.7 +    {
     9.8 +        ASSERT(current == idle_vcpu[smp_processor_id()]);
     9.9          __context_switch();
    9.10 +    }
    9.11  
    9.12      local_irq_restore(flags);
    9.13  
    10.1 --- a/xen/arch/x86/hvm/svm/svm.c	Fri May 05 18:36:12 2006 +0100
    10.2 +++ b/xen/arch/x86/hvm/svm/svm.c	Fri May 05 18:36:26 2006 +0100
    10.3 @@ -2821,11 +2821,7 @@ asmlinkage void svm_load_cr2(void)
    10.4      struct vcpu *v = current;
    10.5  
    10.6      local_irq_disable();
    10.7 -#ifdef __i386__
    10.8 -    asm volatile("movl %0,%%cr2": :"r" (v->arch.hvm_svm.cpu_cr2));
    10.9 -#else
   10.10 -    asm volatile("movq %0,%%cr2": :"r" (v->arch.hvm_svm.cpu_cr2));
   10.11 -#endif
   10.12 +    asm volatile("mov %0,%%cr2": :"r" (v->arch.hvm_svm.cpu_cr2));
   10.13  }
   10.14  
   10.15  asmlinkage void svm_asid(void)
    11.1 --- a/xen/arch/x86/hvm/vmx/io.c	Fri May 05 18:36:12 2006 +0100
    11.2 +++ b/xen/arch/x86/hvm/vmx/io.c	Fri May 05 18:36:26 2006 +0100
    11.3 @@ -166,20 +166,26 @@ asmlinkage void vmx_intr_assist(void)
    11.4      }
    11.5  
    11.6      has_ext_irq = cpu_has_pending_irq(v);
    11.7 +
    11.8 +    if (unlikely(v->arch.hvm_vmx.vector_injected)) {
    11.9 +        v->arch.hvm_vmx.vector_injected=0;
   11.10 +        if (unlikely(has_ext_irq)) enable_irq_window(v);
   11.11 +        return;
   11.12 +    }
   11.13 +
   11.14      __vmread(IDT_VECTORING_INFO_FIELD, &idtv_info_field);
   11.15 -    if (idtv_info_field & INTR_INFO_VALID_MASK) {
   11.16 +    if (unlikely(idtv_info_field & INTR_INFO_VALID_MASK)) {
   11.17          __vmwrite(VM_ENTRY_INTR_INFO_FIELD, idtv_info_field);
   11.18  
   11.19          __vmread(VM_EXIT_INSTRUCTION_LEN, &inst_len);
   11.20 -        if (inst_len >= 1 && inst_len <= 15)
   11.21 -            __vmwrite(VM_ENTRY_INSTRUCTION_LEN, inst_len);
   11.22 +        __vmwrite(VM_ENTRY_INSTRUCTION_LEN, inst_len);
   11.23  
   11.24 -        if (idtv_info_field & 0x800) { /* valid error code */
   11.25 +        if (unlikely(idtv_info_field & 0x800)) { /* valid error code */
   11.26              unsigned long error_code;
   11.27              __vmread(IDT_VECTORING_ERROR_CODE, &error_code);
   11.28              __vmwrite(VM_ENTRY_EXCEPTION_ERROR_CODE, error_code);
   11.29          }
   11.30 -        if ( has_ext_irq )
   11.31 +        if (unlikely(has_ext_irq))
   11.32              enable_irq_window(v);
   11.33  
   11.34          HVM_DBG_LOG(DBG_LEVEL_1, "idtv_info_field=%x", idtv_info_field);
   11.35 @@ -187,8 +193,9 @@ asmlinkage void vmx_intr_assist(void)
   11.36          return;
   11.37      }
   11.38  
   11.39 -    if ( !has_ext_irq ) return;
   11.40 -    if ( is_interruptibility_state() ) {    /* pre-cleared for emulated instruction */
   11.41 +    if (likely(!has_ext_irq)) return;
   11.42 +
   11.43 +    if (unlikely(is_interruptibility_state())) {    /* pre-cleared for emulated instruction */
   11.44          enable_irq_window(v);
   11.45          HVM_DBG_LOG(DBG_LEVEL_1, "interruptibility");
   11.46          return;
    12.1 --- a/xen/arch/x86/hvm/vmx/vmx.c	Fri May 05 18:36:12 2006 +0100
    12.2 +++ b/xen/arch/x86/hvm/vmx/vmx.c	Fri May 05 18:36:26 2006 +0100
    12.3 @@ -893,6 +893,20 @@ static void vmx_vmexit_do_cpuid(struct c
    12.4  #define CASE_GET_REG_P(REG, reg)    \
    12.5      case REG_ ## REG: reg_p = (unsigned long *)&(regs->reg); break
    12.6  
    12.7 +#ifdef __i386__
    12.8 +#define CASE_EXTEND_GET_REG_P
    12.9 +#else
   12.10 +#define CASE_EXTEND_GET_REG_P       \
   12.11 +    CASE_GET_REG_P(R8, r8);         \
   12.12 +    CASE_GET_REG_P(R9, r9);         \
   12.13 +    CASE_GET_REG_P(R10, r10);       \
   12.14 +    CASE_GET_REG_P(R11, r11);       \
   12.15 +    CASE_GET_REG_P(R12, r12);       \
   12.16 +    CASE_GET_REG_P(R13, r13);       \
   12.17 +    CASE_GET_REG_P(R14, r14);       \
   12.18 +    CASE_GET_REG_P(R15, r15)
   12.19 +#endif
   12.20 +
   12.21  static void vmx_dr_access (unsigned long exit_qualification, struct cpu_user_regs *regs)
   12.22  {
   12.23      unsigned int reg;
   12.24 @@ -908,14 +922,15 @@ static void vmx_dr_access (unsigned long
   12.25                  "vmx_dr_access : eip=%lx, reg=%d, exit_qualification = %lx",
   12.26                  eip, reg, exit_qualification);
   12.27  
   12.28 -    switch(exit_qualification & DEBUG_REG_ACCESS_REG) {
   12.29 -        CASE_GET_REG_P(EAX, eax);
   12.30 -        CASE_GET_REG_P(ECX, ecx);
   12.31 -        CASE_GET_REG_P(EDX, edx);
   12.32 -        CASE_GET_REG_P(EBX, ebx);
   12.33 -        CASE_GET_REG_P(EBP, ebp);
   12.34 -        CASE_GET_REG_P(ESI, esi);
   12.35 -        CASE_GET_REG_P(EDI, edi);
   12.36 +    switch ( exit_qualification & DEBUG_REG_ACCESS_REG ) {
   12.37 +    CASE_GET_REG_P(EAX, eax);
   12.38 +    CASE_GET_REG_P(ECX, ecx);
   12.39 +    CASE_GET_REG_P(EDX, edx);
   12.40 +    CASE_GET_REG_P(EBX, ebx);
   12.41 +    CASE_GET_REG_P(EBP, ebp);
   12.42 +    CASE_GET_REG_P(ESI, esi);
   12.43 +    CASE_GET_REG_P(EDI, edi);
   12.44 +    CASE_EXTEND_GET_REG_P;
   12.45      case REG_ESP:
   12.46          break;
   12.47      default:
   12.48 @@ -1525,29 +1540,30 @@ static int vmx_set_cr0(unsigned long val
   12.49      return 1;
   12.50  }
   12.51  
   12.52 -#define CASE_GET_REG(REG, reg)  \
   12.53 +#define CASE_SET_REG(REG, reg)      \
   12.54 +    case REG_ ## REG: regs->reg = value; break
   12.55 +#define CASE_GET_REG(REG, reg)      \
   12.56      case REG_ ## REG: value = regs->reg; break
   12.57  
   12.58 -#define CASE_EXTEND_SET_REG \
   12.59 -      CASE_EXTEND_REG(S)
   12.60 -#define CASE_EXTEND_GET_REG \
   12.61 -      CASE_EXTEND_REG(G)
   12.62 +#define CASE_EXTEND_SET_REG         \
   12.63 +    CASE_EXTEND_REG(S)
   12.64 +#define CASE_EXTEND_GET_REG         \
   12.65 +    CASE_EXTEND_REG(G)
   12.66  
   12.67  #ifdef __i386__
   12.68  #define CASE_EXTEND_REG(T)
   12.69  #else
   12.70 -#define CASE_EXTEND_REG(T)    \
   12.71 -    CASE_ ## T ## ET_REG(R8, r8); \
   12.72 -    CASE_ ## T ## ET_REG(R9, r9); \
   12.73 +#define CASE_EXTEND_REG(T)          \
   12.74 +    CASE_ ## T ## ET_REG(R8, r8);   \
   12.75 +    CASE_ ## T ## ET_REG(R9, r9);   \
   12.76      CASE_ ## T ## ET_REG(R10, r10); \
   12.77      CASE_ ## T ## ET_REG(R11, r11); \
   12.78      CASE_ ## T ## ET_REG(R12, r12); \
   12.79      CASE_ ## T ## ET_REG(R13, r13); \
   12.80      CASE_ ## T ## ET_REG(R14, r14); \
   12.81 -    CASE_ ## T ## ET_REG(R15, r15);
   12.82 +    CASE_ ## T ## ET_REG(R15, r15)
   12.83  #endif
   12.84  
   12.85 -
   12.86  /*
   12.87   * Write to control registers
   12.88   */
   12.89 @@ -1557,31 +1573,28 @@ static int mov_to_cr(int gp, int cr, str
   12.90      unsigned long old_cr;
   12.91      struct vcpu *v = current;
   12.92  
   12.93 -    switch (gp) {
   12.94 -        CASE_GET_REG(EAX, eax);
   12.95 -        CASE_GET_REG(ECX, ecx);
   12.96 -        CASE_GET_REG(EDX, edx);
   12.97 -        CASE_GET_REG(EBX, ebx);
   12.98 -        CASE_GET_REG(EBP, ebp);
   12.99 -        CASE_GET_REG(ESI, esi);
  12.100 -        CASE_GET_REG(EDI, edi);
  12.101 -        CASE_EXTEND_GET_REG
  12.102 -            case REG_ESP:
  12.103 -                __vmread(GUEST_RSP, &value);
  12.104 +    switch ( gp ) {
  12.105 +    CASE_GET_REG(EAX, eax);
  12.106 +    CASE_GET_REG(ECX, ecx);
  12.107 +    CASE_GET_REG(EDX, edx);
  12.108 +    CASE_GET_REG(EBX, ebx);
  12.109 +    CASE_GET_REG(EBP, ebp);
  12.110 +    CASE_GET_REG(ESI, esi);
  12.111 +    CASE_GET_REG(EDI, edi);
  12.112 +    CASE_EXTEND_GET_REG;
  12.113 +    case REG_ESP:
  12.114 +        __vmread(GUEST_RSP, &value);
  12.115          break;
  12.116      default:
  12.117          printk("invalid gp: %d\n", gp);
  12.118          __hvm_bug(regs);
  12.119      }
  12.120  
  12.121 -    HVM_DBG_LOG(DBG_LEVEL_1, "mov_to_cr: CR%d, value = %lx,", cr, value);
  12.122 -    HVM_DBG_LOG(DBG_LEVEL_1, "current = %lx,", (unsigned long) current);
  12.123 +    HVM_DBG_LOG(DBG_LEVEL_1, "CR%d, value = %lx", cr, value);
  12.124  
  12.125 -    switch(cr) {
  12.126 +    switch ( cr ) {
  12.127      case 0:
  12.128 -    {
  12.129          return vmx_set_cr0(value);
  12.130 -    }
  12.131      case 3:
  12.132      {
  12.133          unsigned long old_base_mfn, mfn;
  12.134 @@ -1753,11 +1766,6 @@ static int mov_to_cr(int gp, int cr, str
  12.135      return 1;
  12.136  }
  12.137  
  12.138 -#define CASE_SET_REG(REG, reg)      \
  12.139 -    case REG_ ## REG:       \
  12.140 -    regs->reg = value;      \
  12.141 -    break
  12.142 -
  12.143  /*
  12.144   * Read from control registers. CR0 and CR4 are read from the shadow.
  12.145   */
  12.146 @@ -1766,22 +1774,22 @@ static void mov_from_cr(int cr, int gp, 
  12.147      unsigned long value;
  12.148      struct vcpu *v = current;
  12.149  
  12.150 -    if (cr != 3)
  12.151 +    if ( cr != 3 )
  12.152          __hvm_bug(regs);
  12.153  
  12.154      value = (unsigned long) v->arch.hvm_vmx.cpu_cr3;
  12.155  
  12.156 -    switch (gp) {
  12.157 -        CASE_SET_REG(EAX, eax);
  12.158 -        CASE_SET_REG(ECX, ecx);
  12.159 -        CASE_SET_REG(EDX, edx);
  12.160 -        CASE_SET_REG(EBX, ebx);
  12.161 -        CASE_SET_REG(EBP, ebp);
  12.162 -        CASE_SET_REG(ESI, esi);
  12.163 -        CASE_SET_REG(EDI, edi);
  12.164 -        CASE_EXTEND_SET_REG
  12.165 -            case REG_ESP:
  12.166 -                __vmwrite(GUEST_RSP, value);
  12.167 +    switch ( gp ) {
  12.168 +    CASE_SET_REG(EAX, eax);
  12.169 +    CASE_SET_REG(ECX, ecx);
  12.170 +    CASE_SET_REG(EDX, edx);
  12.171 +    CASE_SET_REG(EBX, ebx);
  12.172 +    CASE_SET_REG(EBP, ebp);
  12.173 +    CASE_SET_REG(ESI, esi);
  12.174 +    CASE_SET_REG(EDI, edi);
  12.175 +    CASE_EXTEND_SET_REG;
  12.176 +    case REG_ESP:
  12.177 +        __vmwrite(GUEST_RSP, value);
  12.178          regs->esp = value;
  12.179          break;
  12.180      default:
  12.181 @@ -1789,7 +1797,7 @@ static void mov_from_cr(int cr, int gp, 
  12.182          __hvm_bug(regs);
  12.183      }
  12.184  
  12.185 -    HVM_DBG_LOG(DBG_LEVEL_VMMU, "mov_from_cr: CR%d, value = %lx,", cr, value);
  12.186 +    HVM_DBG_LOG(DBG_LEVEL_VMMU, "CR%d, value = %lx", cr, value);
  12.187  }
  12.188  
  12.189  static int vmx_cr_access(unsigned long exit_qualification, struct cpu_user_regs *regs)
  12.190 @@ -2284,11 +2292,7 @@ asmlinkage void vmx_load_cr2(void)
  12.191      struct vcpu *v = current;
  12.192  
  12.193      local_irq_disable();
  12.194 -#ifdef __i386__
  12.195 -    asm volatile("movl %0,%%cr2": :"r" (v->arch.hvm_vmx.cpu_cr2));
  12.196 -#else
  12.197 -    asm volatile("movq %0,%%cr2": :"r" (v->arch.hvm_vmx.cpu_cr2));
  12.198 -#endif
  12.199 +    asm volatile("mov %0,%%cr2": :"r" (v->arch.hvm_vmx.cpu_cr2));
  12.200  }
  12.201  
  12.202  asmlinkage void vmx_trace_vmentry (void)
    13.1 --- a/xen/arch/x86/irq.c	Fri May 05 18:36:12 2006 +0100
    13.2 +++ b/xen/arch/x86/irq.c	Fri May 05 18:36:26 2006 +0100
    13.3 @@ -318,6 +318,7 @@ static void __pirq_guest_eoi(struct doma
    13.4      {
    13.5          ASSERT(cpus_empty(action->cpu_eoi_map));
    13.6          desc->handler->end(irq_to_vector(irq));
    13.7 +        spin_unlock_irq(&desc->lock);
    13.8          return;
    13.9      }
   13.10  
    14.1 --- a/xen/arch/x86/smp.c	Fri May 05 18:36:12 2006 +0100
    14.2 +++ b/xen/arch/x86/smp.c	Fri May 05 18:36:26 2006 +0100
    14.3 @@ -169,6 +169,7 @@ fastcall void smp_invalidate_interrupt(v
    14.4  {
    14.5      ack_APIC_irq();
    14.6      perfc_incrc(ipis);
    14.7 +    irq_enter();
    14.8      if ( !__sync_lazy_execstate() )
    14.9      {
   14.10          if ( flush_va == FLUSHVA_ALL )
   14.11 @@ -177,6 +178,7 @@ fastcall void smp_invalidate_interrupt(v
   14.12              local_flush_tlb_one(flush_va);
   14.13      }
   14.14      cpu_clear(smp_processor_id(), flush_cpumask);
   14.15 +    irq_exit();
   14.16  }
   14.17  
   14.18  void __flush_tlb_mask(cpumask_t mask, unsigned long va)
   14.19 @@ -335,6 +337,8 @@ fastcall void smp_call_function_interrup
   14.20      if ( !cpu_isset(smp_processor_id(), call_data->selected) )
   14.21          return;
   14.22  
   14.23 +    irq_enter();
   14.24 +
   14.25      if ( call_data->wait )
   14.26      {
   14.27          (*func)(info);
   14.28 @@ -347,4 +351,6 @@ fastcall void smp_call_function_interrup
   14.29          atomic_inc(&call_data->started);
   14.30          (*func)(info);
   14.31      }
   14.32 +
   14.33 +    irq_exit();
   14.34  }
    15.1 --- a/xen/arch/x86/traps.c	Fri May 05 18:36:12 2006 +0100
    15.2 +++ b/xen/arch/x86/traps.c	Fri May 05 18:36:26 2006 +0100
    15.3 @@ -674,6 +674,8 @@ asmlinkage int do_page_fault(struct cpu_
    15.4      unsigned long addr, fixup;
    15.5      int rc;
    15.6  
    15.7 +    ASSERT(!in_irq());
    15.8 +
    15.9      __asm__ __volatile__ ("mov %%cr2,%0" : "=r" (addr) : );
   15.10  
   15.11      DEBUGGER_trap_entry(TRAP_page_fault, regs);
    16.1 --- a/xen/include/asm-x86/hvm/vmx/vmcs.h	Fri May 05 18:36:12 2006 +0100
    16.2 +++ b/xen/include/asm-x86/hvm/vmx/vmcs.h	Fri May 05 18:36:26 2006 +0100
    16.3 @@ -68,6 +68,7 @@ struct arch_vmx_struct {
    16.4      struct vmcs_struct      *vmcs;  /* VMCS pointer in virtual. */
    16.5      unsigned int            launch_cpu; /* VMCS is valid on this CPU. */
    16.6      u32                     exec_control; /* cache of cpu execution control */
    16.7 +    u32                     vector_injected; /* if there is vector installed in the INTR_INFO_FIELD */
    16.8      unsigned long           flags;  /* VMCS flags */
    16.9      unsigned long           cpu_cr0; /* copy of guest CR0 */
   16.10      unsigned long           cpu_shadow_cr0; /* copy of guest read shadow CR0 */
    17.1 --- a/xen/include/asm-x86/hvm/vmx/vmx.h	Fri May 05 18:36:12 2006 +0100
    17.2 +++ b/xen/include/asm-x86/hvm/vmx/vmx.h	Fri May 05 18:36:26 2006 +0100
    17.3 @@ -444,6 +444,7 @@ static inline int __vmx_inject_exception
    17.4  
    17.5  static inline int vmx_inject_exception(struct vcpu *v, int trap, int error_code)
    17.6  {
    17.7 +    v->arch.hvm_vmx.vector_injected = 1;
    17.8      return __vmx_inject_exception(v, trap, INTR_TYPE_EXCEPTION, error_code);
    17.9  }
   17.10