Port-xen archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: xen interrupt system



On Fri, Aug 21, 2009 at 01:28:00PM +0200, Christoph Egger wrote:
> XenSource:
> 
> "Well, dom0 may think it using a vector but it isn't. Linux-2.6.18 for
> example is allocating vectors for irqs using PHYSDEVOP_alloc_irq_vector(),
> as it is supposed to. But crucially after Xiantao's patch it now gets the
> irq returned back to it. Dom0 then thinks it is poking a vector into the
> IO-APIC RTE, but Xen knows it is an irq and does the appropriate
> translation. We can do tricks like this because Xen manages the vector
> 'namespace' and so can virtualise it as it likes.

OK, so what we write to IOAPIC_REDLO is a virtual vector number that Xen
calls "irq". Xen then translates this to the real vector number.

> 
> So I suppose the question is -- where is NetBSD dom0 conjuring vector
> numbers from? You're going to have to track down the source of that 'vector'
> 0x5e in the NetBSD kernel I think."

0x5e is what is returned from PHYSDEVOP_ASSIGN_VECTOR. See xen_intr_map().

> 
> XenSource thinks that the vector 0x5e is wrong because according
> to this xen boot messages, the vectors go from 0 - 47.

AFAIK we can use any vector number in the range 0xff - 0xff in the ioapic
registers.  I guess this is a rectriction imposed by Xen.

-- 
Manuel Bouyer <bouyer%antioche.eu.org@localhost>
     NetBSD: 26 ans d'experience feront toujours la difference
--


Home | Main Index | Thread Index | Old Index