From: Wei Liu Subject: Re: [PATCH 11/16] tools/libxl: detect and avoid conflicts with RDM Date: Thu, 23 Jul 2015 08:35:48 +0100 Message-ID: <20150723073548.GF16933@zion.uk.xensource.com> References: <1437579859-24485-1-git-send-email-ian.jackson@eu.citrix.com> <1437579859-24485-12-git-send-email-ian.jackson@eu.citrix.com> <55B03AC8.2080503@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <55B03AC8.2080503@intel.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: "Chen, Tiejun" Cc: xen-devel@lists.xensource.com, Wei Liu , Ian Campbell , Stefano Stabellini , George Dunlap , Ian Jackson , Jan Beulich List-Id: xen-devel@lists.xenproject.org On Thu, Jul 23, 2015 at 08:52:24AM +0800, Chen, Tiejun wrote: > 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. > These cosmetic changes can be fixed by a follow-up patch. Wei. > Thanks > Tiejun