linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* include/kvm_util_base.h:247:35: warning: 'struct kvm_nested_state' declared inside parameter list will not be visible outside of this definition or declaration
@ 2022-07-19  8:16 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2022-07-19  8:16 UTC (permalink / raw)
  To: Michael Roth; +Cc: kbuild-all, linux-kernel, Paolo Bonzini

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   ca85855bdcae8f84f1512e88b4c75009ea17ea2f
commit: 7d9a662ed9f0403e7b94940dceb81552b8edb931 kvm: selftests: move base kvm_util.h declarations to kvm_util_base.h
date:   6 months ago
reproduce: make O=/tmp/kselftest -C tools/testing/selftests

If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <lkp@intel.com>

All warnings (new ones prefixed by >>):

   In file included from include/kvm_util.h:10,
                    from lib/elf.c:13:
>> include/kvm_util_base.h:247:35: warning: 'struct kvm_nested_state' declared inside parameter list will not be visible outside of this definition or declaration
     247 |                            struct kvm_nested_state *state);
         |                                   ^~~~~~~~~~~~~~~~
   include/kvm_util_base.h:249:34: warning: 'struct kvm_nested_state' declared inside parameter list will not be visible outside of this definition or declaration
     249 |                           struct kvm_nested_state *state, bool ignore_error);
         |                                  ^~~~~~~~~~~~~~~~
--
   In file included from include/kvm_util.h:10,
                    from lib/kvm_util.c:10:
