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] Re: APIC rework

To: Keir Fraser <keir.fraser@xxxxxxxxxxxxx>, Jeremy Fitzhardinge <jeremy@xxxxxxxx>
Subject: RE: [Xen-devel] Re: APIC rework
From: "Zhang, Xiantao" <xiantao.zhang@xxxxxxxxx>
Date: Tue, 17 Nov 2009 22:17:11 +0800
Accept-language: en-US
Acceptlanguage: en-US
Cc: Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxx>, "Han, Weidong" <weidong.han@xxxxxxxxx>, Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>
Delivery-date: Tue, 17 Nov 2009 06:17:40 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <C7285002.C27B%keir.fraser@xxxxxxxxxxxxx>
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: <706158FABBBA044BAD4FE898A02E4BC201CD3205FF@xxxxxxxxxxxxxxxxxxxxxxxxxxxx> <C7285002.C27B%keir.fraser@xxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: AcpnRahRKdY8JG4aRBKJtSOrmCF95gAPb6tAAADLjVUAAFOzQA==
Thread-topic: [Xen-devel] Re: APIC rework
Keir Fraser wrote:
> On 17/11/2009 12:46, "Zhang, Xiantao" <xiantao.zhang@xxxxxxxxx> wrote:
> 
>>> If Xen can set the interrupt triggering by itself, why would it ever
>>> need dom0 to do it?  Couldn't it just preconfigure all the pins, and
>>> then wait for dom0 to provide/request the pirq<->evtchn mapping?
>> 
>> After reviewing the logic, I think we can use DOMID_SELF to identify
>> new dom0. In linux-2.6.18 dom0, only qemu uses this hypercall for
>> device assginment, so map->domid shouldn't be dom0.  If old
>> dom0/qemu with this hypercall, keeps the logic unchanged, and only
>> change the logic for new dom0 when call into it. Attached the patch.
> 
> Don't like it (subtle semantic difference based on domid field is
> very odd and could bite us later), and actually now I look closer I
> don't like the original patch much either, if only because it does
> clearly change the interface for MAP_PIRQ_TYPE_GSI by adding
> trigger/polarity flags (and not documented or exported properly in
> the physdev.h header file). 
> 
> I need to take a step back and work out what in fact you're trying to
> achieve. I'm going to revert the original patch from xen-unstable. If
> such an interface extension is really required, I think at least the
> new interface should be a new subtype of MAP_PIRQ_TYPE_xxx, properly
> described in the header file. But like I say, I don't know what the
> patch is even really trying to do or overcome. 

Originally, this patch is target to get rid of ioapic changes in dom0. Before 
this patch, GSI irq should be mapped and setup through dom0 programming ioapic 
entries, but it depends on using ioapic logic in dom0. And if we remove ioapic 
logic from dom0,  we need to find new way how to setup GSI irq.  And this patch 
comes out under this situation.  The idea is from that in Xen the interface 
MAP_PIRQ_TYPE_MSI is used to build the pirq and irq mapping for MSI IRQ for 
each domain. Since MSI IRQ can be setup through this hypercall, and I think  we 
also can leverage the interface MAP_PIRQ_TYPE _GSI to build the mapping for GSI 
irq. Further analysis showes that this interface is only used for assigning 
devices to HVM domain in qemu, and I think it should be Okay for dom0 building 
the mapping between its pirq and irq. One different thing for GSI irq is that 
more info should be provided in the call, since GSI IRQ has different 
trigger-mode and polarity (originally it is provided by ioapic write in dom0). 
Certainly, I also think we need to document the related info, and if you agree 
to the change, I am happy to add it. 
Xiantao
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>