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] xen: cleanup for xen_pv_domain()/xen_hvm_domain(

To: Xiao Guangrong <xiaoguangrong@xxxxxxxxxxxxxx>
Subject: [Xen-devel] Re: [PATCH] xen: cleanup for xen_pv_domain()/xen_hvm_domain()
From: Jeremy Fitzhardinge <jeremy@xxxxxxxx>
Date: Mon, 30 Nov 2009 11:07:38 -0800
Cc: Ingo Molnar <mingo@xxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>, LKML <linux-kernel@xxxxxxxxxxxxxxx>
Delivery-date: Mon, 30 Nov 2009 11:08:27 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <4B13637E.3040400@xxxxxxxxxxxxxx>
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>
References: <4B13637E.3040400@xxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.4pre) Gecko/20090922 Fedora/3.0-3.9.b4.fc12 Thunderbird/3.0b4
On 11/29/09 22:17, Xiao Guangrong wrote:
> Remove unnecessary judgment in xen_pv_domain() and xen_hvm_domain()
>   

I'd prefer not to change it.  These changes make no difference to the
generated code, and I see a small semantic difference between "is this a
Xen domain?" and "what kind of Xen domain is it?", as the latter on
really makes sense if it is in fact a Xen domain; the fact that
xen_domain() is also implemented in terms of xen_domain_type is just a
detail.

    J

> Signed-off-by: Xiao Guangrong <xiaoguangrong@xxxxxxxxxxxxxx>
> ---
>  arch/x86/include/asm/xen/hypervisor.h |    6 ++----
>  1 files changed, 2 insertions(+), 4 deletions(-)
>
> diff --git a/arch/x86/include/asm/xen/hypervisor.h 
> b/arch/x86/include/asm/xen/hypervisor.h
> index d5b7e90..f94bd0a 100644
> --- a/arch/x86/include/asm/xen/hypervisor.h
> +++ b/arch/x86/include/asm/xen/hypervisor.h
> @@ -50,10 +50,8 @@ extern enum xen_domain_type xen_domain_type;
>  #endif
>  
>  #define xen_domain()         (xen_domain_type != XEN_NATIVE)
> -#define xen_pv_domain()              (xen_domain() &&                        
> \
> -                              xen_domain_type == XEN_PV_DOMAIN)
> -#define xen_hvm_domain()     (xen_domain() &&                        \
> -                              xen_domain_type == XEN_HVM_DOMAIN)
> +#define xen_pv_domain()              (xen_domain_type == XEN_PV_DOMAIN)
> +#define xen_hvm_domain()     (xen_domain_type == XEN_HVM_DOMAIN)
>  
>  #ifdef CONFIG_XEN_DOM0
>  #include <xen/interface/xen.h>
>   


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

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