2022-12-03 14:12:33

by kernel test robot

[permalink] [raw]
Subject: [linus:master] [KVM] 92e7d5c83a: kernel-selftests.kvm.triple_fault_event_test.fail


Greeting,

FYI, we noticed kernel-selftests.kvm.triple_fault_event_test.fail due to commit (built with gcc-11):

commit: 92e7d5c83aff124f49082585e57939ed24b59c5c ("KVM: x86: allow L1 to not intercept triple fault")
https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git master

[test failed on linux-next/master 700e0cd3a5ce6a2cb90d9a2aab729b52f092a7d6]

in testcase: kernel-selftests
version: kernel-selftests-x86_64-2ed09c3b-1_20221128
with following parameters:

group: kvm

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: 128 threads 2 sockets Intel(R) Xeon(R) Platinum 8358 CPU @ 2.60GHz (Ice Lake) with 128G 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]>
| Link: https://lore.kernel.org/oe-lkp/[email protected]


# selftests: kvm: triple_fault_event_test
# ==== Test Assertion Failure ====
# x86_64/triple_fault_event_test.c:87: false
# pid=5484 tid=5484 errno=4 - Interrupted system call
# 1 0x0000000000402647: main at triple_fault_event_test.c:87
# 2 0x00007fcc3e4b6189: ?? ??:0
# 3 0x00007fcc3e4b6244: ?? ??:0
# 4 0x0000000000402690: _start at ??:?
# Unexpected ucall: 0
not ok 52 selftests: kvm: triple_fault_event_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.



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



Attachments:
(No filename) (2.10 kB)
config-6.1.0-rc4-00027-g92e7d5c83aff (168.33 kB)
job-script (5.81 kB)
dmesg.xz (52.13 kB)
kernel-selftests (273.70 kB)
job.yaml (4.91 kB)
reproduce (241.00 B)
Download all attachments

2022-12-05 17:46:25

by Sean Christopherson

[permalink] [raw]
Subject: Re: [linus:master] [KVM] 92e7d5c83a: kernel-selftests.kvm.triple_fault_event_test.fail

On Sat, Dec 03, 2022, kernel test robot wrote:
>
> Greeting,
>
> FYI, we noticed kernel-selftests.kvm.triple_fault_event_test.fail due to commit (built with gcc-11):
>
> commit: 92e7d5c83aff124f49082585e57939ed24b59c5c ("KVM: x86: allow L1 to not intercept triple fault")
> https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git master

Should already be fixed. Thanks!

commit df0bb47baa95aad133820b149851d5b94cbc6790
Author: Paolo Bonzini <[email protected]>
Date: Wed Nov 30 11:14:35 2022 -0500

KVM: x86: fix uninitialized variable use on KVM_REQ_TRIPLE_FAULT

If a triple fault was fixed by kvm_x86_ops.nested_ops->triple_fault (by
turning it into a vmexit), there is no need to leave vcpu_enter_guest().
Any vcpu->requests will be caught later before the actual vmentry,
and in fact vcpu_enter_guest() was not initializing the "r" variable.
Depending on the compiler's whims, this could cause the
x86_64/triple_fault_event_test test to fail.

Cc: Maxim Levitsky <[email protected]>
Fixes: 92e7d5c83aff ("KVM: x86: allow L1 to not intercept triple fault")
Signed-off-by: Paolo Bonzini <[email protected]>