]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit
KVM: selftests: Don't skip L2's VMCALL in SMM test for SVM guest
authorSean Christopherson <seanjc@google.com>
Tue, 25 Jan 2022 22:17:25 +0000 (22:17 +0000)
committerPaolo Pisati <paolo.pisati@canonical.com>
Thu, 3 Feb 2022 09:28:54 +0000 (10:28 +0100)
commit1cedba23c0b858eb74836990d6386dc162c81409
treef56d68c4426c9efca5c07e8b69324718b350db21
parenta0d0585fa9d3d7bce93ad872afb92486d99eb0e5
KVM: selftests: Don't skip L2's VMCALL in SMM test for SVM guest

BugLink: https://bugs.launchpad.net/bugs/1959879
[ Upstream commit 4cf3d3ebe8794c449af3e0e8c1d790c97e461d20 ]

Don't skip the vmcall() in l2_guest_code() prior to re-entering L2, doing
so will result in L2 running to completion, popping '0' off the stack for
RET, jumping to address '0', and ultimately dying with a triple fault
shutdown.

It's not at all obvious why the test re-enters L2 and re-executes VMCALL,
but presumably it serves a purpose.  The VMX path doesn't skip vmcall(),
and the test can't possibly have passed on SVM, so just do what VMX does.

Fixes: d951b2210c1a ("KVM: selftests: smm_test: Test SMM enter from L2")
Cc: Maxim Levitsky <mlevitsk@redhat.com>
Signed-off-by: Sean Christopherson <seanjc@google.com>
Message-Id: <20220125221725.2101126-1-seanjc@google.com>
Reviewed-by: Vitaly Kuznetsov <vkuznets@redhat.com>
Tested-by: Vitaly Kuznetsov <vkuznets@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
tools/testing/selftests/kvm/x86_64/smm_test.c