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] get xenstore buffer in vmx guest

To: "Ling, Xiaofeng" <xiaofeng.ling@xxxxxxxxx>
Subject: RE: [Xen-devel] [PATCH] get xenstore buffer in vmx guest
From: Rusty Russell <rusty@xxxxxxxxxxxxxxx>
Date: Tue, 06 Sep 2005 10:15:54 +1000
Cc: Ian Pratt <m+Ian.Pratt@xxxxxxxxxxxx>, xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Tue, 06 Sep 2005 00:13:49 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <3ACA40606221794F80A5670F0AF15F84095B7041@pdsmsx403>
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: <3ACA40606221794F80A5670F0AF15F84095B7041@pdsmsx403>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
On Mon, 2005-09-05 at 22:22 +0800, Ling, Xiaofeng wrote:
> Rusty Russell <mailto:rusty@xxxxxxxxxxxxxxx> wrote:
> > Just a minor thing: I'd really prefer an inline function called
> > xenstore_page_virt() or something, rather than a macro which looks
> > like a constant. 
> ok, so the new patch will be:

> --- a/linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_comms.h    Tue Aug 30 
> 20:36:49 2005
> +++ b/linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_comms.h    Mon Sep  5 
> 22:15:45 2005
> @@ -38,4 +38,17 @@
>  int xs_input_avail(void);
>  extern wait_queue_head_t xb_waitq;
> 
> +#ifdef CONFIG_XEN
> +static inline void *xenstore_page_virt(void)
> +{
> +    return (void*)mfn_to_virt(xen_start_info.store_mfn);
> +}

Great!   I think the (void*) cast is redundant though?

> -postcore_initcall(xenbus_probe_init);
> +module_init(xenbus_probe_init);
> +MODULE_LICENSE("GPL");

This should probably be:
        MODULE_LICENSE("Dual BSD/GPL");

Cheers,
Rusty.
-- 
A bad analogy is like a leaky screwdriver -- Richard Braakman


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