>> include/kvm_util_base.h:247:35: warning: 'struct kvm_nested_state' declared inside parameter list will not be visible outside of this definition or declaration
     247 |                            struct kvm_nested_state *state);
         |                                   ^~~~~~~~~~~~~~~~
   include/kvm_util_base.h:249:34: warning: 'struct kvm_nested_state' declared inside parameter list will not be visible outside of this definition or declaration
     249 |                           struct kvm_nested_state *state, bool ignore_error);
         |                                  ^~~~~~~~~~~~~~~~
   lib/kvm_util.c: In function 'vm_enable_dirty_ring':
   lib/kvm_util.c:143:19: error: 'KVM_CAP_DIRTY_LOG_RING' undeclared (first use in this function); did you mean 'KVM_CAP_IRQ_ROUTING'?
     143 |         cap.cap = KVM_CAP_DIRTY_LOG_RING;
         |                   ^~~~~~~~~~~~~~~~~~~~~~
         |                   KVM_CAP_IRQ_ROUTING
   lib/kvm_util.c:143:19: note: each undeclared identifier is reported only once for each function it appears in
   lib/kvm_util.c: In function 'kvm_vm_clear_dirty_log':
   lib/kvm_util.c:468:16: error: variable 'args' has initializer but incomplete type
     468 |         struct kvm_clear_dirty_log args = { .dirty_bitmap = log, .slot = slot,
         |                ^~~~~~~~~~~~~~~~~~~
   lib/kvm_util.c:468:46: error: 'struct kvm_clear_dirty_log' has no member named 'dirty_bitmap'
     468 |         struct kvm_clear_dirty_log args = { .dirty_bitmap = log, .slot = slot,
         |                                              ^~~~~~~~~~~~
   lib/kvm_util.c:468:61: warning: excess elements in struct initializer
     468 |         struct kvm_clear_dirty_log args = { .dirty_bitmap = log, .slot = slot,
         |                                                             ^~~
   lib/kvm_util.c:468:61: note: (near initialization for 'args')
   lib/kvm_util.c:468:67: error: 'struct kvm_clear_dirty_log' has no member named 'slot'
     468 |         struct kvm_clear_dirty_log args = { .dirty_bitmap = log, .slot = slot,
         |                                                                   ^~~~
   lib/kvm_util.c:468:74: warning: excess elements in struct initializer
     468 |         struct kvm_clear_dirty_log args = { .dirty_bitmap = log, .slot = slot,
         |                                                                          ^~~~
   lib/kvm_util.c:468:74: note: (near initialization for 'args')
   lib/kvm_util.c:469:46: error: 'struct kvm_clear_dirty_log' has no member named 'first_page'
     469 |                                             .first_page = first_page,
         |                                              ^~~~~~~~~~
   lib/kvm_util.c:469:59: warning: excess elements in struct initializer
     469 |                                             .first_page = first_page,
         |                                                           ^~~~~~~~~~
   lib/kvm_util.c:469:59: note: (near initialization for 'args')
   lib/kvm_util.c:470:46: error: 'struct kvm_clear_dirty_log' has no member named 'num_pages'
     470 |                                             .num_pages = num_pages };
         |                                              ^~~~~~~~~
   lib/kvm_util.c:470:58: warning: excess elements in struct initializer
     470 |                                             .num_pages = num_pages };
         |                                                          ^~~~~~~~~
   lib/kvm_util.c:470:58: note: (near initialization for 'args')
   lib/kvm_util.c:468:36: error: storage size of 'args' isn't known
     468 |         struct kvm_clear_dirty_log args = { .dirty_bitmap = log, .slot = slot,
         |                                    ^~~~
   lib/kvm_util.c:473:29: error: 'KVM_CLEAR_DIRTY_LOG' undeclared (first use in this function); did you mean 'KVM_GET_DIRTY_LOG'?
     473 |         ret = ioctl(vm->fd, KVM_CLEAR_DIRTY_LOG, &args);
         |                             ^~~~~~~~~~~~~~~~~~~
         |                             KVM_GET_DIRTY_LOG
   lib/kvm_util.c:468:36: warning: unused variable 'args' [-Wunused-variable]
     468 |         struct kvm_clear_dirty_log args = { .dirty_bitmap = log, .slot = slot,
         |                                    ^~~~
   lib/kvm_util.c: In function 'kvm_vm_reset_dirty_ring':
   lib/kvm_util.c:480:30: error: 'KVM_RESET_DIRTY_RINGS' undeclared (first use in this function); did you mean 'KVM_GET_DIRTY_LOG'?
     480 |         return ioctl(vm->fd, KVM_RESET_DIRTY_RINGS);
         |                              ^~~~~~~~~~~~~~~~~~~~~
         |                              KVM_GET_DIRTY_LOG
   lib/kvm_util.c: At top level:
   lib/kvm_util.c:1748:35: warning: 'struct kvm_nested_state' declared inside parameter list will not be visible outside of this definition or declaration
    1748 |                            struct kvm_nested_state *state)
         |                                   ^~~~~~~~~~~~~~~~
   lib/kvm_util.c:1747:6: error: conflicting types for 'vcpu_nested_state_get'; have 'void(struct kvm_vm *, uint32_t,  struct kvm_nested_state *)' {aka 'void(struct kvm_vm *, unsigned int,  struct kvm_nested_state *)'}
    1747 | void vcpu_nested_state_get(struct kvm_vm *vm, uint32_t vcpuid,
         |      ^~~~~~~~~~~~~~~~~~~~~
   In file included from include/kvm_util.h:10,
                    from lib/kvm_util.c:10:
   include/kvm_util_base.h:246:6: note: previous declaration of 'vcpu_nested_state_get' with type 'void(struct kvm_vm *, uint32_t,  struct kvm_nested_state *)' {aka 'void(struct kvm_vm *, unsigned int,  struct kvm_nested_state *)'}
     246 | void vcpu_nested_state_get(struct kvm_vm *vm, uint32_t vcpuid,
         |      ^~~~~~~~~~~~~~~~~~~~~
   lib/kvm_util.c: In function 'vcpu_nested_state_get':
   lib/kvm_util.c:1755:31: error: 'KVM_GET_NESTED_STATE' undeclared (first use in this function); did you mean 'KVM_GET_MP_STATE'?
    1755 |         ret = ioctl(vcpu->fd, KVM_GET_NESTED_STATE, state);
         |                               ^~~~~~~~~~~~~~~~~~~~
         |                               KVM_GET_MP_STATE
   lib/kvm_util.c: At top level:
   lib/kvm_util.c:1762:34: warning: 'struct kvm_nested_state' declared inside parameter list will not be visible outside of this definition or declaration
    1762 |                           struct kvm_nested_state *state, bool ignore_error)
         |                                  ^~~~~~~~~~~~~~~~
   lib/kvm_util.c:1761:5: error: conflicting types for 'vcpu_nested_state_set'; have 'int(struct kvm_vm *, uint32_t,  struct kvm_nested_state *, _Bool)' {aka 'int(struct kvm_vm *, unsigned int,  struct kvm_nested_state *, _Bool)'}
    1761 | int vcpu_nested_state_set(struct kvm_vm *vm, uint32_t vcpuid,
         |     ^~~~~~~~~~~~~~~~~~~~~
   In file included from include/kvm_util.h:10,
                    from lib/kvm_util.c:10:
   include/kvm_util_base.h:248:5: note: previous declaration of 'vcpu_nested_state_set' with type 'int(struct kvm_vm *, uint32_t,  struct kvm_nested_state *, _Bool)' {aka 'int(struct kvm_vm *, unsigned int,  struct kvm_nested_state *, _Bool)'}
     248 | int vcpu_nested_state_set(struct kvm_vm *vm, uint32_t vcpuid,
         |     ^~~~~~~~~~~~~~~~~~~~~
   lib/kvm_util.c: In function 'vcpu_nested_state_set':
   lib/kvm_util.c:1769:31: error: 'KVM_SET_NESTED_STATE' undeclared (first use in this function); did you mean 'KVM_SET_MP_STATE'?
    1769 |         ret = ioctl(vcpu->fd, KVM_SET_NESTED_STATE, state);
         |                               ^~~~~~~~~~~~~~~~~~~~
         |                               KVM_SET_MP_STATE
   lib/kvm_util.c: In function 'vcpu_map_dirty_ring':
   lib/kvm_util.c:1926:45: error: 'KVM_DIRTY_LOG_PAGE_OFFSET' undeclared (first use in this function); did you mean 'KVM_PIO_PAGE_OFFSET'?
    1926 |                             vm->page_size * KVM_DIRTY_LOG_PAGE_OFFSET);
         |                                             ^~~~~~~~~~~~~~~~~~~~~~~~~
         |                                             KVM_PIO_PAGE_OFFSET
   lib/kvm_util.c:1940:56: error: invalid application of 'sizeof' to incomplete type 'struct kvm_dirty_gfn'
    1940 |                 vcpu->dirty_gfns_count = size / sizeof(struct kvm_dirty_gfn);
         |                                                        ^~~~~~
--
   In file included from include/x86_64/../kvm_util.h:10,
                    from include/x86_64/processor.h:16,
                    from include/x86_64/apic.h:13,
                    from lib/x86_64/apic.c:8:
>> include/x86_64/../kvm_util_base.h:247:35: warning: 'struct kvm_nested_state' declared inside parameter list will not be visible outside of this definition or declaration
     247 |                            struct kvm_nested_state *state);
         |                                   ^~~~~~~~~~~~~~~~
   include/x86_64/../kvm_util_base.h:249:34: warning: 'struct kvm_nested_state' declared inside parameter list will not be visible outside of this definition or declaration
     249 |                           struct kvm_nested_state *state, bool ignore_error);
         |                                  ^~~~~~~~~~~~~~~~
--
   In file included from include/kvm_util.h:10,
                    from lib/x86_64/processor.c:9:
>> include/kvm_util_base.h:247:35: warning: 'struct kvm_nested_state' declared inside parameter list will not be visible outside of this definition or declaration
     247 |                            struct kvm_nested_state *state);
         |                                   ^~~~~~~~~~~~~~~~
   include/kvm_util_base.h:249:34: warning: 'struct kvm_nested_state' declared inside parameter list will not be visible outside of this definition or declaration
     249 |                           struct kvm_nested_state *state, bool ignore_error);
         |                                  ^~~~~~~~~~~~~~~~
   lib/x86_64/processor.c:1029:41: error: field 'nested' has incomplete type
    1029 |                 struct kvm_nested_state nested;
         |                                         ^~~~~~
   lib/x86_64/processor.c: In function 'vcpu_save_state':
   lib/x86_64/processor.c:1081:45: error: 'KVM_CAP_NESTED_STATE' undeclared (first use in this function); did you mean 'KVM_CAP_PIT_STATE2'?
    1081 |                 nested_size = kvm_check_cap(KVM_CAP_NESTED_STATE);
         |                                             ^~~~~~~~~~~~~~~~~~~~
         |                                             KVM_CAP_PIT_STATE2
   lib/x86_64/processor.c:1081:45: note: each undeclared identifier is reported only once for each function it appears in
   lib/x86_64/processor.c:1131:37: error: 'KVM_GET_NESTED_STATE' undeclared (first use in this function); did you mean 'KVM_GET_MP_STATE'?
    1131 |                 r = ioctl(vcpu->fd, KVM_GET_NESTED_STATE, &state->nested);
         |                                     ^~~~~~~~~~~~~~~~~~~~
         |                                     KVM_GET_MP_STATE
   lib/x86_64/processor.c: In function 'vcpu_load_state':
   lib/x86_64/processor.c:1195:37: error: 'KVM_SET_NESTED_STATE' undeclared (first use in this function); did you mean 'KVM_SET_MP_STATE'?
    1195 |                 r = ioctl(vcpu->fd, KVM_SET_NESTED_STATE, &state->nested);
         |                                     ^~~~~~~~~~~~~~~~~~~~
         |                                     KVM_SET_MP_STATE
   lib/x86_64/processor.c: In function 'kvm_get_supported_hv_cpuid':
   lib/x86_64/processor.c:1381:29: error: 'KVM_GET_SUPPORTED_HV_CPUID' undeclared (first use in this function); did you mean 'KVM_GET_SUPPORTED_CPUID'?
    1381 |         ret = ioctl(kvm_fd, KVM_GET_SUPPORTED_HV_CPUID, cpuid);
         |                             ^~~~~~~~~~~~~~~~~~~~~~~~~~
         |                             KVM_GET_SUPPORTED_CPUID
   lib/x86_64/processor.c: In function 'vcpu_get_supported_hv_cpuid':
   lib/x86_64/processor.c:1430:32: error: 'KVM_GET_SUPPORTED_HV_CPUID' undeclared (first use in this function); did you mean 'KVM_GET_SUPPORTED_CPUID'?
    1430 |         vcpu_ioctl(vm, vcpuid, KVM_GET_SUPPORTED_HV_CPUID, cpuid);
         |                                ^~~~~~~~~~~~~~~~~~~~~~~~~~
         |                                KVM_GET_SUPPORTED_CPUID
--
   In file included from include/kvm_util.h:10,
                    from lib/x86_64/vmx.c:9:
>> include/kvm_util_base.h:247:35: warning: 'struct kvm_nested_state' declared inside parameter list will not be visible outside of this definition or declaration
     247 |                            struct kvm_nested_state *state);
         |                                   ^~~~~~~~~~~~~~~~
   include/kvm_util_base.h:249:34: warning: 'struct kvm_nested_state' declared inside parameter list will not be visible outside of this definition or declaration
     249 |                           struct kvm_nested_state *state, bool ignore_error);
         |                                  ^~~~~~~~~~~~~~~~
   lib/x86_64/vmx.c: In function 'vcpu_enable_evmcs':
   lib/x86_64/vmx.c:51:24: error: 'KVM_CAP_HYPERV_ENLIGHTENED_VMCS' undeclared (first use in this function)
      51 |                 .cap = KVM_CAP_HYPERV_ENLIGHTENED_VMCS,
         |                        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   lib/x86_64/vmx.c:51:24: note: each undeclared identifier is reported only once for each function it appears in

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-07-19  8:16 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-19  8:16 include/kvm_util_base.h:247:35: warning: 'struct kvm_nested_state' declared inside parameter list will not be visible outside of this definition or declaration kernel test robot

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).