From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Chen, Tiejun" Subject: Re: [PATCH 11/16] tools/libxl: detect and avoid conflicts with RDM Date: Thu, 23 Jul 2015 08:52:24 +0800 Message-ID: <55B03AC8.2080503@intel.com> References: <1437579859-24485-1-git-send-email-ian.jackson@eu.citrix.com> <1437579859-24485-12-git-send-email-ian.jackson@eu.citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1437579859-24485-12-git-send-email-ian.jackson@eu.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 Jackson , xen-devel@lists.xensource.com Cc: George Dunlap , Wei Liu , Ian Campbell , Jan Beulich , Stefano Stabellini List-Id: xen-devel@lists.xenproject.org Ian, Thanks for your effort. A tiny change may be needed but I don't block this. > +libxl__xc_device_get_rdm(libxl__gc *gc, > + uint32_t flag, Since now we are sitting on xc_reserved_device_memory_map(, flags, xxx), s/flag/flags may be better. > + uint16_t seg, > + uint8_t bus, > + uint8_t devfn, > + unsigned int *nr_entries, > + struct xen_reserved_device_memory **xrdm) > +{ [snip] > + r = xc_reserved_device_memory_map(CTX->xch, flag, seg, bus, devfn, Ditto. > + NULL, nr_entries); > + assert(r <= 0); > + /* "0" means we have no any rdm entry. */ > + if (!r) goto out; > + > + if (errno != ENOBUFS) { > + rc = ERROR_FAIL; > + goto out; > + } > + > + GCNEW_ARRAY(*xrdm, *nr_entries); > + r = xc_reserved_device_memory_map(CTX->xch, flag, seg, bus, devfn, Ditto. Thanks Tiejun