Teck Choon Giam
2010-Oct-27 16:55 UTC
[Xen-devel] Compile pvops kernel xen/stable-2.6.32.x error
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 _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Jeremy Fitzhardinge
2010-Oct-27 17:24 UTC
Re: [Xen-devel] Compile pvops kernel xen/stable-2.6.32.x error
On 10/27/2010 09:55 AM, Teck Choon Giam wrote:> 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 2Ah, how unpleasant. Unfortunately the problem isn''t really with the lines its pointing out, but with something earlier in the source (or headers) which is also per-cpu, and gcc has decided there''s a section conflict between the two. Could you do "make arch/x86/mmu.i" and send me the result? Thanks, J> -----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 > > _______________________________________________ > Xen-devel mailing list > Xen-devel@lists.xensource.com > http://lists.xensource.com/xen-devel >_______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Teck Choon Giam
2010-Oct-27 17:43 UTC
Re: [Xen-devel] Compile pvops kernel xen/stable-2.6.32.x error
> Ah, how unpleasant. Unfortunately the problem isn''t really with the > lines its pointing out, but with something earlier in the source (or > headers) which is also per-cpu, and gcc has decided there''s a section > conflict between the two. Could you do "make arch/x86/mmu.i" and send > me the result?I guess you mean "make arch/x86/xen/mmu.i" instead? mock-chroot> make arch/x86/mmu.i make: *** No rule to make target `arch/x86/mmu.i''. Stop. mock-chroot> make arch/x86/xen/mmu. mmu.c mmu.h mock-chroot> make arch/x86/xen/mmu.i CHK include/linux/version.h CHK include/linux/utsrelease.h SYMLINK include/asm -> include/asm-x86 CALL scripts/checksyscalls.sh CPP arch/x86/xen/mmu.i mock-chroot> FYI, I am able to compile if I optimized the kernel configuration such as CPUSET, Power related such as battery, adaptors, laptop related etc. all disabled. The problem config is used from RHEL6 x86_64 kernel (ftp://ftp.redhat.com/pub/redhat/rhel/beta/6Server-beta2/x86_64/os/Packages/kernel-2.6.32-44.2.el6.x86_64.rpm) as base and just make oldconfig etc. to enable XEN related and there I got those errors :/ Thanks. Kindest regards, Giam Teck Choon _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Konrad Rzeszutek Wilk
2010-Oct-27 17:51 UTC
Re: [Xen-devel] Compile pvops kernel xen/stable-2.6.32.x error
On Thu, Oct 28, 2010 at 01:43:27AM +0800, Teck Choon Giam wrote:> > Ah, how unpleasant. Unfortunately the problem isn''t really with the > > lines its pointing out, but with something earlier in the source (or > > headers) which is also per-cpu, and gcc has decided there''s a section > > conflict between the two. Could you do "make arch/x86/mmu.i" and send > > me the result? > > I guess you mean "make arch/x86/xen/mmu.i" instead? > > mock-chroot> make arch/x86/mmu.i > make: *** No rule to make target `arch/x86/mmu.i''. Stop. > mock-chroot> make arch/x86/xen/mmu. > mmu.c mmu.h > mock-chroot> make arch/x86/xen/mmu.i > CHK include/linux/version.h > CHK include/linux/utsrelease.h > SYMLINK include/asm -> include/asm-x86 > CALL scripts/checksyscalls.sh > CPP arch/x86/xen/mmu.i > mock-chroot> > > FYI, I am able to compile if I optimized the kernel configuration such > as CPUSET, Power related such as battery, adaptors, laptop related > etc. all disabled. The problem config is used from RHEL6 x86_64 > kernel (ftp://ftp.redhat.com/pub/redhat/rhel/beta/6Server-beta2/x86_64/os/Packages/kernel-2.6.32-44.2.el6.x86_64.rpm) > as base and just make oldconfig etc. to enable XEN related and there I > got those errors :/This looks like your compiler is ancient. 4.1 is pretty old. Can you upgrade it to a more modern version? _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Teck Choon Giam
2010-Oct-27 18:00 UTC
Re: [Xen-devel] Compile pvops kernel xen/stable-2.6.32.x error
> This looks like your compiler is ancient. 4.1 is pretty old. Can you upgrade > it to a more modern version? >I can but I prefer to use what is provided in stock CentOS5 since after this I will be doing packaging in CentOS5. I can do my testing in RHEL6 instead but still would hope that CentOS5 can be supported with stock gcc from vendor. Thanks. Kindest regards, Giam Teck Choon _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Jeremy Fitzhardinge
2010-Oct-27 18:12 UTC
Re: [Xen-devel] Compile pvops kernel xen/stable-2.6.32.x error
On 10/27/2010 10:51 AM, Konrad Rzeszutek Wilk wrote:> On Thu, Oct 28, 2010 at 01:43:27AM +0800, Teck Choon Giam wrote: >>> Ah, how unpleasant. Unfortunately the problem isn''t really with the >>> lines its pointing out, but with something earlier in the source (or >>> headers) which is also per-cpu, and gcc has decided there''s a section >>> conflict between the two. Could you do "make arch/x86/mmu.i" and send >>> me the result? >> I guess you mean "make arch/x86/xen/mmu.i" instead? >> >> mock-chroot> make arch/x86/mmu.i >> make: *** No rule to make target `arch/x86/mmu.i''. Stop. >> mock-chroot> make arch/x86/xen/mmu. >> mmu.c mmu.h >> mock-chroot> make arch/x86/xen/mmu.i >> CHK include/linux/version.h >> CHK include/linux/utsrelease.h >> SYMLINK include/asm -> include/asm-x86 >> CALL scripts/checksyscalls.sh >> CPP arch/x86/xen/mmu.i >> mock-chroot> >> >> FYI, I am able to compile if I optimized the kernel configuration such >> as CPUSET, Power related such as battery, adaptors, laptop related >> etc. all disabled. The problem config is used from RHEL6 x86_64 >> kernel (ftp://ftp.redhat.com/pub/redhat/rhel/beta/6Server-beta2/x86_64/os/Packages/kernel-2.6.32-44.2.el6.x86_64.rpm) >> as base and just make oldconfig etc. to enable XEN related and there I >> got those errors :/ > This looks like your compiler is ancient. 4.1 is pretty old. Can you upgrade > it to a more modern version?It is old, but not ancient and still supported. And as Teck says, if its the disto standard compiler we definitely need to make sure it works. But the whole section mismatch thing is very annoying because its a behaviour which changes a lot from version to version, and is also very sensitive to config options and even small, semantically neutral code changes. J _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel