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 6/6] Add MSI support to XEN

To: "Neil Turton" <nturton@xxxxxxxxxxxxxx>
Subject: Re: [Xen-devel] [PATCH 6/6] Add MSI support to XEN
From: "Haitao Shan" <maillists.shan@xxxxxxxxx>
Date: Tue, 13 May 2008 21:52:24 +0800
Cc: xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxx>, "Shan, Haitao" <haitao.shan@xxxxxxxxx>, Keir Fraser <keir.fraser@xxxxxxxxxxxxx>, "Jiang, Yunhong" <yunhong.jiang@xxxxxxxxx>
Delivery-date: Tue, 13 May 2008 06:53:00 -0700
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; bh=U3YlEykCKtVreSyfS16PvfacWgU4A9cgu27dbBsmyks=; b=xnzUwnww0fyfFBi4N0wov74wi1vwzqyHEKtBEcZ32/IlvBMqbTWRNTkeGUbmB7jiLDcNyY6+hpzHPGcXqlKJ4J+mFrmlIsNu6Bpor3trLQydGLE8GPDoCAXYR/bYKRS5wu7WUv852LUOLuY9Sdzeu5eLycbRrejmhbCrjxngCcA=
Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=GwJjQwULCwz7quMxp/MvSiBLDCUcRdOVu2lL2f2ObVr2sXruGEuNCbC6OqEzM7Zm7I1HYJPwjgUHXavzVaFecLhvXzSnYu5hxfz6XS84l1Pmhi8TDzwi9SKvq5buMzA0qRBO3XawxhFesbAli4CrwdIM3nre9jh9ptnUyXHVt/E=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <48296609.8060603@xxxxxxxxxxxxxx>
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: <823A93EED437D048963A3697DB0E35DE014F156F@xxxxxxxxxxxxxxxxxxxxxxxxxxxx> <48296609.8060603@xxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Hi, Neil,

Please see my comments embedded.

2008/5/13 Neil Turton <nturton@xxxxxxxxxxxxxx>:
> I tried the latest unstable tree on a NIC which supports both MSI and
>  MSI-X.  When the driver was configured to use MSI mode, everything
>  worked fine but when it was configured to use MSI-X, the call to
>  pci_enable_msix succeeded but the interrupt didn't work.  Have these
>  patches been seen to work on an MSI-X device?
I have tested the patch using a NIC with both MSI-X and MSX
capabilities. I can successfully enable MSI-X for the NIC both in dom0
and in domU. The drivers I used for test is igb from
e1000.sourceforge.net.
Can you tell me how to reproduce your problem? Maybe there are some
pathes that I do not take care of. So that I can fix the problem.

>
>  In msix_capability_init (drivers/pci/msi-xen.c), there's a loop which
>  unmaps the old pirqs.  Shouldn't there be some similar code in
>  msi_capability_init?  I can't see any reason for the inconsistency
>  between the two functions.
Agree. I will add that.

>
>  Would it be possible to extend this code so that a PV backend driver
>  could map different MSI-X entries on a PCI device into different guests?
>  We already have frontend/backend drivers which allow multiple guests to
>  securely access the PCI memory of a single NIC and would like to extend
>  those drivers to map MSI-X interrupts directly to guests.  I
>  still don't understand enough about the new hypercalls to see how that
>  would work.
Do you mean your MSI-X capable NIC is owned simultaneously by multi
guests? Actually, I have not thought of this usage model. Currently,
we rely on pcibackend to provide the owner of the device. Yes, all
MSI-X interrupts are mapped to the same domain to which the device
belongs. But I think by properly set the dom_id for hypercall
PHYSDEVOP_map_pirq, it can cope wth such situations.

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

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