[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] Merge.
# HG changeset patch # User sos22@xxxxxxxxxxxxxxxxxxxx # Node ID 05b63285047c1bef1ec11158b14b9a5375e9645e # Parent 04d15727e6e8c83e859246597715c33064384b3f # Parent 9b73afea874e2b6d8c4e56f504aa591ac30be5b6 Merge. diff -r 04d15727e6e8 -r 05b63285047c linux-2.6.11-xen-sparse/arch/xen/kernel/evtchn.c --- a/linux-2.6.11-xen-sparse/arch/xen/kernel/evtchn.c Fri Jul 8 17:37:33 2005 +++ b/linux-2.6.11-xen-sparse/arch/xen/kernel/evtchn.c Fri Jul 8 17:38:38 2005 @@ -86,7 +86,7 @@ cpu_evtchn_mask[cpu][idx] & \ ~(sh)->evtchn_mask[idx]) -static void bind_evtchn_to_cpu(unsigned int chn, unsigned int cpu) +void bind_evtchn_to_cpu(unsigned int chn, unsigned int cpu) { clear_bit(chn, (unsigned long *)cpu_evtchn_mask[cpu_evtchn[chn]]); set_bit(chn, (unsigned long *)cpu_evtchn_mask[cpu]); @@ -99,8 +99,9 @@ ((sh)->evtchn_pending[idx] & \ ~(sh)->evtchn_mask[idx]) -#define bind_evtchn_to_cpu(chn,cpu) ((void)0) - +void bind_evtchn_to_cpu(unsigned int chn, unsigned int cpu) +{ +} #endif /* Upcall to generic IRQ layer. */ @@ -228,6 +229,13 @@ if ( HYPERVISOR_event_channel_op(&op) != 0 ) panic("Failed to unbind virtual IRQ %d\n", virq); + /* This is a slight hack. Interdomain ports can be allocated + directly by userspace, and at that point they get bound by + Xen to vcpu 0. We therefore need to make sure that if we + get an event on an event channel we don't know about vcpu 0 + handles it. Binding channels to vcpu 0 when closing them + achieves this. */ + bind_evtchn_to_cpu(evtchn, 0); evtchn_to_irq[evtchn] = -1; irq_to_evtchn[irq] = -1; per_cpu(virq_to_irq, cpu)[virq] = -1; @@ -288,6 +296,8 @@ if ( HYPERVISOR_event_channel_op(&op) != 0 ) panic("Failed to unbind virtual IPI %d on cpu %d\n", ipi, cpu); + /* See comments in unbind_virq_from_irq */ + bind_evtchn_to_cpu(evtchn, 0); evtchn_to_irq[evtchn] = -1; irq_to_evtchn[irq] = -1; per_cpu(ipi_to_evtchn, cpu)[ipi] = 0; @@ -495,6 +505,7 @@ pirq_query_unmask(irq_to_pirq(irq)); + bind_evtchn_to_cpu(evtchn, 0); evtchn_to_irq[evtchn] = irq; irq_to_evtchn[irq] = evtchn; @@ -520,6 +531,7 @@ if ( HYPERVISOR_event_channel_op(&op) != 0 ) panic("Failed to unbind physical IRQ %d\n", irq); + bind_evtchn_to_cpu(evtchn, 0); evtchn_to_irq[evtchn] = -1; irq_to_evtchn[irq] = -1; } @@ -619,6 +631,7 @@ evtchn = op.u.bind_virq.port; /* Record the new mapping. */ + bind_evtchn_to_cpu(evtchn, 0); evtchn_to_irq[evtchn] = irq; irq_to_evtchn[irq] = evtchn; diff -r 04d15727e6e8 -r 05b63285047c linux-2.6.11-xen-sparse/arch/xen/kernel/ctrl_if.c --- a/linux-2.6.11-xen-sparse/arch/xen/kernel/ctrl_if.c Fri Jul 8 17:37:33 2005 +++ b/linux-2.6.11-xen-sparse/arch/xen/kernel/ctrl_if.c Fri Jul 8 17:38:38 2005 @@ -491,6 +491,8 @@ * pick up its end of the event channel from */ evtchn_op_t op; + extern void bind_evtchn_to_cpu(unsigned port, unsigned cpu); + op.cmd = EVTCHNOP_bind_interdomain; op.u.bind_interdomain.dom1 = DOMID_SELF; op.u.bind_interdomain.dom2 = DOMID_SELF; @@ -500,6 +502,7 @@ BUG(); xen_start_info.domain_controller_evtchn = op.u.bind_interdomain.port1; initdom_ctrlif_domcontroller_port = op.u.bind_interdomain.port2; + bind_evtchn_to_cpu(op.u.bind_interdomain.port1, 0); } /* Sync up with shared indexes. */ _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |