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, RFC 3/4] qemu: use new (replacement) mmap-batch

To: "Jan Beulich" <JBeulich@xxxxxxxxxx>
Subject: Re: [Xen-devel] [PATCH, RFC 3/4] qemu: use new (replacement) mmap-batch ioctl
From: Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx>
Date: Tue, 12 Jan 2010 17:25:50 +0000
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Tue, 12 Jan 2010 09:26:19 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <4B4B48DE0200007800029132@xxxxxxxxxxxxxxxxxx>
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>
Newsgroups: chiark.mail.xen.devel
References: <4B4B48DE0200007800029132@xxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
I don't have any objections to this in principle, but:

> +#if __XEN_LATEST_INTERFACE_VERSION__ < 0x0003020a
> +void * __attribute__((__weak__))
> +xc_map_foreign_bulk(int xc_handle, uint32_t dom, int prot,
> +                    const xen_pfn_t *, int *err, unsigned int num);
> +#endif

This is pretty horrible.

This should be done by using the #ifdef arround the call to
xc_map_foreign_bulk, not by having a weak symbol compared to NULL.

You might consider whether the ability to use the old call is intended
to last forever.  Probably not, soi you should mark it deprecated.

Jan Beulich writes ("[Xen-devel] [PATCH, RFC 3/4] qemu: use new (replacement) 
mmap-batch ioctl"):
> -    phys_ram_base = xc_map_foreign_batch(xc_handle, domid,
> +    phys_ram_base = xc_map_foreign_pages(xc_handle, domid,
>                                           PROT_READ|PROT_WRITE,
>                                           page_array, nr_pages);

I'm not sure I understand this bug I haven't looked at it in any kind
of detail so it may be correct.

Ian.

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