From mboxrd@z Thu Jan 1 00:00:00 1970 From: Julien Grall Subject: Re: [PATCH v3 23/24] libxl: Add support for non-PCI passthrough Date: Thu, 29 Jan 2015 12:08:03 +0000 Message-ID: <54CA22A3.1040001@linaro.org> References: <1421159133-31526-1-git-send-email-julien.grall@linaro.org> <1421159133-31526-24-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 1YGntg-0008Uy-MS for xen-devel@lists.xenproject.org; Thu, 29 Jan 2015 12:08:32 +0000 Received: by mail-wi0-f179.google.com with SMTP id l15so23617599wiw.0 for ; Thu, 29 Jan 2015 04:08:31 -0800 (PST) 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: Wei Liu , ian.campbell@citrix.com, tim@xen.org, Ian Jackson , stefano.stabellini@citrix.com, xen-devel@lists.xenproject.org List-Id: xen-devel@lists.xenproject.org Hi Stefano, On 29/01/15 11:12, Stefano Stabellini wrote: >> diff --git a/tools/libxl/libxl_create.c b/tools/libxl/libxl_create.c >> index 029d2e2..b7ef528 100644 >> --- a/tools/libxl/libxl_create.c >> +++ b/tools/libxl/libxl_create.c >> @@ -1430,6 +1430,16 @@ static void domcreate_attach_pci(libxl__egc *egc, libxl__multidev *multidev, > > I think you should at least rename domcreate_attach_pci to something > more generic, like domcreate_attach_dev. Actually I was planning to add a domcreate_attach_dtdev but I forgot about it. What the best approach for this? > >> } >> } >> >> + for (i = 0; i < d_config->num_dtdevs; i++) { >> + >> + ret = libxl__device_dt_add(gc, domid, &d_config->dtdevs[i]); >> + if (ret < 0) { >> + LIBXL__LOG(ctx, LIBXL__LOG_ERROR, >> + "libxl__device_dt_add failed: %d\n", ret); >> + goto error_out; >> + } >> + } > > You are allowed to call xc_* functions from here. The > libxl__device_dt_add wrapper doesn't add much value. I would like to keep the wrapper. It's in sync with the PCI solution and it will avoid refactoring later for add new code. Regards, -- Julien Grall