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, 24 Nov 2009 18:04:36 +0800
Accept-language: en-US
Acceptlanguage: en-US
Cc: Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxx>, "Han, Weidong" <weidong.han@xxxxxxxxx>, "Jiang, Yunhong" <yunhong.jiang@xxxxxxxxx>
Delivery-date: Tue, 24 Nov 2009 02:05:30 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <C72970BC.C323%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: <706158FABBBA044BAD4FE898A02E4BC201CD3207E0@xxxxxxxxxxxxxxxxxxxxxxxxxxxx> <C72970BC.C323%keir.fraser@xxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: AcpnRahRKdY8JG4aRBKJtSOrmCF95gAPb6tAAADLjVUAAFOzQAANzk5eAA9qNnAADXnVJAEtpdpg
Thread-topic: [Xen-devel] Re: APIC rework
Keir Fraser wrote:
> On 18/11/2009 03:25, "Zhang, Xiantao" <xiantao.zhang@xxxxxxxxx> wrote:
> 
>>> For modern dom0 don't we already assume that dom0 pirq == irq == gsi
>>> (see comments in ioapic_guest_write)? Perhaps we should just have
>>> that relationship set up by default: I think only NetBSD dom0 has
>>> different, and it will establish different relationship via legacy
>>> method of PHYSDEVOP_alloc_irq_vector and paravirtualised IOAPIC
>>> writes?
>> 
>> The assumption should be right for dom0 today, but it still needs to
>> register this info to dom0's private data(d->arch.{pirq_irq,
>> irq_pirq). 
>> And I think maybe we should clean up the logic and let hypervisor
>> knows the assumption, when consulting this relationship.
> 
> Well, it strikes me that existing MAP_PIRQ_TYPE_GSI fills this role
> already, as it is, doesn't it? Seems to me that is its whole purpose.
> :-) 
> 
> Shoehorning trig/pol information into it as well is kind of nasty.
> And I think on any PC system it should suffice to assume GSI 0-15 are
> ISA edge-triggered active-high, GSI 16+ are PCI level-triggered
> active-low, and any exceptions are parsed out of MADT or MPBIOS. We
> pretty much have all that code, it just might need plumbing back in a
> little bit. Yunhong points out that ACPI DSDT can have overriding
> objects in the _PRT, but I don't know it ever actually gets used on
> real-world PC systems. So I would try without, but if we do end up
> needing to get this info from dom0, I think it should be via a new
> physdev_op.

At least dom0 parses this info from DSDT, so we can't have the assuption 
whether it is used or not, I think. And I also agree to add a new physdev_op to 
handle this case, and it should be better way to go.  
Based on this idea, I worked out the patch, attached!  In this patch, we 
introduced a new physdev_op PHYSDEVOP_setup_gsi for each GSI setup, and each 
domain can require to map each GSI in this case. 
In addition, I believe it is very safe to port the hypervisor patch to 
xen-3.4-x tree and keeps pv_ops dom0 running on it, since no logic is changed.  
BTW, I also tested apic and non-apic cases, they works fine after applying the 
patches. 
Xiantao


Attachment: x86-add-a-new-physdev_op.patch
Description: x86-add-a-new-physdev_op.patch

Attachment: 0001-x86-ioapic-Remove-Xen-s-specific-changes-about-ioa.patch
Description: 0001-x86-ioapic-Remove-Xen-s-specific-changes-about-ioa.patch

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
<Prev in Thread] Current Thread [Next in Thread>