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

Re: [Xen-devel] [PATCH][libxen] Fix 'contents' field of set structures i

To: Jim Fehlig <jfehlig@xxxxxxxxxx>
Subject: Re: [Xen-devel] [PATCH][libxen] Fix 'contents' field of set structures in libxen iinterface
From: Ewan Mellor <ewan@xxxxxxxxxxxxx>
Date: Wed, 8 Nov 2006 15:09:32 +0000
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Wed, 08 Nov 2006 07:09:50 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <454BE1BB.7050000@xxxxxxxxxx>
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/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <454BE1BB.7050000@xxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.5.9i
On Fri, Nov 03, 2006 at 05:41:31PM -0700, Jim Fehlig wrote:

> Many of the set structures in the libxen interface contain a 'contents' 
> field with too many dimensions, particularly when 'contents' stores 
> references.  References are defined in the various xen_*_decl.h headers 
> as 'void *'.  Sets of the various classes are defined for example as
> 
>  typedef void *xen_vm;
> 
>  typedef struct xen_vm_set
>  {
>     size_t size;
>     xen_vm *contents[];
>  } xen_vm_set;
> 
> The additional dimension on 'contents' for sets of references is not 
> required.
> 

I meant to discuss this with you when you sent this privately a few weeks
ago -- sorry I forgot.

I can see what you're trying to do here.  The problem is that populating this
set becomes difficult.  The sets are read off the wire using the generic
code in xen_common.c, guided by the abstract_type that's passed in.  The thing
is, we have only one indicator for sets (SET) but with your patch we'll need
to introduce a second indicator, to distinguish between sets where the value
is put in place (like handles) and sets where the value placed is a pointer
(like sets of records).  This will have to be part of a larger patch,
unfortunately.  I'll have a hack now and see what I can do.

Cheers,

Ewan.

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

<Prev in Thread] Current Thread [Next in Thread>