All of lore.kernel.org
 help / color / mirror / Atom feed
* Compile pvops kernel xen/stable-2.6.32.x error
@ 2010-10-27 16:55 Teck Choon Giam
  2010-10-27 17:24 ` Jeremy Fitzhardinge
  0 siblings, 1 reply; 10+ messages in thread
From: Teck Choon Giam @ 2010-10-27 16:55 UTC (permalink / raw)
  To: xen-devel

Hi,

I pulled from git://git.kernel.org/pub/scm/linux/kernel/git/jeremy/xen.git
and do the following:

git checkout -b xen/stable-2.6.32.x --track origin/xen/stable-2.6.32.x
git pull

git log showing the latest commit as below:

commit d0054d672ff0ebf6116cee27bae3fc2591c726af
Author: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Date:   Mon Oct 25 16:53:46 2010 -0700

    x86/pvclock: zero last_value on resume

    If the guest domain has been suspend/resumed or migrated, then the
    system clock backing the pvclock clocksource may revert to a smaller
    value (ie, can be non-monotonic across the migration/save-restore).
    Make sure we zero last_value in that case so that the domain
    continues to see clock updates.

    Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
    (cherry picked from commit 29acbb4e1d93e719250648db1ce8c7a24144fd86)


I am using gcc (GCC) 4.1.2 20080704 (Red Hat 4.1.2-48) in CentOS5.

Anyone encountered the below warnings & errors?

-----SNAP-----
arch/x86/kernel/smpboot.c:99: warning: function declaration isn’t a prototype
arch/x86/kernel/smpboot.c:104: warning: function declaration isn’t a prototype
-----SNAP-----
arch/x86/xen/enlighten.c: In function ‘xen_init_cpuid_mask’:
arch/x86/xen/enlighten.c:242: warning: unused variable ‘dx’
arch/x86/xen/enlighten.c:242: warning: unused variable ‘cx’
arch/x86/xen/enlighten.c:242: warning: unused variable ‘bx’
arch/x86/xen/enlighten.c:242: warning: unused variable ‘ax’
  CC      arch/x86/xen/setup.o - due to target missing
  CC      arch/x86/xen/multicalls.o - due to target missing
  CC      arch/x86/xen/mmu.o - due to target missing
arch/x86/xen/mmu.c:163: error: __pcpu_scope_xen_cr3 causes a section
type conflict
arch/x86/xen/mmu.c:164: error: __pcpu_scope_xen_current_cr3 causes a
section type conflict
arch/x86/xen/mmu.c:163: error: __pcpu_unique_xen_cr3 causes a section
type conflict
arch/x86/xen/mmu.c:164: error: __pcpu_unique_xen_current_cr3 causes a
section type conflict
make[2]: *** [arch/x86/xen/mmu.o] Error 1
make[1]: *** [arch/x86/xen] Error 2
make: *** [arch/x86] Error 2
-----SNAP-----

The errors in arch/x86/xen/mmu.c line 163 and 164 are:

/*
 * Note about cr3 (pagetable base) values:
 *
 * xen_cr3 contains the current logical cr3 value; it contains the
 * last set cr3.  This may not be the current effective cr3, because
 * its update may be being lazily deferred.  However, a vcpu looking
 * at its own cr3 can use this value knowing that it everything will
 * be self-consistent.
 *
 * xen_current_cr3 contains the actual vcpu cr3; it is set once the
 * hypercall to set the vcpu cr3 is complete (so it may be a little
 * out of date, but it will never be set early).  If one vcpu is
 * looking at another vcpu's cr3 value, it should use this variable.
 */
DEFINE_PER_CPU(unsigned long, xen_cr3);  /* cr3 stored as physaddr */
DEFINE_PER_CPU(unsigned long, xen_current_cr3);  /* actual vcpu cr3 */

Any idea to rectify?  If my .config is required, I can post it.

Thanks.

Kindest regards,
Giam Teck Choon

^ permalink raw reply	[flat|nested] 10+ messages in thread
* Re: Compile pvops kernel xen/stable-2.6.32.x error
@ 2010-12-14  1:37 Kevin.Buckley
  2010-12-15 20:55 ` Teck Choon Giam
  0 siblings, 1 reply; 10+ messages in thread
From: Kevin.Buckley @ 2010-12-14  1:37 UTC (permalink / raw)
  To: xen-devel

In reference to

 http://lists.xensource.com/archives/html/xen-devel/2010-10/msg01374.html

> arch/x86/xen/mmu.c:163: error: __pcpu_scope_xen_cr3 causes a section
type conflict
> arch/x86/xen/mmu.c:164: error: __pcpu_scope_xen_current_cr3 causes a
section type conflict
> arch/x86/xen/mmu.c:163: error: __pcpu_unique_xen_cr3 causes a section
type conflict
> arch/x86/xen/mmu.c:164: error: __pcpu_unique_xen_current_cr3 causes a
section type conflict

Firstly, I appreciate that the original thread started a couple of
months back but just to say that I recently have seen those messages
and discovered what was causing them in the environment I was compiling
in so, having found the thread, I thought I'd post my findings,
especially as the thread issue doesn't seem to have been concluded.

I first saw the messages when trying to build a kernel which I had
configured, starting from a

 make mrproper; make allmodconfig

on a kernel tree pulled as follows:

git checkout -b xen/stable-2.6.32.x origin/xen/stable-2.6.32.x

as described in:

http://bderzhavets.wordpress.com/2010/04/24/set-up-ubuntu-10-04-server-pv-domu-at-xen-4-0-dom0-pvops-2-6-32-10-kernel-dom0-on-top-of-ubuntu-10-04-server/

and using Ubuntu's GCC 4.4.3 (so a more "recent" one than the OP's 4.1)

I had not seen those messages before re-configuring the kernel and
had, indeed  built a working, in terms of Xen, kernel using that
checked-out source and the instructions above.

I then came to look at something else that didn't appear to work
properly for me and so thought I'd go back and modularise as much
as possible and so try and see what was being accessed hence the

 make allmodconfig

I did however set all the Xen-related config settings to match those
from the working .config file I already had.

I thus assumed that there's some mismatch between compilation in the
default config that one gets after doing the:

 make allmodconfig

and the "default" config to which one merely makes Xen-specific
changes when doing a

 make menuconfig

and went looking.



OK, that's the background, the info I want to pass on is this:

for me, the error messages are effectively toggled if one either
defines (see errors) or does not define (no errors) the kernel
config value:

CONFIG_DEBUG_FORCE_WEAK_PER_CPU

which is an option living in

 lib/Kconfig.debug

however the Kconfig help implies it is possibly related to s390 and
alpha architectures.

That seems to be the only change needed to, and indeed the only change
I have found so far which does, make the build fail in

 arch/x86/xen/mmu.o

in the way the OP describes.


In case there've been any explicit fixes, not posted into this thread,
in the meantime, I would have done the source pull around Nov 23rd.

Hoping this is useful, apologies if not,
Kevin

-- 
Kevin M. Buckley                                  Room:  CO327
School of Engineering and                         Phone: +64 4 463 5971
 Computer Science
Victoria University of Wellington
New Zealand

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2010-12-15 21:24 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-10-27 16:55 Compile pvops kernel xen/stable-2.6.32.x error Teck Choon Giam
2010-10-27 17:24 ` Jeremy Fitzhardinge
2010-10-27 17:43   ` Teck Choon Giam
2010-10-27 17:51     ` Konrad Rzeszutek Wilk
2010-10-27 18:00       ` Teck Choon Giam
2010-10-27 18:12       ` Jeremy Fitzhardinge
  -- strict thread matches above, loose matches on Subject: below --
2010-12-14  1:37 Kevin.Buckley
2010-12-15 20:55 ` Teck Choon Giam
2010-12-15 21:15   ` Kevin.Buckley
2010-12-15 21:24     ` Teck Choon Giam

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.