kvm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* kvm upstream build error..
@ 2011-07-13  2:04 Ren, Yongjie
  2011-07-13  6:22 ` Tian, Kevin
  0 siblings, 1 reply; 5+ messages in thread
From: Ren, Yongjie @ 2011-07-13  2:04 UTC (permalink / raw)
  To: Avi Kivity; +Cc: kvm@vger.kernel.org

Hi Avi,
KVM upstream have a build error in our build system. Do you have some comments on this issue? my kvm commit is 0af9df4e80a3a620c52c3a9777191c54e615d068
build error info:
  LD      arch/x86/boot/setup.elf
  OBJCOPY arch/x86/boot/setup.bin
  BUILD   arch/x86/boot/bzImage
Root device is (8, 1)
Setup is 15672 bytes (padded to 15872 bytes).
System is 2556 kB
CRC c5b53854
Kernel: arch/x86/boot/bzImage is ready  (#1)
ERROR: "delayacct_on" [arch/x86/kvm/kvm.ko] undefined!
make[3]: *** [__modpost] Error 1
make[2]: *** [modules] Error 2
error: Bad exit status from /var/tmp/rpm-tmp.81681 (%build)

Best Regards,
     Yongjie Ren  (Jay)

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

* RE: kvm upstream build error..
  2011-07-13  2:04 kvm upstream build error Ren, Yongjie
@ 2011-07-13  6:22 ` Tian, Kevin
  2011-07-13 13:18   ` Avi Kivity
  0 siblings, 1 reply; 5+ messages in thread
From: Tian, Kevin @ 2011-07-13  6:22 UTC (permalink / raw)
  To: Ren, Yongjie, Avi Kivity; +Cc: kvm@vger.kernel.org, Glauber Costa

it works in my side, due to config difference. It is caused by recent
steal time feature.

int kvm_set_msr_common(struct kvm_vcpu *vcpu, u32 msr, u64 data)
        case MSR_KVM_STEAL_TIME:

                if (unlikely(!sched_info_on()))
                        return 1;

static inline int sched_info_on(void)
{
#ifdef CONFIG_SCHEDSTATS
        return 1;
#elif defined(CONFIG_TASK_DELAY_ACCT)
        extern int delayacct_on;
        return delayacct_on;
#else
        return 0;
#endif
}

I have CONFIG_SCHEDSTATS enabled, while yours has CONFIG_SCHEDSTATS
as 'n' while "CONFIG_TASK_DELAY_ACCT) as 'y'. However delayacct_on is
not an exposed symbol to modules.

Thanks
Kevin

> From: Ren, Yongjie
> Sent: Wednesday, July 13, 2011 10:05 AM
> 
> Hi Avi,
> KVM upstream have a build error in our build system. Do you have some
> comments on this issue? my kvm commit is
> 0af9df4e80a3a620c52c3a9777191c54e615d068
> build error info:
>   LD      arch/x86/boot/setup.elf
>   OBJCOPY arch/x86/boot/setup.bin
>   BUILD   arch/x86/boot/bzImage
> Root device is (8, 1)
> Setup is 15672 bytes (padded to 15872 bytes).
> System is 2556 kB
> CRC c5b53854
> Kernel: arch/x86/boot/bzImage is ready  (#1)
> ERROR: "delayacct_on" [arch/x86/kvm/kvm.ko] undefined!
> make[3]: *** [__modpost] Error 1
> make[2]: *** [modules] Error 2
> error: Bad exit status from /var/tmp/rpm-tmp.81681 (%build)
> 
> Best Regards,
>      Yongjie Ren  (Jay)
> --
> To unsubscribe from this list: send the line "unsubscribe kvm" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: kvm upstream build error..
  2011-07-13  6:22 ` Tian, Kevin
@ 2011-07-13 13:18   ` Avi Kivity
  2011-07-14  7:15     ` [PATCH] sched: export delayacct_on Ren, Yongjie
  0 siblings, 1 reply; 5+ messages in thread
From: Avi Kivity @ 2011-07-13 13:18 UTC (permalink / raw)
  To: Tian, Kevin; +Cc: Ren, Yongjie, kvm@vger.kernel.org, Glauber Costa

On 07/13/2011 09:22 AM, Tian, Kevin wrote:
> it works in my side, due to config difference. It is caused by recent
> steal time feature.
>
> int kvm_set_msr_common(struct kvm_vcpu *vcpu, u32 msr, u64 data)
>          case MSR_KVM_STEAL_TIME:
>
>                  if (unlikely(!sched_info_on()))
>                          return 1;
>
> static inline int sched_info_on(void)
> {
> #ifdef CONFIG_SCHEDSTATS
>          return 1;
> #elif defined(CONFIG_TASK_DELAY_ACCT)
>          extern int delayacct_on;
>          return delayacct_on;
> #else
>          return 0;
> #endif
> }
>
> I have CONFIG_SCHEDSTATS enabled, while yours has CONFIG_SCHEDSTATS
> as 'n' while "CONFIG_TASK_DELAY_ACCT) as 'y'. However delayacct_on is
> not an exposed symbol to modules.
>

