From: Ian Campbell Subject: Re: [PATCH 07/12] xen: events: separate MSI PIRQ allocation from PIRQ binding to IRQ Date: Mon, 21 Feb 2011 13:39:05 +0000 Message-ID: <1298295545.16356.7802.camel@zakaz.uk.xensource.com> References: <1298047386.16356.3620.camel@zakaz.uk.xensource.com> <1298047417-7445-7-git-send-email-ian.campbell@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Stefano Stabellini Cc: Jeremy Fitzhardinge , "xen-devel@lists.xensource.com" , Konrad Rzeszutek Wilk List-Id: xen-devel@lists.xenproject.org On Mon, 2011-02-21 at 12:50 +0000, Stefano Stabellini wrote: > On Fri, 18 Feb 2011, Ian Campbell wrote: > my only concern is about the order of the calls: on native and on xen > before this patch the order is > > msi_compose_msg > set_irq_msi > write_msi_msg > > while after this patch the order is: > > msi_compose_msg > write_msi_msg > set_irq_msi > > however I don't think it makes a difference because msi (and msix) > are not enabled yet anyway on the pci device in question (they are > enabled by msi(x)_capability_init right after calling > arch_setup_msi_irqs). My take is that write_msi_msg is literally get_irq_msi (to fetch the corresponding struct msi_desc) followed by __write_msi_msg. The set_irq_msi does nothing other than associate an msi_desc with an IRQ number in order that the get_irq_msi can return it. But since we have the right msi_desc in our hand already using __write_msi_msg directly is OK and so this ordering is fine. Ian.