Skip to contentSkip to conversation

libxc: Clean up xc_map_foreign_ranges() interface to hide the

Xen-changelog Samuel Thibault 1 participant 2 messages Jul 23, 2008 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw

tools/libxc/xc_private.h static inline int do_sysctl(int xc_handl · line 189

Quoted 12 lines · Xen patchbot-unstable, le Wed 23 Jul 2008 08:50:44 -0700, a écrit :

diff -r 351ce3b94e2d -r 7299346111fb tools/libxc/xc_private.h

tools/libxc/xc_private.h +3 -2
@@ -184,8 +184,9 @@ static inline int do_sysctl(int xc_handl
     return ret;
 }
 
-int xc_map_foreign_ranges(int xc_handle, uint32_t dom,
-                          privcmd_mmap_entry_t *entries, int nr);
+void *xc_map_foreign_ranges(int xc_handle, uint32_t dom,
+                            size_t size, int prot, size_t chunksize,
+                            privcmd_mmap_entry_t entries[], int nentries);

Mmm, why chunksize? Shouldn't entries[] provide it, for a more powerful interface (each entry can have a different size)?

Samuel

#2 lore raw
Quoted 8 lines · Samuel Thibault, le Wed 23 Jul 2008 16:59:41 +0100, a écrit :
Quoted 7 lines · Xen patchbot-unstable, le Wed 23 Jul 2008 08:50:44 -0700, a écrit :

diff -r 351ce3b94e2d -r 7299346111fb tools/libxc/xc_private.h

tools/libxc/xc_private.h +0 -0
@@ -184,8 +184,9 @@ static inline int do_sysctl(int xc_handl
     return ret;
 }
 
Quoted 8 lines

tools/libxc/xc_private.h static inline int do_sysctl(int xc_handl · line 189

Quoted 5 lines
tools/libxc/xc_private.h +3 -2
-int xc_map_foreign_ranges(int xc_handle, uint32_t dom,
-                          privcmd_mmap_entry_t *entries, int nr);
+void *xc_map_foreign_ranges(int xc_handle, uint32_t dom,
+                            size_t size, int prot, size_t chunksize,
+                            privcmd_mmap_entry_t entries[], int nentries);

Mmm, why chunksize? Shouldn't entries[] provide it, for a more powerful interface (each entry can have a different size)?

Also, the size argument is redundant.

Samuel