WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

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

To: Jan Beulich <JBeulich@xxxxxxxxxx>
Subject: RE: [Xen-devel] [PATCH] Fix legacy irq allocation issue
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
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <4A3B78A20200007800006B20@xxxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <E2263E4A5B2284449EEBD0AAB751098402CBA344F2@xxxxxxxxxxxxxxxxxxxxxxxxxxxx> <C6610A55.DBA1%keir.fraser@xxxxxxxxxxxxx> <E2263E4A5B2284449EEBD0AAB751098402CBA3455A@xxxxxxxxxxxxxxxxxxxxxxxxxxxx> <4A3B78A20200007800006B20@xxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
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