[sean-jc:x86/ro_memslot_snafu] [KVM] 666538d29b: kernel-selftests.kvm.make.fail

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




Hello,

kernel test robot noticed "kernel-selftests.kvm.make.fail" on:

commit: 666538d29b9c5394d2545cb4052fd3df79e618c8 ("KVM: selftests: Add test for RO memslots")
https://github.com/sean-jc/linux x86/ro_memslot_snafu

in testcase: kernel-selftests
version: kernel-selftests-x86_64-d2f1c3c9-1_20240223
with following parameters:

	group: kvm



compiler: gcc-12
test machine: 224 threads 2 sockets Intel(R) Xeon(R) Platinum 8480+ (Sapphire Rapids) with 256G memory

(please refer to attached dmesg/kmsg for entire log/backtrace)




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 <oliver.sang@xxxxxxxxx>
| Closes: https://lore.kernel.org/oe-lkp/202402282228.57c4f885-oliver.sang@xxxxxxxxx



KERNEL SELFTESTS: linux_headers_dir is /usr/src/linux-headers-x86_64-rhel-8.3-kselftests-666538d29b9c5394d2545cb4052fd3df79e618c8
2024-02-24 21:05:57 ln -sf /usr/sbin/iptables-nft /usr/bin/iptables
2024-02-24 21:05:57 ln -sf /usr/sbin/ip6tables-nft /usr/bin/ip6tables
2024-02-24 21:05:57 sed -i s/default_timeout=45/default_timeout=300/ kselftest/runner.sh
2024-02-24 21:05:58 make -j224 -C kvm
make: Entering directory '/usr/src/perf_selftests-x86_64-rhel-8.3-kselftests-666538d29b9c5394d2545cb4052fd3df79e618c8/tools/testing/selftests/kvm'

...

ro_memslot_test.c: In function ‘guest_code’:
ro_memslot_test.c:6:24: warning: implicit declaration of function ‘READ_ONCE’ [-Wimplicit-function-declaration]
    6 |         uint64_t val = READ_ONCE(*mem);
      |                        ^~~~~~~~~