I added an export.  Thanks.

-- 
error compiling committee.c: too many arguments to function


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

* [PATCH] sched: export delayacct_on
  2011-07-13 13:18   ` Avi Kivity
@ 2011-07-14  7:15     ` Ren, Yongjie
  2011-07-14  9:55       ` Avi Kivity
  0 siblings, 1 reply; 5+ messages in thread
From: Ren, Yongjie @ 2011-07-14  7:15 UTC (permalink / raw)
  To: Avi Kivity; +Cc: kvm@vger.kernel.org, Glauber Costa, Tian, Kevin

Hi Avi,
Thanks for effort. But I found your patch didn't include <linux/module.h>, so I add it in this patch. This will work in our kvm build system.
Export delayacct_on 
Needed for sched_info_on(), used by KVM.

Signed-off-by: Yongjie Ren <yongjie.ren@intel.com>
---
diff --git a/kernel/delayacct.c b/kernel/delayacct.c
index ead9b61..418b3f7 100644
--- a/kernel/delayacct.c
+++ b/kernel/delayacct.c
@@ -19,8 +19,10 @@
 #include <linux/time.h>
 #include <linux/sysctl.h>
 #include <linux/delayacct.h>
+#include <linux/module.h>

 int delayacct_on __read_mostly = 1;    /* Delay accounting turned on/off */
+EXPORT_SYMBOL_GPL(delayacct_on);
 struct kmem_cache *delayacct_cache;

 static int __init delayacct_setup_disable(char *str)


> -----Original Message-----
> From: Avi Kivity [mailto:avi@redhat.com]
> Sent: Wednesday, July 13, 2011 9:19 PM
> To: Tian, Kevin
> Cc: Ren, Yongjie; kvm@vger.kernel.org; Glauber Costa
> Subject: Re: kvm upstream build error..
> 
> On 07/13/2011 09:22 AM, Tian, Kevin wrote:
> > it works in my side, due to config difference. It is caused by recent
> > steal time feature.
> >
> > int kvm_set_msr_common(struct kvm_vcpu *vcpu, u32 msr, u64 data)
> >          case MSR_KVM_STEAL_TIME:
> >
> >                  if (unlikely(!sched_info_on()))
> >                          return 1;
> >
> > static inline int sched_info_on(void)
> > {
> > #ifdef CONFIG_SCHEDSTATS
> >          return 1;
> > #elif defined(CONFIG_TASK_DELAY_ACCT)
> >          extern int delayacct_on;
> >          return delayacct_on;
> > #else
> >          return 0;
> > #endif
> > }
> >
> > I have CONFIG_SCHEDSTATS enabled, while yours has CONFIG_SCHEDSTATS
> > as 'n' while "CONFIG_TASK_DELAY_ACCT) as 'y'. However delayacct_on is
> > not an exposed symbol to modules.
> >
> 
> I added an export.  Thanks.
> 
> --
> error compiling committee.c: too many arguments to function


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

* Re: [PATCH] sched: export delayacct_on
  2011-07-14  7:15     ` [PATCH] sched: export delayacct_on Ren, Yongjie
@ 2011-07-14  9:55       ` Avi Kivity
  0 siblings, 0 replies; 5+ messages in thread
From: Avi Kivity @ 2011-07-14  9:55 UTC (permalink / raw)
  To: Ren, Yongjie; +Cc: kvm@vger.kernel.org, Glauber Costa, Tian, Kevin

On 07/14/2011 10:15 AM, Ren, Yongjie wrote:
> Hi Avi,
> Thanks for effort. But I found your patch didn't include<linux/module.h>, so I add it in this patch. This will work in our kvm build system.
> Export delayacct_on
> Needed for sched_info_on(), used by KVM.

Thanks, that will teach me to patch without testing.  Applied.

-- 
error compiling committee.c: too many arguments to function


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

end of thread, other threads:[~2011-07-14  9:55 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-07-13  2:04 kvm upstream build error Ren, Yongjie
2011-07-13  6:22 ` Tian, Kevin
2011-07-13 13:18   ` Avi Kivity
2011-07-14  7:15     ` [PATCH] sched: export delayacct_on Ren, Yongjie
2011-07-14  9:55       ` Avi Kivity

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).