From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ross Lagerwall Subject: Re: [PATCH v2 03/13] xen/xsplice: Hypervisor implementation of XEN_XSPLICE_op (v7) Date: Tue, 19 Jan 2016 14:30:58 +0000 Message-ID: <569E48A2.9010600@citrix.com> References: <1452808031-706-1-git-send-email-konrad.wilk@oracle.com> <1452808031-706-4-git-send-email-konrad.wilk@oracle.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" 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 1aLXJH-000052-5w for xen-devel@lists.xenproject.org; Tue, 19 Jan 2016 14:31:03 +0000 In-Reply-To: <1452808031-706-4-git-send-email-konrad.wilk@oracle.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: Konrad Rzeszutek Wilk , xen-devel@lists.xenproject.org, mpohlack@amazon.com, andrew.cooper3@citrix.com, stefano.stabellini@citrix.com, jbeulich@suse.com, ian.jackson@eu.citrix.com, ian.campbell@citrix.com, wei.liu2@citrix.com, sasha.levin@oracle.com List-Id: xen-devel@lists.xenproject.org On 01/14/2016 09:47 PM, Konrad Rzeszutek Wilk wrote: > +struct xen_sysctl_xsplice_summary { > + xen_xsplice_name_t name; /* IN, name of the payload. */ > + xen_xsplice_status_t status; /* IN/OUT, state of it. */ > +}; > +typedef struct xen_sysctl_xsplice_summary xen_sysctl_xsplice_summary_t; > +DEFINE_XEN_GUEST_HANDLE(xen_sysctl_xsplice_summary_t); > + > +/* > + * Retrieve an array of abbreviated status and names of payloads that are > + * loaded in the hypervisor. > + * > + * If the hypercall returns an positive number, it is the number (up to `nr`) > + * of the payloads returned, along with `nr` updated with the number of remaining > + * payloads, `version` updated (it may be the same across hypercalls. If it > + * varies the data is stale and further calls could fail). The `status`, > + * `name`, and `len`' are updated at their designed index value (`idx`) with > + * the returned value of data. > + * > + * If the hypercall returns E2BIG the `nr` is too big and should be > + * lowered. > + * > + * This operation can be preempted by the hypercall returning EAGAIN. > + * Retry. > + * > + * Note that due to the asynchronous nature of hypercalls the domain might have > + * added or removed the number of payloads making this information stale. It is > + * the responsibility of the toolstack to use the `version` field to check > + * between each invocation. if the version differs it should discard the stale > + * data and start from scratch. It is OK for the toolstack to use the new > + * `version` field. > + */ > +#define XEN_SYSCTL_XSPLICE_LIST 2 > +struct xen_sysctl_xsplice_list { > + uint32_t version; /* IN/OUT: Initially *MUST* be zero. > + On subsequent calls reuse value. > + If varies between calls, we are > + * getting stale data. */ > + uint32_t idx; /* IN/OUT: Index into array. */ > + uint32_t nr; /* IN: How many status, id, and len s/id/name/ > + should fill out. > + OUT: How many payloads left. */ > + uint32_t pad; /* IN: Must be zero. */ > + XEN_GUEST_HANDLE_64(xen_xsplice_status_t) status; /* OUT. Must have enough > + space allocate for nr of them. */ > + XEN_GUEST_HANDLE_64(char) name; /* OUT: Array of ids. Each member s/id/name/ > + MUST XEN_XSPLICE_NAME_SIZE in size. > + Must have nr of them. */ > + XEN_GUEST_HANDLE_64(uint32) len; /* OUT: Array of lengths of ids. s/id/name/ > + Must have nr of them. */ > +}; > +typedef struct xen_sysctl_xsplice_list xen_sysctl_xsplice_list_t; > +DEFINE_XEN_GUEST_HANDLE(xen_sysctl_xsplice_list_t); > + > +/* > + * Perform an operation on the payload structure referenced by the `name` field. > + * The operation request is asynchronous and the status should be retrieved > + * by using either XEN_SYSCTL_XSPLICE_GET or XEN_SYSCTL_XSPLICE_LIST hypercall. > + */ > +#define XEN_SYSCTL_XSPLICE_ACTION 3 > +struct xen_sysctl_xsplice_action { -- Ross Lagerwall