public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: "Li,Rongqing" <lirongqing@baidu.com>
To: Like Xu <like.xu.linux@gmail.com>, Paolo Bonzini <pbonzini@redhat.com>
Cc: "llvm@lists.linux.dev" <llvm@lists.linux.dev>,
	"kbuild-all@lists.01.org" <kbuild-all@lists.01.org>,
	"kvm@vger.kernel.org" <kvm@vger.kernel.org>,
	Robert Hu <robert.hu@intel.com>,
	Farrah Chen <farrah.chen@intel.com>,
	"Danmei Wei" <danmei.wei@intel.com>,
	"Wang,Guangju" <wangguangju@baidu.com>,
	"kernel test robot" <lkp@intel.com>
Subject: 答复: [kvm:queue 182/203] arch/x86/kernel/kvm.c:769:4: error: use of undeclared identifier '__raw_callee_save___kvm_vcpu_is_preempted'
Date: Wed, 9 Mar 2022 08:43:14 +0000	[thread overview]
Message-ID: <39cfd287d85e4884b1d5b8df3593abaf@baidu.com> (raw)
In-Reply-To: <c6455ba9-8c34-7f10-ca5a-60f2f01cc9ce@gmail.com>



> -----邮件原件-----
> 发件人: Like Xu <like.xu.linux@gmail.com>
> 发送时间: 2022年3月9日 14:38
> 收件人: Li,Rongqing <lirongqing@baidu.com>; Paolo Bonzini
> <pbonzini@redhat.com>
> 抄送: llvm@lists.linux.dev; kbuild-all@lists.01.org; kvm@vger.kernel.org;
> Robert Hu <robert.hu@intel.com>; Farrah Chen <farrah.chen@intel.com>;
> Danmei Wei <danmei.wei@intel.com>; Wang,Guangju
> <wangguangju@baidu.com>; kernel test robot <lkp@intel.com>
> 主题: Re: [kvm:queue 182/203] arch/x86/kernel/kvm.c:769:4: error: use of
> undeclared identifier '__raw_callee_save___kvm_vcpu_is_preempted'
> 
> On 9/3/2022 6:18 am, kernel test robot wrote:
> > tree:   https://git.kernel.org/pub/scm/virt/kvm/kvm.git queue
> > head:   00a2bd3464280ca1f08e2cbfab22b884ffb731d8
> > commit: dc889a8974087aba3eb1cc6db2066fbbdb58922a [182/203] KVM:
> x86:
> > Support the vCPU preemption check with nopvspin and realtime hint
> > config: x86_64-randconfig-a001
> > (https://download.01.org/0day-ci/archive/20220309/202203090613.qYNxBFk
> > Z-lkp@intel.com/config)
> > compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project
> > 0dc66b76fe4c33843755ade391b85ffda0742aeb)
> > reproduce (this is a W=1 build):
> >          wget
> https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O
> ~/bin/make.cross
> >          chmod +x ~/bin/make.cross
> >          #
> https://git.kernel.org/pub/scm/virt/kvm/kvm.git/commit/?id=dc889a8974087a
> ba3eb1cc6db2066fbbdb58922a
> >          git remote add kvm
> https://git.kernel.org/pub/scm/virt/kvm/kvm.git
> >          git fetch --no-tags kvm queue
> >          git checkout dc889a8974087aba3eb1cc6db2066fbbdb58922a
> >          # save the config file to linux build tree
> >          mkdir build_dir
> >          COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang
> make.cross
> > W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash
> >
> > If you fix the issue, kindly add following tag as appropriate
> > Reported-by: kernel test robot <lkp@intel.com>
> >
> > All errors (new ones prefixed by >>):
> >
> >>> arch/x86/kernel/kvm.c:769:4: error: use of undeclared identifier
> '__raw_callee_save___kvm_vcpu_is_preempted'
> >
> PV_CALLEE_SAVE(__kvm_vcpu_is_preempted);
> >                             ^
> >     arch/x86/include/asm/paravirt.h:683:35: note: expanded from macro
> 'PV_CALLEE_SAVE'
> >             ((struct paravirt_callee_save) { __raw_callee_save_##func })
> >                                              ^
> >     <scratch space>:52:1: note: expanded from here
> >     __raw_callee_save___kvm_vcpu_is_preempted
> >     ^
> >     1 error generated.
> 



Sorry, it introduced by my patch, we should move this function out of CONFIG_PARAVIRT_SPINLOCK

I will send a new patch

Thanks

-Li

> How about this fix:
> 
> diff --git a/arch/x86/include/asm/paravirt.h b/arch/x86/include/asm/paravirt.h
> index 0d76502cc6f5..d656e4117e01 100644
> --- a/arch/x86/include/asm/paravirt.h
> +++ b/arch/x86/include/asm/paravirt.h
> @@ -617,6 +617,7 @@ static __always_inline bool pv_vcpu_is_preempted(long
> cpu)
> 
>   void __raw_callee_save___native_queued_spin_unlock(struct qspinlock
> *lock);
>   bool __raw_callee_save___native_vcpu_is_preempted(long cpu);
> +bool __raw_callee_save___kvm_vcpu_is_preempted(long cpu);
> 
>   #endif /* SMP && PARAVIRT_SPINLOCKS */
> 
> >
> >
> > vim +/__raw_callee_save___kvm_vcpu_is_preempted +769
> > arch/x86/kernel/kvm.c
> >
> >     754
> >     755	static void __init kvm_guest_init(void)
> >     756	{
> >     757		int i;
> >     758
> >     759		paravirt_ops_setup();
> >     760		register_reboot_notifier(&kvm_pv_reboot_nb);
> >     761		for (i = 0; i < KVM_TASK_SLEEP_HASHSIZE; i++)
> >     762			raw_spin_lock_init(&async_pf_sleepers[i].lock);
> >     763
> >     764		if (kvm_para_has_feature(KVM_FEATURE_STEAL_TIME)) {
> >     765			has_steal_clock = 1;
> >     766			static_call_update(pv_steal_clock, kvm_steal_clock);
> >     767
> >     768			pv_ops.lock.vcpu_is_preempted =
> >   > 769				PV_CALLEE_SAVE(__kvm_vcpu_is_preempted);
> >     770		}
> >     771
> >     772		if (kvm_para_has_feature(KVM_FEATURE_PV_EOI))
> >     773			apic_set_eoi_write(kvm_guest_apic_eoi_write);
> >     774
> >     775		if (kvm_para_has_feature(KVM_FEATURE_ASYNC_PF_INT)
> && kvmapf) {
> >     776			static_branch_enable(&kvm_async_pf_enabled);
> >     777			alloc_intr_gate(HYPERVISOR_CALLBACK_VECTOR,
> asm_sysvec_kvm_asyncpf_interrupt);
> >     778		}
> >     779
> >
> > ---
> > 0-DAY CI Kernel Test Service, Intel Corporation
> > https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
> >

      reply	other threads:[~2022-03-09  8:43 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-08 22:18 [kvm:queue 182/203] arch/x86/kernel/kvm.c:769:4: error: use of undeclared identifier '__raw_callee_save___kvm_vcpu_is_preempted' kernel test robot
2022-03-09  6:38 ` Like Xu
2022-03-09  8:43   ` Li,Rongqing [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=39cfd287d85e4884b1d5b8df3593abaf@baidu.com \
    --to=lirongqing@baidu.com \
    --cc=danmei.wei@intel.com \
    --cc=farrah.chen@intel.com \
    --cc=kbuild-all@lists.01.org \
    --cc=kvm@vger.kernel.org \
    --cc=like.xu.linux@gmail.com \
    --cc=lkp@intel.com \
    --cc=llvm@lists.linux.dev \
    --cc=pbonzini@redhat.com \
    --cc=robert.hu@intel.com \
    --cc=wangguangju@baidu.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox