]> git.baikalelectronics.ru Git - kernel.git/commit
selftests: kvm/evmcs_test: complete I/O before migrating guest state
authorPaolo Bonzini <pbonzini@redhat.com>
Thu, 11 Apr 2019 13:57:14 +0000 (15:57 +0200)
committerPaolo Bonzini <pbonzini@redhat.com>
Tue, 16 Apr 2019 13:37:39 +0000 (15:37 +0200)
commit6c724fa960e05fd2d7ed141992b8e1eee43a4065
treefaf31ea837af5dfd50db04caf7c700a198f2be7a
parentebd12ab016ab37f71661be57cefbe676469758ee
selftests: kvm/evmcs_test: complete I/O before migrating guest state

Starting state migration after an IO exit without first completing IO
may result in test failures.  We already have two tests that need this
(this patch in fact fixes evmcs_test, similar to what was fixed for
state_test in commit 7b8c2f1bac8d, "KVM: selftests: complete IO before
migrating guest state", 2019-03-13) and a third is coming.  So, move the
code to vcpu_save_state, and while at it do not access register state
until after I/O is complete.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
tools/testing/selftests/kvm/lib/kvm_util.c
tools/testing/selftests/kvm/lib/x86_64/processor.c
tools/testing/selftests/kvm/x86_64/evmcs_test.c
tools/testing/selftests/kvm/x86_64/state_test.c