WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] Re: [PATCH 1 of 3 V6] tools/libxc: introduce page_aligned_al

To: Ian Campbell <Ian.Campbell@xxxxxxxxxx>
Subject: [Xen-devel] Re: [PATCH 1 of 3 V6] tools/libxc: introduce page_aligned_alloc in xc_{minios, linux, solaris, netbsd}.c
From: Shriram Rajagopalan <rshriram@xxxxxxxxx>
Date: Thu, 10 Nov 2011 08:36:13 -0800
Cc: "brendan@xxxxxxxxx" <brendan@xxxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>, IanJackson <Ian.Jackson@xxxxxxxxxxxxx>
Delivery-date: Thu, 10 Nov 2011 08:43:19 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <1320822437.16747.90.camel@xxxxxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <patchbomb.1320791985@xxxxxxxxxxxxxxxxxxx> <58a24a7d4b8754069236.1320791986@xxxxxxxxxxxxxxxxxxx> <1320822437.16747.90.camel@xxxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
On 2011-11-08, at 11:07 PM, Ian Campbell <Ian.Campbell@xxxxxxxxxx> wrote:

> On Tue, 2011-11-08 at 22:39 +0000, rshriram@xxxxxxxxx wrote:
>> diff -r 54a5e994a241 -r 58a24a7d4b87 tools/libxc/xc_linux_osdep.c
>> --- a/tools/libxc/xc_linux_osdep.c    Wed Nov 02 17:09:09 2011 +0000
>> +++ b/tools/libxc/xc_linux_osdep.c    Tue Nov 08 14:26:02 2011 -0800
>> @@ -36,9 +36,17 @@
>> #include <xen/sys/gntdev.h>
>> #include <xen/sys/gntalloc.h>
>> 
>> +#include "xc_private.h"
> 
> I'd like to avoid including xc_private from this file. Although it's in
> tree it is a plugin and avoiding internal APIs serves to help ensure
> that external plugins can actually be written using the public APIs.
> 
> I think you can make this function public, as long as you name it
> xc_blah.
> 
> Ian.
> 

The reason I declared the function in xc_private.h was to maintain consistency, 
like discard_file_cache().
But I see your point.

Just to make sure I get it right this time.
Are you suggesting that I declare a 
public function xc_page_aligned_alloc in a header like xenctrl.h and have 
respective platform specific implementations in xc_{minios,linux,netbsd}.c ? 
That way I won't have to include xc_private.h in linux_osdep.c (it already 
includes xenctrl.h).

And are you okay with other modifications in these files (like abstracting out 
memaligns from privcmd_hypercall_alloc() )..?

Shriram

> 

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel