* [openeuler:OLK-6.6 3081/3081] arch/x86/kvm/svm/nested.c:485:6: error: call to undeclared function 'to_hv_vcpu'; ISO C99 and later do not support implicit function declarations
@ 2025-11-01 3:21 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2025-11-01 3:21 UTC (permalink / raw)
To: kernel; +Cc: oe-kbuild-all
tree: https://gitee.com/openeuler/kernel.git OLK-6.6
head: 6a5b2f9a14178b13fe5efc52ba6575f5294c1270
commit: 2a3cfce9a18a4b772f01830cbc95fe00125431d8 [3081/3081] KVM: x86: Make Hyper-V emulation optional
config: x86_64-randconfig-013-20251101 (https://download.01.org/0day-ci/archive/20251101/202511011104.PcEVHImG-lkp@intel.com/config)
compiler: clang version 20.1.8 (https://github.com/llvm/llvm-project 87f0227cb60147a26a1eeb4fb06e3b505e9c7261)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20251101/202511011104.PcEVHImG-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/202511011104.PcEVHImG-lkp@intel.com/
All errors (new ones prefixed by >>):
>> arch/x86/kvm/svm/nested.c:485:6: error: call to undeclared function 'to_hv_vcpu'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
485 | if (to_hv_vcpu(vcpu) && npt_enabled)
| ^
1 error generated.
--
>> arch/x86/kvm/x86.c:12528:8: error: call to undeclared function 'to_kvm_hv'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
12528 | kfree(to_kvm_hv(kvm)->hv_pa_pg);
| ^
>> arch/x86/kvm/x86.c:12528:24: error: member reference type 'int' is not a pointer
12528 | kfree(to_kvm_hv(kvm)->hv_pa_pg);
| ~~~~~~~~~~~~~~ ^
2 errors generated.
--
In file included from arch/x86/kvm/kvm-asm-offsets.c:10:
>> arch/x86/kvm/vmx/vmx.h:757:20: error: no member named 'hyperv_enabled' in 'struct kvm_vcpu_arch'
757 | return vcpu->arch.hyperv_enabled &&
| ~~~~~~~~~~ ^
1 error generated.
--
>> arch/x86/kvm/lapic.c:1479:6: error: call to undeclared function 'to_hv_vcpu'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
1479 | if (to_hv_vcpu(apic->vcpu) &&
| ^
>> arch/x86/kvm/lapic.c:1480:23: error: call to undeclared function 'to_hv_synic'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
1480 | test_bit(vector, to_hv_synic(apic->vcpu)->vec_bitmap))
| ^
>> arch/x86/kvm/lapic.c:1480:48: error: member reference type 'int' is not a pointer
1480 | test_bit(vector, to_hv_synic(apic->vcpu)->vec_bitmap))
| ~~~~~~~~~~~~~~~~~~~~~~~ ^
include/linux/bitops.h:61:50: note: expanded from macro 'test_bit'
61 | #define test_bit(nr, addr) bitop(_test_bit, nr, addr)
| ^~~~
include/linux/bitops.h:50:37: note: expanded from macro 'bitop'
50 | __builtin_constant_p((uintptr_t)(addr) != (uintptr_t)NULL) && \
| ^~~~
>> arch/x86/kvm/lapic.c:1480:48: error: member reference type 'int' is not a pointer
1480 | test_bit(vector, to_hv_synic(apic->vcpu)->vec_bitmap))
| ~~~~~~~~~~~~~~~~~~~~~~~ ^
include/linux/bitops.h:61:50: note: expanded from macro 'test_bit'
61 | #define test_bit(nr, addr) bitop(_test_bit, nr, addr)
| ^~~~
include/linux/bitops.h:51:16: note: expanded from macro 'bitop'
51 | (uintptr_t)(addr) != (uintptr_t)NULL && \
| ^~~~
>> arch/x86/kvm/lapic.c:1480:48: error: member reference type 'int' is not a pointer
1480 | test_bit(vector, to_hv_synic(apic->vcpu)->vec_bitmap))
| ~~~~~~~~~~~~~~~~~~~~~~~ ^
include/linux/bitops.h:61:50: note: expanded from macro 'test_bit'
61 | #define test_bit(nr, addr) bitop(_test_bit, nr, addr)
| ^~~~
include/linux/bitops.h:52:50: note: expanded from macro 'bitop'
52 | __builtin_constant_p(*(const unsigned long *)(addr))) ? \
| ^~~~
>> arch/x86/kvm/lapic.c:1480:48: error: member reference type 'int' is not a pointer
1480 | test_bit(vector, to_hv_synic(apic->vcpu)->vec_bitmap))
| ~~~~~~~~~~~~~~~~~~~~~~~ ^
include/linux/bitops.h:61:50: note: expanded from macro 'test_bit'
61 | #define test_bit(nr, addr) bitop(_test_bit, nr, addr)
| ^~~~
include/linux/bitops.h:53:17: note: expanded from macro 'bitop'
53 | const##op(nr, addr) : op(nr, addr))
| ^~~~
>> arch/x86/kvm/lapic.c:1480:48: error: member reference type 'int' is not a pointer
1480 | test_bit(vector, to_hv_synic(apic->vcpu)->vec_bitmap))
| ~~~~~~~~~~~~~~~~~~~~~~~ ^
include/linux/bitops.h:61:50: note: expanded from macro 'test_bit'
61 | #define test_bit(nr, addr) bitop(_test_bit, nr, addr)
| ^~~~
include/linux/bitops.h:53:32: note: expanded from macro 'bitop'
53 | const##op(nr, addr) : op(nr, addr))
| ^~~~
arch/x86/kvm/lapic.c:2954:6: error: call to undeclared function 'to_hv_vcpu'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
2954 | if (to_hv_vcpu(vcpu) && test_bit(vector, to_hv_synic(vcpu)->auto_eoi_bitmap)) {
| ^
arch/x86/kvm/lapic.c:2954:43: error: call to undeclared function 'to_hv_synic'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
2954 | if (to_hv_vcpu(vcpu) && test_bit(vector, to_hv_synic(vcpu)->auto_eoi_bitmap)) {
| ^
arch/x86/kvm/lapic.c:2954:62: error: member reference type 'int' is not a pointer
2954 | if (to_hv_vcpu(vcpu) && test_bit(vector, to_hv_synic(vcpu)->auto_eoi_bitmap)) {
| ~~~~~~~~~~~~~~~~~ ^
include/linux/bitops.h:61:50: note: expanded from macro 'test_bit'
61 | #define test_bit(nr, addr) bitop(_test_bit, nr, addr)
| ^~~~
include/linux/bitops.h:50:37: note: expanded from macro 'bitop'
50 | __builtin_constant_p((uintptr_t)(addr) != (uintptr_t)NULL) && \
| ^~~~
arch/x86/kvm/lapic.c:2954:62: error: member reference type 'int' is not a pointer
2954 | if (to_hv_vcpu(vcpu) && test_bit(vector, to_hv_synic(vcpu)->auto_eoi_bitmap)) {
| ~~~~~~~~~~~~~~~~~ ^
include/linux/bitops.h:61:50: note: expanded from macro 'test_bit'
61 | #define test_bit(nr, addr) bitop(_test_bit, nr, addr)
| ^~~~
include/linux/bitops.h:51:16: note: expanded from macro 'bitop'
51 | (uintptr_t)(addr) != (uintptr_t)NULL && \
| ^~~~
arch/x86/kvm/lapic.c:2954:62: error: member reference type 'int' is not a pointer
2954 | if (to_hv_vcpu(vcpu) && test_bit(vector, to_hv_synic(vcpu)->auto_eoi_bitmap)) {
| ~~~~~~~~~~~~~~~~~ ^
include/linux/bitops.h:61:50: note: expanded from macro 'test_bit'
61 | #define test_bit(nr, addr) bitop(_test_bit, nr, addr)
| ^~~~
include/linux/bitops.h:52:50: note: expanded from macro 'bitop'
52 | __builtin_constant_p(*(const unsigned long *)(addr))) ? \
| ^~~~
arch/x86/kvm/lapic.c:2954:62: error: member reference type 'int' is not a pointer
2954 | if (to_hv_vcpu(vcpu) && test_bit(vector, to_hv_synic(vcpu)->auto_eoi_bitmap)) {
| ~~~~~~~~~~~~~~~~~ ^
include/linux/bitops.h:61:50: note: expanded from macro 'test_bit'
61 | #define test_bit(nr, addr) bitop(_test_bit, nr, addr)
| ^~~~
include/linux/bitops.h:53:17: note: expanded from macro 'bitop'
53 | const##op(nr, addr) : op(nr, addr))
| ^~~~
arch/x86/kvm/lapic.c:2954:62: error: member reference type 'int' is not a pointer
2954 | if (to_hv_vcpu(vcpu) && test_bit(vector, to_hv_synic(vcpu)->auto_eoi_bitmap)) {
| ~~~~~~~~~~~~~~~~~ ^
include/linux/bitops.h:61:50: note: expanded from macro 'test_bit'
61 | #define test_bit(nr, addr) bitop(_test_bit, nr, addr)
| ^~~~
include/linux/bitops.h:53:32: note: expanded from macro 'bitop'
53 | const##op(nr, addr) : op(nr, addr))
| ^~~~
14 errors generated.
Kconfig warnings: (for reference only)
WARNING: unmet direct dependencies detected for PTP_1588_CLOCK
Depends on [n]: NET [=y] && POSIX_TIMERS [=n]
Selected by [m]:
- SXE [=m] && NETDEVICES [=y] && ETHERNET [=y] && NET_VENDOR_LINKDATA [=y] && (X86 [=y] || ARM64) && PCI [=y]
- SXE_VF [=m] && NETDEVICES [=y] && ETHERNET [=y] && NET_VENDOR_LINKDATA [=y] && (X86 [=y] || ARM64) && PCI [=y]
vim +/to_hv_vcpu +485 arch/x86/kvm/svm/nested.c
36e2e98363e6c1 Paolo Bonzini 2020-05-22 476
d2e5601907bd29 Sean Christopherson 2021-06-09 477 static void nested_svm_transition_tlb_flush(struct kvm_vcpu *vcpu)
d2e5601907bd29 Sean Christopherson 2021-06-09 478 {
3f4a812edf5cb0 Vitaly Kuznetsov 2022-11-01 479 /*
3f4a812edf5cb0 Vitaly Kuznetsov 2022-11-01 480 * KVM_REQ_HV_TLB_FLUSH flushes entries from either L1's VP_ID or
3f4a812edf5cb0 Vitaly Kuznetsov 2022-11-01 481 * L2's VP_ID upon request from the guest. Make sure we check for
3f4a812edf5cb0 Vitaly Kuznetsov 2022-11-01 482 * pending entries in the right FIFO upon L1/L2 transition as these
3f4a812edf5cb0 Vitaly Kuznetsov 2022-11-01 483 * requests are put by other vCPUs asynchronously.
3f4a812edf5cb0 Vitaly Kuznetsov 2022-11-01 484 */
3f4a812edf5cb0 Vitaly Kuznetsov 2022-11-01 @485 if (to_hv_vcpu(vcpu) && npt_enabled)
3f4a812edf5cb0 Vitaly Kuznetsov 2022-11-01 486 kvm_make_request(KVM_REQ_HV_TLB_FLUSH, vcpu);
3f4a812edf5cb0 Vitaly Kuznetsov 2022-11-01 487
d2e5601907bd29 Sean Christopherson 2021-06-09 488 /*
d2e5601907bd29 Sean Christopherson 2021-06-09 489 * TODO: optimize unconditional TLB flush/MMU sync. A partial list of
d2e5601907bd29 Sean Christopherson 2021-06-09 490 * things to fix before this can be conditional:
d2e5601907bd29 Sean Christopherson 2021-06-09 491 *
d2e5601907bd29 Sean Christopherson 2021-06-09 492 * - Flush TLBs for both L1 and L2 remote TLB flush
d2e5601907bd29 Sean Christopherson 2021-06-09 493 * - Honor L1's request to flush an ASID on nested VMRUN
d2e5601907bd29 Sean Christopherson 2021-06-09 494 * - Sync nested NPT MMU on VMRUN that flushes L2's ASID[*]
d2e5601907bd29 Sean Christopherson 2021-06-09 495 * - Don't crush a pending TLB flush in vmcb02 on nested VMRUN
d2e5601907bd29 Sean Christopherson 2021-06-09 496 * - Flush L1's ASID on KVM_REQ_TLB_FLUSH_GUEST
d2e5601907bd29 Sean Christopherson 2021-06-09 497 *
d2e5601907bd29 Sean Christopherson 2021-06-09 498 * [*] Unlike nested EPT, SVM's ASID management can invalidate nested
d2e5601907bd29 Sean Christopherson 2021-06-09 499 * NPT guest-physical mappings on VMRUN.
d2e5601907bd29 Sean Christopherson 2021-06-09 500 */
d2e5601907bd29 Sean Christopherson 2021-06-09 501 kvm_make_request(KVM_REQ_MMU_SYNC, vcpu);
d2e5601907bd29 Sean Christopherson 2021-06-09 502 kvm_make_request(KVM_REQ_TLB_FLUSH_CURRENT, vcpu);
d2e5601907bd29 Sean Christopherson 2021-06-09 503 }
d2e5601907bd29 Sean Christopherson 2021-06-09 504
:::::: The code at line 485 was first introduced by commit
:::::: 3f4a812edf5cb0a50e65fbdfafdb3e688da18f16 KVM: nSVM: hyper-v: Enable L2 TLB flush
:::::: TO: Vitaly Kuznetsov <vkuznets@redhat.com>
:::::: CC: Paolo Bonzini <pbonzini@redhat.com>
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2025-11-01 3:22 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-11-01 3:21 [openeuler:OLK-6.6 3081/3081] arch/x86/kvm/svm/nested.c:485:6: error: call to undeclared function 'to_hv_vcpu'; ISO C99 and later do not support implicit function declarations kernel test robot
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.