From: kernel test robot <lkp@intel.com>
To: Sean Christopherson <seanjc@google.com>
Cc: oe-kbuild-all@lists.linux.dev
Subject: [sean-jc:x86/kill_should_kick_with_force 6/7] arch/arm64/kvm/../../../virt/kvm/kvm_main.c:3872:79: error: 'wait' undeclared; did you mean 'wfit'?
Date: Thu, 15 Oct 2026 04:43:08 +0800 [thread overview]
Message-ID: <202610150447.eKBjX4vx-lkp@intel.com> (raw)
tree: https://github.com/sean-jc/linux x86/kill_should_kick_with_force
head: 01d71338eb030f22b384bb16b117a6429b0ed13a
commit: b5478e7ec85c764e4e846b20f8aafc5b0af2502f [6/7] KVM: Plumb the full request into __kvm_vcpu_kick()
config: arm64-randconfig-1002-20261014 (https://download.01.org/0day-ci/archive/20261015/202610150447.eKBjX4vx-lkp@intel.com/config)
compiler: aarch64-linux-gcc (GCC) 16.1.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20261015/202610150447.eKBjX4vx-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202610150447.eKBjX4vx-lkp@intel.com/
All errors (new ones prefixed by >>):
arch/arm64/kvm/../../../virt/kvm/kvm_main.c: In function '__kvm_vcpu_kick':
>> arch/arm64/kvm/../../../virt/kvm/kvm_main.c:3872:79: error: 'wait' undeclared (first use in this function); did you mean 'wfit'?
3872 | smp_call_function_single(cpu, ack_kick, NULL, wait);
| ^~~~
| wfit
arch/arm64/kvm/../../../virt/kvm/kvm_main.c:3872:79: note: each undeclared identifier is reported only once for each function it appears in
vim +3872 arch/arm64/kvm/../../../virt/kvm/kvm_main.c
dd1a4cc1fbdf516 Radim Krčmář 2016-05-04 3824
0266c894b51c41d Paolo Bonzini 2017-05-04 3825 #ifndef CONFIG_S390
dd1a4cc1fbdf516 Radim Krčmář 2016-05-04 3826 /*
dd1a4cc1fbdf516 Radim Krčmář 2016-05-04 3827 * Kick a sleeping VCPU, or a guest VCPU in guest mode, into host kernel mode.
dd1a4cc1fbdf516 Radim Krčmář 2016-05-04 3828 */
b5478e7ec85c764 Sean Christopherson 2026-10-13 3829 void __kvm_vcpu_kick(struct kvm_vcpu *vcpu, int req, bool force)
dd1a4cc1fbdf516 Radim Krčmář 2016-05-04 3830 {
85b640450ddcfa0 Sean Christopherson 2021-08-27 3831 int me, cpu;
dd1a4cc1fbdf516 Radim Krčmář 2016-05-04 3832
178f02ffafafc59 Radim Krčmář 2017-04-26 3833 if (kvm_vcpu_wake_up(vcpu))
178f02ffafafc59 Radim Krčmář 2017-04-26 3834 return;
178f02ffafafc59 Radim Krčmář 2017-04-26 3835
aefdc2ed445eb47 Paolo Bonzini 2021-10-20 3836 me = get_cpu();
aefdc2ed445eb47 Paolo Bonzini 2021-10-20 3837 /*
aefdc2ed445eb47 Paolo Bonzini 2021-10-20 3838 * The only state change done outside the vcpu mutex is IN_GUEST_MODE
aefdc2ed445eb47 Paolo Bonzini 2021-10-20 3839 * to EXITING_GUEST_MODE. Therefore the moderately expensive "should
aefdc2ed445eb47 Paolo Bonzini 2021-10-20 3840 * kick" check does not need atomic operations if kvm_vcpu_kick is used
aefdc2ed445eb47 Paolo Bonzini 2021-10-20 3841 * within the vCPU thread itself.
aefdc2ed445eb47 Paolo Bonzini 2021-10-20 3842 */
aefdc2ed445eb47 Paolo Bonzini 2021-10-20 3843 if (vcpu == __this_cpu_read(kvm_running_vcpu)) {
aefdc2ed445eb47 Paolo Bonzini 2021-10-20 3844 if (vcpu->mode == IN_GUEST_MODE)
aefdc2ed445eb47 Paolo Bonzini 2021-10-20 3845 WRITE_ONCE(vcpu->mode, EXITING_GUEST_MODE);
aefdc2ed445eb47 Paolo Bonzini 2021-10-20 3846 goto out;
aefdc2ed445eb47 Paolo Bonzini 2021-10-20 3847 }
aefdc2ed445eb47 Paolo Bonzini 2021-10-20 3848
85b640450ddcfa0 Sean Christopherson 2021-08-27 3849 /*
85b640450ddcfa0 Sean Christopherson 2021-08-27 3850 * Note, the vCPU could get migrated to a different pCPU at any point
82c1e532e026a23 Sean Christopherson 2026-10-13 3851 * after kvm_vcpu_should_kick(), which could result in sending an
85b640450ddcfa0 Sean Christopherson 2021-08-27 3852 * IPI to the previous pCPU. But, that's ok because the purpose of the
85b640450ddcfa0 Sean Christopherson 2021-08-27 3853 * IPI is to force the vCPU to leave IN_GUEST_MODE, and migrating the
cc49503cc46665c Sean Christopherson 2026-10-13 3854 * vCPU also requires it to leave IN_GUEST_MODE
cc49503cc46665c Sean Christopherson 2026-10-13 3855 *
cc49503cc46665c Sean Christopherson 2026-10-13 3856 * Note #2, do NOT check if an IPI is needed if @force is true, as the
cc49503cc46665c Sean Christopherson 2026-10-13 3857 * check also modifies vcpu->mode and KVM PPC needs to avoid that side
cc49503cc46665c Sean Christopherson 2026-10-13 3858 * effect for unknown historical reasons.
85b640450ddcfa0 Sean Christopherson 2021-08-27 3859 */
82c1e532e026a23 Sean Christopherson 2026-10-13 3860 if (force || kvm_vcpu_should_kick(vcpu)) {
85b640450ddcfa0 Sean Christopherson 2021-08-27 3861 cpu = READ_ONCE(vcpu->cpu);
309d28576f0a239 Tom Lendacky 2025-03-27 3862 if (cpu != me && (unsigned int)cpu < nr_cpu_ids && cpu_online(cpu)) {
309d28576f0a239 Tom Lendacky 2025-03-27 3863 /*
b5478e7ec85c764 Sean Christopherson 2026-10-13 3864 * Use a reschedule IPI to kick the vCPU if the request
b5478e7ec85c764 Sean Christopherson 2026-10-13 3865 * doesn't need to wait for a response (or there is no
b5478e7ec85c764 Sean Christopherson 2026-10-13 3866 * request), as KVM allows kicking vCPUs while IRQs are
b5478e7ec85c764 Sean Christopherson 2026-10-13 3867 * disabled, but using the SMP function call framework
b5478e7ec85c764 Sean Christopherson 2026-10-13 3868 * with IRQs disabled can deadlock due to taking cross-
b5478e7ec85c764 Sean Christopherson 2026-10-13 3869 * CPU locks.
309d28576f0a239 Tom Lendacky 2025-03-27 3870 */
b5478e7ec85c764 Sean Christopherson 2026-10-13 3871 if (req & KVM_REQUEST_WAIT)
309d28576f0a239 Tom Lendacky 2025-03-27 @3872 smp_call_function_single(cpu, ack_kick, NULL, wait);
309d28576f0a239 Tom Lendacky 2025-03-27 3873 else
b6d33834bd4e8bd Christoffer Dall 2012-03-08 3874 smp_send_reschedule(cpu);
85b640450ddcfa0 Sean Christopherson 2021-08-27 3875 }
309d28576f0a239 Tom Lendacky 2025-03-27 3876 }
aefdc2ed445eb47 Paolo Bonzini 2021-10-20 3877 out:
b6d33834bd4e8bd Christoffer Dall 2012-03-08 3878 put_cpu();
b6d33834bd4e8bd Christoffer Dall 2012-03-08 3879 }
20c48920583675e Sean Christopherson 2025-09-18 3880 EXPORT_SYMBOL_FOR_KVM_INTERNAL(__kvm_vcpu_kick);
0266c894b51c41d Paolo Bonzini 2017-05-04 3881 #endif /* !CONFIG_S390 */
b6d33834bd4e8bd Christoffer Dall 2012-03-08 3882
:::::: The code at line 3872 was first introduced by commit
:::::: 309d28576f0a23931a36bf67324868448f79a77e KVM: SVM: Fix SNP AP destroy race with VMRUN
:::::: TO: Tom Lendacky <thomas.lendacky@amd.com>
:::::: CC: Sean Christopherson <seanjc@google.com>
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
reply other threads:[~2026-10-14 20:43 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=202610150447.eKBjX4vx-lkp@intel.com \
--to=lkp@intel.com \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=seanjc@google.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 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.