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: linux-next: build failure after merge of the final tree

To: Jeremy Fitzhardinge <jeremy@xxxxxxxx>
Subject: [Xen-devel] Re: linux-next: build failure after merge of the final tree (xen tree related)
From: Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx>
Date: Mon, 26 Jul 2010 18:57:39 +0100
Cc: Stephen Rothwell <sfr@xxxxxxxxxxxxxxxx>, Xen Devel <Xen-devel@xxxxxxxxxxxxxxxxxxx>, Stefano Stabellini <Stefano.Stabellini@xxxxxxxxxxxxx>, "linux-kernel@xxxxxxxxxxxxxxx" <linux-kernel@xxxxxxxxxxxxxxx>, "linux-next@xxxxxxxxxxxxxxx" <linux-next@xxxxxxxxxxxxxxx>, Sheng Yang <sheng@xxxxxxxxxxxxxxx>
Delivery-date: Mon, 26 Jul 2010 10:58:14 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <4C4DC505.9040202@xxxxxxxx>
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: <20100726152908.951a95b7.sfr@xxxxxxxxxxxxxxxx> <alpine.DEB.2.00.1007261132180.22235@kaball-desktop> <4C4DC505.9040202@xxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Alpine 2.00 (DEB 1167 2008-08-23)
On Mon, 26 Jul 2010, Jeremy Fitzhardinge wrote:
>   On 07/26/2010 03:43 AM, Stefano Stabellini wrote:
> > On Mon, 26 Jul 2010, Stephen Rothwell wrote:
> >> Hi all,
> >>
> >> After merging the final tree, today's linux-next build (i386 defconfig)
> >> failed like this:
> >>
> >> arch/x86/built-in.o: In function `init_hypervisor_platform':
> >> (.init.text+0x3ca4): undefined reference to `x86_hyper_xen_hvm'
> >> arch/x86/built-in.o: In function `init_hypervisor_platform':
> >> (.init.text+0x3cad): undefined reference to `x86_hyper_xen_hvm'
> >>
> >> Caused by commit bee6ab53e652a414af20392899879b58cd80d033 ("x86: early PV
> >> on HVM features initialization").
> >>
> >> I reverted commit 4b9100d12d15c0eaf23d9edc86228e1bdf452dc2 ("Merge branch
> >> 'upstream/pvhvm' into upstream/xen") for today (since there were
> >> dependencies on the above commit).
> > The problem is that x86_hyper_xen_hvm is in arch/x86/xen/enlighten.c,
> > that is compiled only when CONFIG_XEN is enabled.
> > The appended patch fixes the issue moving x86_hyper_xen_hvm to
> > arch/x86/kernel/cpu/xen.c that is always compiled.
> >
> > An shorter alternative solution would be just to ifdef CONFIG_XEN
> > x86_hyper_xen_hvm in arch/x86/kernel/cpu/hypervisor.c.
> 
> Seems like the most sensible thing to do.  What's the point in detecting 
> Xen if we don't have CONFIG_XEN enabled?

There isn't much point in doing so apart from avoiding an ifdef.
This is the alternative:

---


Signed-off-by: Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx>

diff --git a/arch/x86/kernel/cpu/hypervisor.c b/arch/x86/kernel/cpu/hypervisor.c
index bffd47c..5bccedc 100644
--- a/arch/x86/kernel/cpu/hypervisor.c
+++ b/arch/x86/kernel/cpu/hypervisor.c
@@ -34,7 +34,9 @@ static const __initconst struct hypervisor_x86 * const 
hypervisors[] =
 {
        &x86_hyper_vmware,
        &x86_hyper_ms_hyperv,
+#ifdef CONFIG_XEN
        &x86_hyper_xen_hvm,
+#endif
 };
 
 const struct hypervisor_x86 *x86_hyper;

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