From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tamas Lengyel Subject: Re: Issues regarding "mem_access: Add helper API to setup ring and enable mem_access" Date: Mon, 30 Jun 2014 14:06:24 +0200 Message-ID: References: <1403882455.3169.72.camel@kazak.uk.xensource.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============3009633509711569096==" Return-path: In-Reply-To: <1403882455.3169.72.camel@kazak.uk.xensource.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 Campbell Cc: Aravindh Puthiyaparambil , Ian Jackson , "xen-devel@lists.xen.org" List-Id: xen-devel@lists.xenproject.org --===============3009633509711569096== Content-Type: multipart/alternative; boundary=001a11c31a3af8f83204fd0c7c1d --001a11c31a3af8f83204fd0c7c1d Content-Type: text/plain; charset=UTF-8 > > Now with this function being reintroduced, it becomes more complicated > > to determine which version of the mem_access API does Xen actually > > provide. A #define indicating mem_access API version would nicely > > overcome this issue, or naming xc_mem_event_enable something else. > > Doesn't configure support checking for functions with a given prototype? > It does but in a very hacky way, essentially trying to compile code where the function is being called with different prototypes. We can work around it but a clean solution would be preferred at some point. > > Furthermore, the new xc_mem_event_enable function unconditionally > > unpauses the VM. This may not be a desired behavior in all cases, > > especially if the VM was in a paused state when the function was > > called. > > domain pauses are referenced counted on the hypervisor side. > > Ian. > > I did a quick test with xc_domain_pause being called twice, then xc_domain_unpause once and the domain was in unpaused state at the end. Same with the xen-access example, a paused domain gets automatically unpaused by libxc, either though the xen-access code doesn't specifically say it should be. This is now a rather opaque behavior of libxc. As it is not merged into master I guess I will just submit a patch for it.. Tamas --001a11c31a3af8f83204fd0c7c1d Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable

=
> Now with this function being reintroduced, it becomes more complicated=
> to determine which version of the mem_access API does Xen actually
> provide. A #define indicating mem_access API version would nicely
> overcome this issue, or =C2=A0naming xc_mem_event_enable something els= e.

Doesn't configure support checking for functions with a given pro= totype?

It does but in a very hacky way= , essentially trying to compile code where the function is being called wit= h different prototypes. We can work around it but a clean solution would be= preferred at some point.

=C2=A0

Ian.


I did a quick test with xc_domain_p= ause being called twice, then xc_domain_unpause once and the domain was in = unpaused state at the end. Same with the xen-access example, a paused domai= n gets automatically unpaused by libxc, either though the xen-access code d= oesn't specifically say it should be. This is now a rather opaque behav= ior of libxc. As it is not merged into master I guess I will just submit a = patch for it..

Tamas

--001a11c31a3af8f83204fd0c7c1d-- --===============3009633509711569096== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel --===============3009633509711569096==--