From mboxrd@z Thu Jan 1 00:00:00 1970 From: Juergen Gross Subject: Re: [RFC V2] xen: interface: introduce pvclk interface Date: Wed, 20 Jan 2016 10:05:15 +0100 Message-ID: <569F4DCB.2030701@suse.com> References: <1453278682-8750-1-git-send-email-van.freenix@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1aLoha-0000rj-Ab for xen-devel@lists.xenproject.org; Wed, 20 Jan 2016 09:05:18 +0000 In-Reply-To: <1453278682-8750-1-git-send-email-van.freenix@gmail.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: Peng Fan , xen-devel@lists.xenproject.org Cc: Julien Grall , George Dunlap , David Vrabel , Ian Campbell , Stefano Stabellini List-Id: xen-devel@lists.xenproject.org On 20/01/16 09:31, Peng Fan wrote: > Introduce pvclk interface which is useful when doing device passthrough > on ARM platform. ... > +/* > + * Frontend request > + * > + * cmd: command for operation on clk, should be XEN_CLK_[xx], > + * excluding XEN_CLK_END. id is the > + * id: clk id > + * rate: clock rate. Used for set rate. Which unit? Hz? > + */ > +struct xen_clkif_request { > + uint32_t cmd; > + uint32_t id; > + uint64_t rate; > +}; > +typedef struct xen_clkif_request xen_clkif_request_t; > + > +/* > + * Backend response > + * > + * cmd: command for operation on clk, same with the cmd in request. > + * id: clk id, same with the id in request. > + * success: indicate failure or success for the cmd. Values? > + * rate: clock rate. Used for get rate. > + * > + * cmd and id are filled by backend and passed to frontend to > + * let frontend check whether the response is for the current > + * request or not. I'd rather let the frontend add a request Id to the request which will be echoed here instead cmd and clock Id. Juergen