From mboxrd@z Thu Jan 1 00:00:00 1970 From: Julien Grall Subject: Re: [PATCH v2 20/21] libxl: Add support for non-PCI passthrough Date: Wed, 06 Aug 2014 17:50:48 +0100 Message-ID: <53E25CE8.7090104@linaro.org> References: <1406818852-31856-1-git-send-email-julien.grall@linaro.org> <1406818852-31856-21-git-send-email-julien.grall@linaro.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta14.messagelabs.com ([193.109.254.103]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1XF4QQ-0003pn-Fq for xen-devel@lists.xenproject.org; Wed, 06 Aug 2014 16:50:54 +0000 Received: by mail-wg0-f42.google.com with SMTP id l18so2888903wgh.13 for ; Wed, 06 Aug 2014 09:50:52 -0700 (PDT) In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Stefano Stabellini Cc: Ian Jackson , xen-devel@lists.xenproject.org, tim@xen.org, ian.campbell@citrix.com, stefano.stabellini@citrix.com List-Id: xen-devel@lists.xenproject.org Hi Stefano, On 08/06/2014 05:44 PM, Stefano Stabellini wrote: > On Thu, 31 Jul 2014, Julien Grall wrote: >> On ARM, every non-PCI device are described in the device tree. Each of them >> can be found via a path. >> >> This path will be used to retrieved the different informations about the >> device (compatible string, interrupts, MMIOs). Libxl will take care of: >> - Allocate the MMIOs regions for the device in the guest >> - Create the device node in the guest device tree >> - Map the IRQs and MMIOs range in the guest P2M >> >> Note, that the device node won't contains specific properties for the node. >> Only generic one (compatible, interrupts, regs) will be created by libxl. >> >> In the future, per-device properties will be added. Maybe via a configuration >> file listing what is needed. >> >> Signed-off-by: Julien Grall >> Cc: Ian Jackson >> Cc: Stefano Stabellini >> Cc: Ian Campbell >> >> --- >> Changes in v2: >> - Get DT infos earlier >> - Allocate/map IRQ in libxl__arch_domain_create rather than in >> libxl__device_dt_add > > I understand why you moved it earlier but if it is not too hard I would > suggest to try to keep mmio and irq mapping all together, because it > would make the code much easier to read and modify in the future, being > all in one place. I could fixup the device tree later. So we don't have to "map/retrieve" the IRQ earlier. But I don't much like this solution. Regards, -- Julien Grall