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/3] libxc: add xc_gnttab_map_grant_ref_notify

On Thu, 2011-09-22 at 23:14 +0100, Daniel De Graaf wrote:
> diff --git a/tools/libxc/xenctrlosdep.h b/tools/libxc/xenctrlosdep.h
> index bfe46e0..1c6317e 100644
> --- a/tools/libxc/xenctrlosdep.h
> +++ b/tools/libxc/xenctrlosdep.h
> @@ -105,20 +105,12 @@ struct xc_osdep_ops
>              int (*unmask)(xc_evtchn *xce, xc_osdep_handle h, evtchn_port_t 
> port);
>          } evtchn;
>          struct {
> -            void *(*map_grant_ref)(xc_gnttab *xcg, xc_osdep_handle h,
> -                                   uint32_t domid,
> -                                   uint32_t ref,
> -                                   int prot);
> -            void *(*map_grant_refs)(xc_gnttab *xcg, xc_osdep_handle h,
> -                                    uint32_t count,
> -                                    uint32_t *domids,
> -                                    uint32_t *refs,
> -                                    int prot);
> -            void *(*map_domain_grant_refs)(xc_gnttab *xcg, xc_osdep_handle h,
> -                                           uint32_t count,
> -                                           uint32_t domid,
> -                                           uint32_t *refs,
> -                                           int prot);
> +#define XC_GRANT_MAP_SINGLE_DOMAIN 0x1
> +            void *(*grant_map)(xc_gnttab *xcg, xc_osdep_handle h,
> +                               uint32_t count, int flags, int prot,
> +                               uint32_t *domids, uint32_t *refs,
> +                               uint32_t notify_offset,
> +                               evtchn_port_t notify_port);
>              int (*munmap)(xc_gnttab *xcg, xc_osdep_handle h,
>                            void *start_address,
>                            uint32_t count); 

Not specifically to do with this patch but I wonder if we should try and
figure a way to version these shared libraries somehow, otherwise
changes like this lead to segfault at best and unexpected non-crashing
behaviour at worst (for out of tree backends that is).

Something as simple as checksumming the xenctrlosdep.h header and
including the value in the .so to be checked at load time would do the
trick.

Ian.



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