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] [VTD][PATCH] Support intra-domain shared interrupt

To: "Keir Fraser" <Keir.Fraser@xxxxxxxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: RE: [Xen-devel] [VTD][PATCH] Support intra-domain shared interrupt
From: "Han, Weidong" <weidong.han@xxxxxxxxx>
Date: Mon, 5 Nov 2007 16:52:20 +0800
Cc: "Kay, Allen M" <allen.m.kay@xxxxxxxxx>
Delivery-date: Mon, 05 Nov 2007 00:53:09 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <C3548657.FF0E%Keir.Fraser@xxxxxxxxxxxx>
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/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <08DF4D958216244799FC84F3514D70F00ABB16@xxxxxxxxxxxxxxxxxxxxxxxxxxxx> <C3548657.FF0E%Keir.Fraser@xxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: AcgfbbYOsSWYB6MMQDuBGkYt+XjCJwAEwx4KAAASPxAAAXKGpgAAClDA
Thread-topic: [Xen-devel] [VTD][PATCH] Support intra-domain shared interrupt
Keir Fraser wrote:
> On 5/11/07 08:16, "Han, Weidong" <weidong.han@xxxxxxxxx> wrote:
> 
>> Current data structure hvm_irq_dpci_mapping
>> doesn't consider this situation, mirq[i] contains only one device and
>> corresponding guest irq, need to add a list to contain multiple
>> devices whice share physical interrupt.
> 
> The reverse is also true I believe: you can have two devices with
> different physical IRQs getting aliased to the same guest GSI. Is
> that a problem? e.g., do you need the reverse mapping from guest GSI
> to physical IRQ or physical device (I'd guess you do, to work out
> what to do when the guest GSI is EOIed)?
> 

Yes, we need the reverse mapping from guest GSI to physical IRQ. 
According to the following guest GSI computing formula, 
   #define hvm_pci_intx_gsi(dev, intx)  \
     (((((dev) << 2) + ((dev) >> 3) + (intx)) & 31) + 16)

that situation two devices with different pyhsical IRQs getting aliased
to the same guest GSI is hard to occur. And we need one guest GSI mapped
to only one physical IRQ, or we can't know which device issues the guest
GSI. Ideally, if we can make 1:1 mapping between guest GSI and physcial
IRQ, the intra-domain shared interrupt can naturally handled by guest.


>> What's more, we need to deal with
>> intra-domain shared interrupt injection and eoi specially.
> 
> How?
> 

We need to inject guest GSI for each device, and really do eoi when all
devices with same physical IRQ in the domain finished eoi.

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