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

[Xen-devel] RE: [PATCH 0/5] Add MSI support to xen environment

To: "Keir Fraser" <Keir.Fraser@xxxxxxxxxxxx>
Subject: [Xen-devel] RE: [PATCH 0/5] Add MSI support to xen environment
From: "Jiang, Yunhong" <yunhong.jiang@xxxxxxxxx>
Date: Fri, 26 Oct 2007 22:35:19 +0800
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Fri, 26 Oct 2007 07:38:15 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <C3476E4A.177B2%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: <391BF3CDD2DC0848B40ACB72FA97AD590258D3F7@xxxxxxxxxxxxxxxxxxxxxxxxxxxx> <C3476E4A.177B2%Keir.Fraser@xxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: AcgXJpgKtuetZtZRSk2SPUOVajTGGQAieFwCAArETtA=
Thread-topic: [PATCH 0/5] Add MSI support to xen environment
Keir Fraser <mailto:Keir.Fraser@xxxxxxxxxxxx> wrote:
> The PHYSDEVOP_map_irq concept is a bit broken. Firstly the new
> op is not
> protected from domU usage. Secondly it looks like the current code
will
> break with old dom0 kernels that do not use PHYSDEVOP_map_irq.
> That's not
> allowed.

For the first point , what I thought is, as a interface,  domU may need
to map vector into it's 
own pirq namespace, but yes, we need add permissoin check to make sure
it is legal. The only question is, we may need permission to both vector
and physical IRQ.
For the second point, sorry I missed this point when doing the patch. An
alternative method is, for the ioapic interrupt, we do the map to
domain0 when assign_irq_vector(), and do the mapping for domU in control
panel, before start the domain. I think this is similar to your option
below.

> 
> I think it'd be better for pciback to poke the irq configuration into
> xenstore, and then that can be picked up by the domain builder before
> starting the domain. Then xend can be responsible for actually
> setting up
> the mapping to a pirq, and all these new hypercalls can be domctls.
The
> advantage of this is that they're not then set in stone. I'm
> not confident
> about overhauling the irq interface and declaring it fully
> baked just before
> a tree freeze.

Understand, so when will the tree be freeze and be open again? Do you
have any plan? What I wonder is,  do you think of the map_irq change, is
required in future? Shall we split the pirq and physical irq in future?

For pciback to poke irq configuration, I think for IOAPIC irq is done
already, we only need add the mapping at that time. For MSI , domain U
will do that dynamically, so not sure if viable, especially considering
for MSI-x, only driver knows how many entry will be used.

-- Yunhong Jiang

> 
> -- Keir
> 
> On 25/10/07 17:46, "Jiang, Yunhong" <yunhong.jiang@xxxxxxxxx> wrote:
> 
>> Hi,
>> The followed series patches add MSI support to xen environment.
Please
>> have a look on it and give me any suggestion and I'd like to update
>> accordingly. 
>> 
>> The basic idea including:
>> 1) Keep vector global resource owned by xen, while split pirq into
per
>> domain information. 2) domain0 kernel will operate msi resource for
>> domain0/domU, while QEMU will operate MSI resource for HVM domain.
>> 3) Xen will do EOI for MSI interrupt.
>> 
>> pirq_per_domain.patch is mainly changes to xen source tree for
per-domain
>> pirq. domain_pirq_kernel.patch is changes to linux tree for
per-domain
>> pirq. 
>> 
>> msi_irq_xen.patch changes xen to support msi for domain0/domainU.
>> msi_kernel.patch changes linux tree to support msi.
>> 
>> msi_passthrough.patch add msi support to passthrough hvm domain.
>> 
>> Signed-off-by: Yunhong Jiang <yunhong.jiang@xxxxxxxxx>
>> 
>> Thanks
>> Yunhong Jiang

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