]> 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)
commit27012347c5f38ecc3a711e2c896525a63813d0e3
treefaf31ea837af5dfd50db04caf7c700a198f2be7a
parent6c8635cb5bda43f3d331e81b43ca168703838172
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 c03815984d31, "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