From mboxrd@z Thu Jan 1 00:00:00 1970 From: Julien Grall Subject: Re: [RFC PATCH v3 10/18] xen/arm: ITS: Add APIs to add and assign device Date: Thu, 2 Jul 2015 11:30:30 +0100 Message-ID: <559512C6.1060103@citrix.com> References: <1434974517-12136-1-git-send-email-vijay.kilari@gmail.com> <1434974517-12136-11-git-send-email-vijay.kilari@gmail.com> <1435580951.32500.307.camel@citrix.com> <1435827668.21469.320.camel@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1435827668.21469.320.camel@citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Ian Campbell , Vijay Kilari Cc: Stefano Stabellini , Prasun Kapoor , Vijaya Kumar K , Tim Deegan , "xen-devel@lists.xen.org" , Stefano Stabellini , manish.jaggi@caviumnetworks.com List-Id: xen-devel@lists.xenproject.org On 02/07/15 10:01, Ian Campbell wrote: > On Thu, 2015-07-02 at 14:10 +0530, Vijay Kilari wrote: >> On Mon, Jun 29, 2015 at 5:59 PM, Ian Campbell wrote: >>> CIOn Mon, 2015-06-22 at 17:31 +0530, vijay.kilari@gmail.com wrote: >>>> +/* Device assignment. Should be called from pci_device_add */ >>>> +int its_add_device(struct domain *d, u32 devid) >>>> +{ >>> >>> Prior to the PCI series landing, and to enable dom0 to use ITS it might >>> be possible to call this from xen/arch/arm/platforms/thunderx.c via the >>> specific_mappings platform hook, which would also expose the PCI >>> controller to dom0 via a series of specific mmio mappings (look at >>> xen/arch/arm/platforms/xgene-storm.c for the sort of thing I mean). >>> >>> That would, I think, give basic PCI functionality for dom0 (i.e. >>> allowing us to boot on thunderx) and decouple things from the PCI series >>> somewhat, which ought to make things easier overall IMHO. >> >> In case ThunderX, mmio mappings PCI RC is parsed to find devices. >> How do we know device ids upfront to call its_add_device? > > Ah yes, this approach probably doesn't work for ITS. Which is a shame. I guess the number of device IDs supported by thunderX is bounded and not so big. So you could do a loop which register all the IDs from 0 to N. Though, it may be possible to be smarter. Regards, -- Julien Grall