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

RE: [Xen-devel] [PATCH] Fix legacy irq allocation issue


  • To: Jan Beulich <JBeulich@xxxxxxxxxx>
  • From: "Jiang, Yunhong" <yunhong.jiang@xxxxxxxxx>
  • Date: Fri, 19 Jun 2009 18:03:14 +0800
  • Accept-language: en-US
  • Acceptlanguage: en-US
  • Cc: Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxx>, Keir Fraser <keir.fraser@xxxxxxxxxxxxx>
  • Delivery-date: Fri, 19 Jun 2009 03:04:08 -0700
  • List-id: Xen developer discussion <xen-devel.lists.xensource.com>
  • Thread-index: AcnwwbVGo9ipI2hoTomIPx3v3ZQZUgAALwqQ
  • Thread-topic: [Xen-devel] [PATCH] Fix legacy irq allocation issue


Jan Beulich wrote:
>>>> "Jiang, Yunhong" <yunhong.jiang@xxxxxxxxx> 19.06.09 11:03 >>>
>> The followed is based on old patch. Jan, is this ok?
>> Signed-off-by: Jiang, Yunhong <yunhong.jiang@xxxxxxxxx>
> 
> Yes, this is how I expected it to be.
> 
>> BTW, when I working on this, I'm abit confused of the irq.
> I'm not sure if I can assume irq is mainly for IOAPIC/PIC
> (i.e. something
>> like gsi and is global), while pirq is just physical irq
> (i.e. including both gsi/MSI irq)?
> 
> "irq" should no longer refer to anything MSI related (MSI just
> requires a vector, but not an irq). "pirq" is generally meant
> to be the guest representation (even for MSI, the guest needs
> a pirq assigned because the event channel interface requires one to
> be passed in). 

So in fact, we can explain pirq to be per-domain irq, instead of physical irq 
anymore (I assume this is achieved mainly in 19650 changeset).

In Keir/Jeremy's new design interface for PV_ops dom0, will IOAPIC's interface 
be pirq (i.e. perdomain irq) also?

Current arch/x86/irq.c is not so clear in using irq/pirq, like all parameter is 
irq. (It is in fact my fault, I think :$ )

> 
>> If yes, what's the irq in PHYSDEVOP_alloc_irq_vector()? It
> is in fact dom0's irq, however, in assign_irq_vector(), seems
> it is treated
>> same as Xen's irq. I remember I understood that part when I
> begin working on MSI, but seems I fogot the answer now :$
> 
> Correct, because for IO-APIC irqs a 1:1 mapping is being
> assumed between (dom0) pirq and (xen) irq. I think there's
> currently no real reason to break this assumption, even though
> it seems not fully correct (because not properly abstracted).

Do you think Xen hypervisor itself need anything like "irq", if not considering 
back-compatibility with old dom0? For xen, it only cares physical IOAPIC (i.e. 
gsi) and vector. The maint task is to translate a vector to a pirq and then 
inject it to corresponding guest. I think Xen itself is not using irq anymore, 
like request_irq_vector()). 
But not sure what will happen when we adding per-cpu vector, since at that 
time, vector will not be a global namespace anymore, we may need a name for the 
irq_desc[]. After all, usually irq can be explained as index for irq_desc[] 
while it is not in Xen's context.

> 
> Jan
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.