Print this page
3605 Xen HVM hangs during boot if apix is enabled

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/common/os/ddi_intr.c
          +++ new/usr/src/uts/common/os/ddi_intr.c
↓ open down ↓ 270 lines elided ↑ open up ↑
 271  271                  count = navail - curr_nintrs;
 272  272          }
 273  273  
 274  274          /* Now allocate required number of interrupts */
 275  275          bzero(&tmp_hdl, sizeof (ddi_intr_handle_impl_t));
 276  276          tmp_hdl.ih_type = type;
 277  277          tmp_hdl.ih_inum = inum;
 278  278          tmp_hdl.ih_scratch1 = count;
 279  279          tmp_hdl.ih_scratch2 = (void *)(uintptr_t)behavior;
 280  280          tmp_hdl.ih_dip = dip;
      281 +        tmp_hdl.ih_irq = -1;
 281  282  
 282  283          if (i_ddi_intr_ops(dip, dip, DDI_INTROP_ALLOC,
 283  284              &tmp_hdl, (void *)actualp) != DDI_SUCCESS) {
 284  285                  DDI_INTR_APIDBG((CE_CONT, "ddi_intr_alloc: allocation "
 285  286                      "failed\n"));
 286  287                  i_ddi_intr_devi_fini(dip);
 287  288                  return (*actualp ? DDI_EAGAIN : DDI_INTR_NOTFOUND);
 288  289          }
 289  290  
 290  291          if ((ret = i_ddi_intr_ops(dip, dip, DDI_INTROP_GETPRI,
↓ open down ↓ 26 lines elided ↑ open up ↑
 317  318                      (sizeof (ddi_intr_handle_impl_t)), KM_SLEEP);
 318  319                  rw_init(&hdlp->ih_rwlock, NULL, RW_DRIVER, NULL);
 319  320                  h_array[i] = (struct __ddi_intr_handle *)hdlp;
 320  321                  hdlp->ih_type = type;
 321  322                  hdlp->ih_pri = pri;
 322  323                  hdlp->ih_cap = cap;
 323  324                  hdlp->ih_ver = DDI_INTR_VERSION;
 324  325                  hdlp->ih_state = DDI_IHDL_STATE_ALLOC;
 325  326                  hdlp->ih_dip = dip;
 326  327                  hdlp->ih_inum = i;
      328 +                hdlp->ih_irq = -1;
 327  329                  i_ddi_alloc_intr_phdl(hdlp);
 328      -                if (type & DDI_INTR_TYPE_FIXED)
      330 +                if (type & DDI_INTR_TYPE_FIXED) {
      331 +                        if (tmp_hdl.ih_irq != -1)
      332 +                                hdlp->ih_irq = tmp_hdl.ih_irq;
 329  333                          i_ddi_set_intr_handle(dip, hdlp->ih_inum,
 330  334                              (ddi_intr_handle_t)hdlp);
      335 +                }
 331  336  
 332  337                  DDI_INTR_APIDBG((CE_CONT, "ddi_intr_alloc: hdlp = 0x%p\n",
 333  338                      (void *)h_array[i]));
 334  339          }
 335  340  
 336  341          return (DDI_SUCCESS);
 337  342  
 338  343  fail:
 339  344          (void) i_ddi_intr_ops(tmp_hdl.ih_dip, tmp_hdl.ih_dip,
 340  345              DDI_INTROP_FREE, &tmp_hdl, NULL);
↓ open down ↓ 1212 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX