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

[PATCH 0/12] xen: MSI managment cleanups (Was: Re: [Xen-devel] [PATCH 1/

To: Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>
Subject: [PATCH 0/12] xen: MSI managment cleanups (Was: Re: [Xen-devel] [PATCH 1/3] pci/xen: Use xen_allocate_pirq_msi)
From: Ian Campbell <Ian.Campbell@xxxxxxxxxxxxx>
Date: Fri, 18 Feb 2011 16:43:06 +0000
Cc: Jeremy Fitzhardinge <jeremy@xxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>, Stefano Stabellini <Stefano.Stabellini@xxxxxxxxxxxxx>
Delivery-date: Fri, 18 Feb 2011 08:43:43 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <20110217145255.GA32341@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/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>
Organization: Citrix Systems, Inc.
References: <1297894638-28007-1-git-send-email-konrad.wilk@xxxxxxxxxx> <1297894638-28007-2-git-send-email-konrad.wilk@xxxxxxxxxx> <1297932091.16356.1292.camel@xxxxxxxxxxxxxxxxxxxxxx> <20110217145255.GA32341@xxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
On Thu, 2011-02-17 at 14:52 +0000, Konrad Rzeszutek Wilk wrote:
> > All callers have this (type == MSIX) ? "msi-x" : "msi" construct,
> > differing only in their use of a "pcifront-" prefix. Something which
> > could be hoisted into the function perhaps?
> 
> I was thinking to defer this for a cleanup patch.
> > 
> > Another aside: I think there are other cleanups which could be made to
> > the various pirq allocation/mapping interfaces (of which there seem to
> > be too many, or at least their individual unique qualities are
> > indistinguishable by their names), I made a start on this at one point
> > since I wanted to get rid of the pirq_to_irq[nr_irqs] array, for obvious
> > reasons, but didn't finish it off. I'll hopefully revisit this soon.
> 
> Excellent. Looking forward to it.

Here is a first pass at some cleanups (based upon your series here).

I think the early parts of this series are reasonably uncontentious.

The second half refactors xen_create_msi_irq and xen_allocate_pirq_msi
with the aim of reducing confusion (i.e. without looking at the code
which of these is a dom0 only function and which is used by PV domU and
PVHVM domU?).

To do this I refactor into xen_allocate_pirq_msi, which simply gets a
free IRQ, and xen_bind_pirq_msi_to_irq, which performs the actual
binding and is common to all domain types.

Tested (lightly) as dom0, PV domU with MSI device passthrough and PVHVM
domU with MSI device passthrough.

In the future I hope to also tackle xen_map_irq_gsi and
xen_allocate_pirq.


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

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