From mboxrd@z Thu Jan 1 00:00:00 1970 From: Konrad Rzeszutek Wilk Subject: Re: [PATCH 04/13] Removed MSI capability in the pci-back driver. Date: Mon, 19 Oct 2009 11:04:15 -0400 Message-ID: <20091019150415.GB13322@phenom.dumpdata.com> References: <1255468952-27052-1-git-send-email-konrad.wilk@oracle.com> <1255468952-27052-2-git-send-email-konrad.wilk@oracle.com> <1255468952-27052-3-git-send-email-konrad.wilk@oracle.com> <1255468952-27052-4-git-send-email-konrad.wilk@oracle.com> <1255468952-27052-5-git-send-email-konrad.wilk@oracle.com> <4AD4F90C.2080204@goop.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: <4AD4F90C.2080204@goop.org> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Jeremy Fitzhardinge Cc: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org On Tue, Oct 13, 2009 at 03:02:52PM -0700, Jeremy Fitzhardinge wrote: > On 10/13/09 14:22, Konrad Rzeszutek Wilk wrote: > > Currently the tree does not have the Xen MSI capability. Will re-introduce > > when the capability exists. > > > > Devices with MSI interrupts work fine in dom0. Are you referring to > something else? The issue I was referring to was the ownership of MSI interrupts for PV guests. Mainly the mechanism for binding an MSI interrupt to a guest is not part of the Linux pv-ops kernel. If you look in the xen_setup_msi_irqs function, 624 map_irq.domid = domid; 625 map_irq.type = MAP_PIRQ_TYPE_MSI; 626 map_irq.index = -1; 627 map_irq.pirq = -1; 628 map_irq.bus = dev->bus->number; 629 map_irq.devfn = dev->devfn; 630 .. snip .. 649 rc = HYPERVISOR_physdev_op(PHYSDEVOP_map_pirq, &map_irq); The domain that the vector is assigned to is the DOMID_SELF (domid earlier on is set to that). For pciback purpose, this needs to be the guest domain id. HVM guests accomplish this in the hw/pt-msi.c code, so we need only to worry about the PV case. In the 2.6.18 code there was hook that would pass this domaid ID around for the device (register_msi_get_owner and its friend). I am trying to figure out if there is a more upstream-applicable way of doing this. > > J >