ro_memslot_test.c:8:9: warning: implicit declaration of function ‘GUEST_ASSERT’; did you mean ‘TEST_ASSERT’? [-Wimplicit-function-declaration]
    8 |         GUEST_ASSERT(val == magic_val,
      |         ^~~~~~~~~~~~
      |         TEST_ASSERT
ro_memslot_test.c:11:9: warning: implicit declaration of function ‘WRITE_ONCE’ [-Wimplicit-function-declaration]
   11 |         WRITE_ONCE(*mem, ~magic_val);
      |         ^~~~~~~~~~
ro_memslot_test.c:12:9: warning: implicit declaration of function ‘GUEST_DONE’ [-Wimplicit-function-declaration]
   12 |         GUEST_DONE();
      |         ^~~~~~~~~~
ro_memslot_test.c: In function ‘main’:
ro_memslot_test.c:24:14: warning: implicit declaration of function ‘vm_create_with_one_vcpu’ [-Wimplicit-function-declaration]
   24 |         vm = vm_create_with_one_vcpu(&vcpu, guest_code);
      |              ^~~~~~~~~~~~~~~~~~~~~~~
ro_memslot_test.c:24:12: warning: assignment to ‘struct kvm_vm *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
   24 |         vm = vm_create_with_one_vcpu(&vcpu, guest_code);
      |            ^
ro_memslot_test.c:26:9: warning: implicit declaration of function ‘vm_userspace_mem_region_add’ [-Wimplicit-function-declaration]
   26 |         vm_userspace_mem_region_add(vm, VM_MEM_SRC_ANONYMOUS, gpa, slot, 1,
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~
ro_memslot_test.c:27:37: error: ‘KVM_MEM_READONLY’ undeclared (first use in this function)
   27 |                                     KVM_MEM_READONLY);
      |                                     ^~~~~~~~~~~~~~~~
ro_memslot_test.c:27:37: note: each undeclared identifier is reported only once for each function it appears in
ro_memslot_test.c:29:9: warning: implicit declaration of function ‘virt_map’ [-Wimplicit-function-declaration]
   29 |         virt_map(vm, gpa, gpa, 1);
      |         ^~~~~~~~
ro_memslot_test.c:30:31: warning: implicit declaration of function ‘addr_gpa2hva’ [-Wimplicit-function-declaration]
   30 |         *(volatile uint64_t *)addr_gpa2hva(vm, gpa) = magic_val;
      |                               ^~~~~~~~~~~~
ro_memslot_test.c:30:10: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
   30 |         *(volatile uint64_t *)addr_gpa2hva(vm, gpa) = magic_val;
      |          ^
ro_memslot_test.c:32:9: warning: implicit declaration of function ‘vcpu_set_args’ [-Wimplicit-function-declaration]
   32 |         vcpu_set_args(vcpu, 2, gpa, magic_val);
      |         ^~~~~~~~~~~~~
ro_memslot_test.c:34:9: warning: implicit declaration of function ‘vcpu_run’ [-Wimplicit-function-declaration]
   34 |         vcpu_run(vcpu);
      |         ^~~~~~~~
In file included from ro_memslot_test.c:2:
ro_memslot_test.c:35:28: error: invalid use of undefined type ‘struct kvm_vcpu’
   35 |         TEST_ASSERT_EQ(vcpu->run->exit_reason, KVM_EXIT_MMIO);
      |                            ^~
include/test_util.h:58:16: note: in definition of macro ‘TEST_ASSERT_EQ’
   58 |         typeof(a) __a = (a);                                            \
      |                ^
ro_memslot_test.c:35:28: error: invalid use of undefined type ‘struct kvm_vcpu’
   35 |         TEST_ASSERT_EQ(vcpu->run->exit_reason, KVM_EXIT_MMIO);
      |                            ^~
include/test_util.h:58:26: note: in definition of macro ‘TEST_ASSERT_EQ’
   58 |         typeof(a) __a = (a);                                            \
      |                          ^
ro_memslot_test.c:35:48: error: ‘KVM_EXIT_MMIO’ undeclared (first use in this function)
   35 |         TEST_ASSERT_EQ(vcpu->run->exit_reason, KVM_EXIT_MMIO);
      |                                                ^~~~~~~~~~~~~
include/test_util.h:59:16: note: in definition of macro ‘TEST_ASSERT_EQ’
   59 |         typeof(b) __b = (b);                                            \
      |                ^
ro_memslot_test.c:36:28: error: invalid use of undefined type ‘struct kvm_vcpu’
   36 |         TEST_ASSERT_EQ(vcpu->run->mmio.is_write, true);
      |                            ^~
include/test_util.h:58:16: note: in definition of macro ‘TEST_ASSERT_EQ’
   58 |         typeof(a) __a = (a);                                            \
      |                ^
ro_memslot_test.c:36:28: error: invalid use of undefined type ‘struct kvm_vcpu’
   36 |         TEST_ASSERT_EQ(vcpu->run->mmio.is_write, true);
      |                            ^~
include/test_util.h:58:26: note: in definition of macro ‘TEST_ASSERT_EQ’
   58 |         typeof(a) __a = (a);                                            \
      |                          ^
ro_memslot_test.c:37:28: error: invalid use of undefined type ‘struct kvm_vcpu’
   37 |         TEST_ASSERT_EQ(vcpu->run->mmio.len, 8);
      |                            ^~
include/test_util.h:58:16: note: in definition of macro ‘TEST_ASSERT_EQ’
   58 |         typeof(a) __a = (a);                                            \
      |                ^
ro_memslot_test.c:37:28: error: invalid use of undefined type ‘struct kvm_vcpu’
   37 |         TEST_ASSERT_EQ(vcpu->run->mmio.len, 8);
      |                            ^~
include/test_util.h:58:26: note: in definition of macro ‘TEST_ASSERT_EQ’
   58 |         typeof(a) __a = (a);                                            \
      |                          ^
ro_memslot_test.c:38:28: error: invalid use of undefined type ‘struct kvm_vcpu’
   38 |         TEST_ASSERT_EQ(vcpu->run->mmio.phys_addr, gpa);
      |                            ^~
include/test_util.h:58:16: note: in definition of macro ‘TEST_ASSERT_EQ’
   58 |         typeof(a) __a = (a);                                            \
      |                ^
ro_memslot_test.c:38:28: error: invalid use of undefined type ‘struct kvm_vcpu’
   38 |         TEST_ASSERT_EQ(vcpu->run->mmio.phys_addr, gpa);
      |                            ^~
include/test_util.h:58:26: note: in definition of macro ‘TEST_ASSERT_EQ’
   58 |         typeof(a) __a = (a);                                            \
      |                          ^
ro_memslot_test.c:39:41: error: invalid use of undefined type ‘struct kvm_vcpu’
   39 |         TEST_ASSERT_EQ(*(uint64_t *)vcpu->run->mmio.data, ~magic_val);
      |                                         ^~
include/test_util.h:58:16: note: in definition of macro ‘TEST_ASSERT_EQ’
   58 |         typeof(a) __a = (a);                                            \
      |                ^
ro_memslot_test.c:39:41: error: invalid use of undefined type ‘struct kvm_vcpu’
   39 |         TEST_ASSERT_EQ(*(uint64_t *)vcpu->run->mmio.data, ~magic_val);
      |                                         ^~
include/test_util.h:58:26: note: in definition of macro ‘TEST_ASSERT_EQ’
   58 |         typeof(a) __a = (a);                                            \
      |                          ^
ro_memslot_test.c:42:24: warning: implicit declaration of function ‘get_ucall’ [-Wimplicit-function-declaration]
   42 |         TEST_ASSERT_EQ(get_ucall(vcpu, NULL), UCALL_DONE);
      |                        ^~~~~~~~~
include/test_util.h:58:16: note: in definition of macro ‘TEST_ASSERT_EQ’
   58 |         typeof(a) __a = (a);                                            \
      |                ^
ro_memslot_test.c:42:47: error: ‘UCALL_DONE’ undeclared (first use in this function)
   42 |         TEST_ASSERT_EQ(get_ucall(vcpu, NULL), UCALL_DONE);
      |                                               ^~~~~~~~~~
include/test_util.h:59:16: note: in definition of macro ‘TEST_ASSERT_EQ’
   59 |         typeof(b) __b = (b);                                            \
      |                ^
ro_memslot_test.c:44:9: warning: implicit declaration of function ‘kvm_vm_free’ [-Wimplicit-function-declaration]
   44 |         kvm_vm_free(vm);
      |         ^~~~~~~~~~~
At top level:
cc1: note: unrecognized command-line option ‘-Wno-gnu-variable-sized-type-not-at-end’ may have been intended to silence earlier diagnostics
make: *** [Makefile:279: /usr/src/perf_selftests-x86_64-rhel-8.3-kselftests-666538d29b9c5394d2545cb4052fd3df79e618c8/tools/testing/selftests/kvm/ro_memslot_test.o] Error 1
make: *** Waiting for unfinished jobs....
make: Leaving directory '/usr/src/perf_selftests-x86_64-rhel-8.3-kselftests-666538d29b9c5394d2545cb4052fd3df79e618c8/tools/testing/selftests/kvm'
2024-02-24 21:06:03 make quicktest=1 run_tests -C kvm
make: Entering directory '/usr/src/perf_selftests-x86_64-rhel-8.3-kselftests-666538d29b9c5394d2545cb4052fd3df79e618c8/tools/testing/selftests/kvm'

...

gcc  -Wall -Wstrict-prototypes -Wuninitialized -O2 -g -std=gnu99 -Wno-gnu-variable-sized-type-not-at-end -MD -MP -fno-builtin-memcmp -fno-builtin-memcpy -fno-builtin-memset -fno-builtin-strnlen -fno-stack-protector -fno-PIE -I/usr/src/perf_selftests-x86_64-rhel-8.3-kselftests-666538d29b9c5394d2545cb4052fd3df79e618c8/tools/testing/selftests/../../../tools/include -I/usr/src/perf_selftests-x86_64-rhel-8.3-kselftests-666538d29b9c5394d2545cb4052fd3df79e618c8/tools/testing/selftests/../../../tools/arch/x86/include -I/usr/src/perf_selftests-x86_64-rhel-8.3-kselftests-666538d29b9c5394d2545cb4052fd3df79e618c8/tools/testing/selftests/../../../usr/include/ -Iinclude -I. -Iinclude/x86_64 -I ../rseq -I..  -isystem /usr/src/perf_selftests-x86_64-rhel-8.3-kselftests-666538d29b9c5394d2545cb4052fd3df79e618c8/tools/testing/selftests/../../../usr/include   -c ro_memslot_test.c -o /usr/src/perf_selftests-x86_64-rhel-8.3-kselftests-666538d29b9c5394d2545cb4052fd3df79e618c8/tools/testing/selftests/kvm/ro_memslot_test.o
ro_memslot_test.c: In function ‘guest_code’:
ro_memslot_test.c:6:24: warning: implicit declaration of function ‘READ_ONCE’ [-Wimplicit-function-declaration]
    6 |         uint64_t val = READ_ONCE(*mem);
      |                        ^~~~~~~~~
ro_memslot_test.c:8:9: warning: implicit declaration of function ‘GUEST_ASSERT’; did you mean ‘TEST_ASSERT’? [-Wimplicit-function-declaration]
    8 |         GUEST_ASSERT(val == magic_val,
      |         ^~~~~~~~~~~~
      |         TEST_ASSERT
ro_memslot_test.c:11:9: warning: implicit declaration of function ‘WRITE_ONCE’ [-Wimplicit-function-declaration]
   11 |         WRITE_ONCE(*mem, ~magic_val);
      |         ^~~~~~~~~~
ro_memslot_test.c:12:9: warning: implicit declaration of function ‘GUEST_DONE’ [-Wimplicit-function-declaration]
   12 |         GUEST_DONE();
      |         ^~~~~~~~~~
ro_memslot_test.c: In function ‘main’:
ro_memslot_test.c:24:14: warning: implicit declaration of function ‘vm_create_with_one_vcpu’ [-Wimplicit-function-declaration]
   24 |         vm = vm_create_with_one_vcpu(&vcpu, guest_code);
      |              ^~~~~~~~~~~~~~~~~~~~~~~
ro_memslot_test.c:24:12: warning: assignment to ‘struct kvm_vm *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
   24 |         vm = vm_create_with_one_vcpu(&vcpu, guest_code);
      |            ^
ro_memslot_test.c:26:9: warning: implicit declaration of function ‘vm_userspace_mem_region_add’ [-Wimplicit-function-declaration]
   26 |         vm_userspace_mem_region_add(vm, VM_MEM_SRC_ANONYMOUS, gpa, slot, 1,
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~
ro_memslot_test.c:27:37: error: ‘KVM_MEM_READONLY’ undeclared (first use in this function)
   27 |                                     KVM_MEM_READONLY);
      |                                     ^~~~~~~~~~~~~~~~
ro_memslot_test.c:27:37: note: each undeclared identifier is reported only once for each function it appears in
ro_memslot_test.c:29:9: warning: implicit declaration of function ‘virt_map’ [-Wimplicit-function-declaration]
   29 |         virt_map(vm, gpa, gpa, 1);
      |         ^~~~~~~~
ro_memslot_test.c:30:31: warning: implicit declaration of function ‘addr_gpa2hva’ [-Wimplicit-function-declaration]
   30 |         *(volatile uint64_t *)addr_gpa2hva(vm, gpa) = magic_val;
      |                               ^~~~~~~~~~~~
ro_memslot_test.c:30:10: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
   30 |         *(volatile uint64_t *)addr_gpa2hva(vm, gpa) = magic_val;
      |          ^
ro_memslot_test.c:32:9: warning: implicit declaration of function ‘vcpu_set_args’ [-Wimplicit-function-declaration]
   32 |         vcpu_set_args(vcpu, 2, gpa, magic_val);
      |         ^~~~~~~~~~~~~
ro_memslot_test.c:34:9: warning: implicit declaration of function ‘vcpu_run’ [-Wimplicit-function-declaration]
   34 |         vcpu_run(vcpu);
      |         ^~~~~~~~
In file included from ro_memslot_test.c:2:
ro_memslot_test.c:35:28: error: invalid use of undefined type ‘struct kvm_vcpu’
   35 |         TEST_ASSERT_EQ(vcpu->run->exit_reason, KVM_EXIT_MMIO);
      |                            ^~
include/test_util.h:58:16: note: in definition of macro ‘TEST_ASSERT_EQ’
   58 |         typeof(a) __a = (a);                                            \
      |                ^
ro_memslot_test.c:35:28: error: invalid use of undefined type ‘struct kvm_vcpu’
   35 |         TEST_ASSERT_EQ(vcpu->run->exit_reason, KVM_EXIT_MMIO);
      |                            ^~
include/test_util.h:58:26: note: in definition of macro ‘TEST_ASSERT_EQ’
   58 |         typeof(a) __a = (a);                                            \
      |                          ^
ro_memslot_test.c:35:48: error: ‘KVM_EXIT_MMIO’ undeclared (first use in this function)
   35 |         TEST_ASSERT_EQ(vcpu->run->exit_reason, KVM_EXIT_MMIO);
      |                                                ^~~~~~~~~~~~~
include/test_util.h:59:16: note: in definition of macro ‘TEST_ASSERT_EQ’
   59 |         typeof(b) __b = (b);                                            \
      |                ^
ro_memslot_test.c:36:28: error: invalid use of undefined type ‘struct kvm_vcpu’
   36 |         TEST_ASSERT_EQ(vcpu->run->mmio.is_write, true);
      |                            ^~
include/test_util.h:58:16: note: in definition of macro ‘TEST_ASSERT_EQ’
   58 |         typeof(a) __a = (a);                                            \
      |                ^
ro_memslot_test.c:36:28: error: invalid use of undefined type ‘struct kvm_vcpu’
   36 |         TEST_ASSERT_EQ(vcpu->run->mmio.is_write, true);
      |                            ^~
include/test_util.h:58:26: note: in definition of macro ‘TEST_ASSERT_EQ’
   58 |         typeof(a) __a = (a);                                            \
      |                          ^
ro_memslot_test.c:37:28: error: invalid use of undefined type ‘struct kvm_vcpu’
   37 |         TEST_ASSERT_EQ(vcpu->run->mmio.len, 8);
      |                            ^~
include/test_util.h:58:16: note: in definition of macro ‘TEST_ASSERT_EQ’
   58 |         typeof(a) __a = (a);                                            \
      |                ^
ro_memslot_test.c:37:28: error: invalid use of undefined type ‘struct kvm_vcpu’
   37 |         TEST_ASSERT_EQ(vcpu->run->mmio.len, 8);
      |                            ^~
include/test_util.h:58:26: note: in definition of macro ‘TEST_ASSERT_EQ’
   58 |         typeof(a) __a = (a);                                            \
      |                          ^
ro_memslot_test.c:38:28: error: invalid use of undefined type ‘struct kvm_vcpu’
   38 |         TEST_ASSERT_EQ(vcpu->run->mmio.phys_addr, gpa);
      |                            ^~
include/test_util.h:58:16: note: in definition of macro ‘TEST_ASSERT_EQ’
   58 |         typeof(a) __a = (a);                                            \
      |                ^
ro_memslot_test.c:38:28: error: invalid use of undefined type ‘struct kvm_vcpu’
   38 |         TEST_ASSERT_EQ(vcpu->run->mmio.phys_addr, gpa);
      |                            ^~
include/test_util.h:58:26: note: in definition of macro ‘TEST_ASSERT_EQ’
   58 |         typeof(a) __a = (a);                                            \
      |                          ^
ro_memslot_test.c:39:41: error: invalid use of undefined type ‘struct kvm_vcpu’
   39 |         TEST_ASSERT_EQ(*(uint64_t *)vcpu->run->mmio.data, ~magic_val);
      |                                         ^~
include/test_util.h:58:16: note: in definition of macro ‘TEST_ASSERT_EQ’
   58 |         typeof(a) __a = (a);                                            \
      |                ^
ro_memslot_test.c:39:41: error: invalid use of undefined type ‘struct kvm_vcpu’
   39 |         TEST_ASSERT_EQ(*(uint64_t *)vcpu->run->mmio.data, ~magic_val);
      |                                         ^~
include/test_util.h:58:26: note: in definition of macro ‘TEST_ASSERT_EQ’
   58 |         typeof(a) __a = (a);                                            \
      |                          ^
ro_memslot_test.c:42:24: warning: implicit declaration of function ‘get_ucall’ [-Wimplicit-function-declaration]
   42 |         TEST_ASSERT_EQ(get_ucall(vcpu, NULL), UCALL_DONE);
      |                        ^~~~~~~~~
include/test_util.h:58:16: note: in definition of macro ‘TEST_ASSERT_EQ’
   58 |         typeof(a) __a = (a);                                            \
      |                ^
ro_memslot_test.c:42:47: error: ‘UCALL_DONE’ undeclared (first use in this function)
   42 |         TEST_ASSERT_EQ(get_ucall(vcpu, NULL), UCALL_DONE);
      |                                               ^~~~~~~~~~
include/test_util.h:59:16: note: in definition of macro ‘TEST_ASSERT_EQ’
   59 |         typeof(b) __b = (b);                                            \
      |                ^
ro_memslot_test.c:44:9: warning: implicit declaration of function ‘kvm_vm_free’ [-Wimplicit-function-declaration]
   44 |         kvm_vm_free(vm);
      |         ^~~~~~~~~~~
At top level:
cc1: note: unrecognized command-line option ‘-Wno-gnu-variable-sized-type-not-at-end’ may have been intended to silence earlier diagnostics
make: *** [Makefile:279: /usr/src/perf_selftests-x86_64-rhel-8.3-kselftests-666538d29b9c5394d2545cb4052fd3df79e618c8/tools/testing/selftests/kvm/ro_memslot_test.o] Error 1
make: Leaving directory '/usr/src/perf_selftests-x86_64-rhel-8.3-kselftests-666538d29b9c5394d2545cb4052fd3df79e618c8/tools/testing/selftests/kvm'



The kernel config and materials to reproduce are available at:
https://download.01.org/0day-ci/archive/20240228/202402282228.57c4f885-oliver.sang@xxxxxxxxx



-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki






[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux