From mboxrd@z Thu Jan 1 00:00:00 1970 From: Wei Liu Subject: Re: [PATCH v2] libxl: Introduce a template for devices with a controller Date: Tue, 1 Dec 2015 15:58:55 +0000 Message-ID: <20151201155855.GX21588@citrix.com> References: <1448971798-3498-1-git-send-email-george.dunlap@eu.citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <1448971798-3498-1-git-send-email-george.dunlap@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: George Dunlap Cc: Juergen Gross , Olaf Hering , Wei Liu , Ian Campbell , George Dunlap , xen-devel@lists.xen.org, Ian Jackson , Chun Yan Liu List-Id: xen-devel@lists.xenproject.org On Tue, Dec 01, 2015 at 12:09:58PM +0000, George Dunlap wrote: [...] > diff --git a/tools/libxl/libxl.h b/tools/libxl/libxl.h > index 6b73848..44e2951 100644 > --- a/tools/libxl/libxl.h > +++ b/tools/libxl/libxl.h > @@ -1396,6 +1396,71 @@ void libxl_vtpminfo_list_free(libxl_vtpminfo *, int nr_vtpms); > * > * This function does not interact with the guest and therefore > * cannot block on the guest. > + * > + * Controllers > + * ----------- > + * > + * Most devices are treated individually. Some classes of device, > + * however, like USB or SCSI, inherently have the need to have a > + * hierarchy of different levels, with lower-level devices "attached" > + * to higher-level ones. USB for instance has "controllers" at the > + * top, which have buses, on which are devices, which consist of > + * multiple interfaces. SCSI has "hosts" at the top, then buses, > + * targets, and LUNs. > + * > + * In that case, for each , there will be a set of functions > + * and types for each . For example, for =usb, there > + * may be ctrl (controller) and dev (device), with ctrl being > + * level 0. > + * > + * libxl_device__ will act more or Missed "level0" comment from Chunyan? > + * less like top-level non-bus devices: they will either create or > + * accept a libxl_devid which will be unique within the > + * libxl_devid namespace. > + * Ditto.