Author: royger
Date: Mon Aug  4 08:43:27 2014
New Revision: 269508
URL: http://svnweb.freebsd.org/changeset/base/269508

Log:
  xen: mask all event channels on init
  
  Mask all event channels during initialization. This is done so that we
  don't receive spurious interrupts while dynamically registering new
  event channels. There's a small window during registration where an
  event channel can fire before we have attached a handler to it.
  
  Sponsored by: Citrix Systems R&D
  
  x86/xen/xen_intr.c:
   - Mask all event channels on init.

Modified:
  head/sys/x86/xen/xen_intr.c

Modified: head/sys/x86/xen/xen_intr.c
==============================================================================
--- head/sys/x86/xen/xen_intr.c Mon Aug  4 08:42:29 2014        (r269507)
+++ head/sys/x86/xen/xen_intr.c Mon Aug  4 08:43:27 2014        (r269508)
@@ -584,6 +584,7 @@ xen_intr_handle_upcall(struct trapframe 
 static int
 xen_intr_init(void *dummy __unused)
 {
+       shared_info_t *s = HYPERVISOR_shared_info;
        struct xen_intr_pcpu_data *pcpu;
        struct physdev_pirq_eoi_gmfn eoi_gmfn;
        int i, rc;
@@ -607,6 +608,9 @@ xen_intr_init(void *dummy __unused)
                xen_intr_intrcnt_add(i);
        }
 
+       for (i = 0; i < nitems(s->evtchn_mask); i++)
+               atomic_store_rel_long(&s->evtchn_mask[i], ~0);
+
        /* Try to register PIRQ EOI map */
        xen_intr_pirq_eoi_map = malloc(PAGE_SIZE, M_XENINTR, M_WAITOK | M_ZERO);
        eoi_gmfn.gmfn = atop(vtophys(xen_intr_pirq_eoi_map));
_______________________________________________
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to