2021-12-15 16:01:20

by kernel test robot

[permalink] [raw]
Subject: [KVM] feb627e8d6: kernel-selftests.kvm.vmx_pmu_msrs_test.fail



Greeting,

FYI, we noticed the following commit (built with gcc-9):

commit: feb627e8d6f69c9a319fe279710959efb3eba873 ("KVM: x86: Forbid KVM_SET_CPUID{,2} after KVM_RUN")
https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git master

in testcase: kernel-selftests
version: kernel-selftests-x86_64-99d09ee9-1_20211206
with following parameters:

group: kvm
ucode: 0xe2

test-description: The kernel contains a set of "self tests" under the tools/testing/selftests/ directory. These are intended to be small unit tests to exercise individual code paths in the kernel.
test-url: https://www.kernel.org/doc/Documentation/kselftest.txt


on test machine: 4 threads Intel(R) Xeon(R) CPU E3-1225 v5 @ 3.30GHz with 16G memory

caused below changes (please refer to attached dmesg/kmsg for entire log/backtrace):




If you fix the issue, kindly add following tag
Reported-by: kernel test robot <[email protected]>



# selftests: kvm: vmx_pmu_msrs_test
# ==== Test Assertion Failure ====
# lib/x86_64/processor.c:874: rc == 0
# pid=10415 tid=10415 errno=22 - Invalid argument
# 1 0x000000000040b24f: vcpu_set_cpuid at processor.c:873
# 2 0x000000000040260a: main at vmx_pmu_msrs_test.c:115
# 3 0x00007f07e1aec09a: ?? ??:0
# 4 0x0000000000402759: _start at ??:?
# KVM_SET_CPUID2 failed, rc: -1 errno: 22
not ok 33 selftests: kvm: vmx_pmu_msrs_test # exit=254



To reproduce:

git clone https://github.com/intel/lkp-tests.git
cd lkp-tests
sudo bin/lkp install job.yaml # job file is attached in this email
bin/lkp split-job --compatible job.yaml # generate the yaml file for lkp run
sudo bin/lkp run generated-yaml-file

# if come across any failure that blocks the test,
# please remove ~/.lkp and /lkp dir to run from a clean state.



---
0DAY/LKP+ Test Infrastructure Open Source Technology Center
https://lists.01.org/hyperkitty/list/[email protected] Intel Corporation

Thanks,
Oliver Sang


Attachments:
(No filename) (1.97 kB)
config-5.16.0-rc2-00025-gfeb627e8d6f6 (173.45 kB)
job-script (5.74 kB)
dmesg.xz (35.63 kB)
kernel-selftests (92.67 kB)
job.yaml (4.92 kB)
reproduce (145.00 B)
Download all attachments

2021-12-15 16:01:54

by Vitaly Kuznetsov

[permalink] [raw]
Subject: Re: [KVM] feb627e8d6: kernel-selftests.kvm.vmx_pmu_msrs_test.fail

kernel test robot <[email protected]> writes:

> Greeting,
>
> FYI, we noticed the following commit (built with gcc-9):
>
> commit: feb627e8d6f69c9a319fe279710959efb3eba873 ("KVM: x86: Forbid KVM_SET_CPUID{,2} after KVM_RUN")
> https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git master
>

...

>
> # selftests: kvm: vmx_pmu_msrs_test
> # ==== Test Assertion Failure ====
> # lib/x86_64/processor.c:874: rc == 0
> # pid=10415 tid=10415 errno=22 - Invalid argument
> # 1 0x000000000040b24f: vcpu_set_cpuid at processor.c:873
> # 2 0x000000000040260a: main at vmx_pmu_msrs_test.c:115
> # 3 0x00007f07e1aec09a: ?? ??:0
> # 4 0x0000000000402759: _start at ??:?
> # KVM_SET_CPUID2 failed, rc: -1 errno: 22
> not ok 33 selftests: kvm: vmx_pmu_msrs_test # exit=254
>

Hm, I'm pretty sure I've tested feb627e8d6f6 on both Intel and AMD and I
don't remember seeing this failure :-( . vmx_pmu_msrs_test test does
KVM_SET_CPUID after KVM_RUN and thus needs to be fixed too. Will send a
patch shortly.

--
Vitaly