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 4/7] xen: The entrance for PV extension of HVM

To: Sheng Yang <sheng@xxxxxxxxxxxxxxx>
Subject: Re: [Xen-devel] [PATCH 4/7] xen: The entrance for PV extension of HVM
From: Jeremy Fitzhardinge <jeremy@xxxxxxxx>
Date: Mon, 01 Mar 2010 17:05:36 -0800
Cc: xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxx>, Ian Campbell <Ian.Campbell@xxxxxxxxxx>, Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx>, linux-kernel@xxxxxxxxxxxxxxx, Ian Pratt <Ian.Pratt@xxxxxxxxxxxxx>, Jeremy Fitzhardinge <jeremy.fitzhardinge@xxxxxxxxxx>, Keir Fraser <keir.fraser@xxxxxxxxxxxxx>, Ingo Molnar <mingo@xxxxxxx>
Delivery-date: Mon, 01 Mar 2010 17:05:55 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <1267436315-24486-5-git-send-email-sheng@xxxxxxxxxxxxxxx>
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: <1267436315-24486-1-git-send-email-sheng@xxxxxxxxxxxxxxx> <1267436315-24486-5-git-send-email-sheng@xxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.7) Gecko/20100120 Fedora/3.0.1-1.fc12 Lightning/1.0b2pre Thunderbird/3.0.1
On 03/01/2010 01:38 AM, Sheng Yang wrote:
xen_guest_init() would setup the environment.

Cc: Ingo Molnar<mingo@xxxxxxx>
Signed-off-by: Sheng Yang<sheng@xxxxxxxxxxxxxxx>
---
  arch/x86/kernel/setup.c |    8 ++++++++
  1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c
index 5d9e40c..2b61d46 100644
--- a/arch/x86/kernel/setup.c
+++ b/arch/x86/kernel/setup.c
@@ -113,6 +113,10 @@
  #endif
  #include<asm/mce.h>

+#ifdef CONFIG_XEN
+#include<xen/xen.h>
+#endif

No #ifdefs; put them in xen.h if necessary (which they aren't). This probably isn't the right header anyway; this is specifically for testing the presence of Xen and/or the current domain type. It shouldn't have any other prototypes in it, or include anything else (it probably already includes too much). Given this is already x86-specific code, include asm/xen/something.h.

+
  /*
   * end_pfn only includes RAM, while max_pfn_mapped includes all e820 entries.
   * The direct mapping extends to max_pfn_mapped, so that we can directly 
access
@@ -740,6 +744,10 @@ void __init setup_arch(char **cmdline_p)

        x86_init.oem.arch_setup();

+#ifdef CONFIG_XEN
+       xen_guest_init();
+#endif

Again, no #ifdefs here.  Put an #ifdeffed stub in an appropriate header.

    J

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

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