This Linux kernel change "selftests/kvm: make platform_info_test pass on AMD" is included in the Linux 4.19.72 release. This change is authored by Vitaly Kuznetsov <vkuznets [at] redhat.com> on Mon Jun 10 19:22:55 2019 +0200. The commit for this change in Linux stable tree is ddb55cc (patch) which is from upstream commit e442737. The same Linux upstream change may have been applied to various maintained Linux releases and you can find all Linux releases containing changes from upstream e442737.
selftests/kvm: make platform_info_test pass on AMD [ Upstream commit e4427372398c31f57450565de277f861a4db5b3b ] test_msr_platform_info_disabled() generates EXIT_SHUTDOWN but VMCB state is undefined after that so an attempt to launch this guest again from test_msr_platform_info_enabled() fails. Reorder the tests to make test pass. Signed-off-by: Vitaly Kuznetsov <firstname.lastname@example.org> Signed-off-by: Paolo Bonzini <email@example.com> Signed-off-by: Sasha Levin <firstname.lastname@example.org>
There are 2 lines of Linux source code added/deleted in this change. Code changes to Linux kernel are as follows.
tools/testing/selftests/kvm/platform_info_test.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/testing/selftests/kvm/platform_info_test.c b/tools/testing/selftests/kvm/platform_info_test.c index 3764e71..65db510 100644 --- a/tools/testing/selftests/kvm/platform_info_test.c +++ b/tools/testing/selftests/kvm/platform_info_test.c @@ -100,8 +100,8 @@ int main(int argc, char *argv) msr_platform_info = vcpu_get_msr(vm, VCPU_ID, MSR_PLATFORM_INFO); vcpu_set_msr(vm, VCPU_ID, MSR_PLATFORM_INFO, msr_platform_info | MSR_PLATFORM_INFO_MAX_TURBO_RATIO); - test_msr_platform_info_disabled(vm); test_msr_platform_info_enabled(vm); + test_msr_platform_info_disabled(vm); vcpu_set_msr(vm, VCPU_ID, MSR_PLATFORM_INFO, msr_platform_info); kvm_vm_free(vm);