diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2019-03-31 11:55:59 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2019-03-31 11:55:59 -0400 |
commit | 63fc9c23488d6cf34e4c233e24ba59b7e5548412 (patch) | |
tree | 08188f35d8625be520730e4ae106e8af2ee7b058 /tools/testing/selftests/kvm/lib/kvm_util.c | |
parent | 915ee0da5ecb7ac7fd023ae36f01c47ce47a45d1 (diff) | |
parent | 690edec54cbaa0e98dc592aae6864272f48f3c84 (diff) |
Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm
Pull KVM fixes from Paolo Bonzini:
"A collection of x86 and ARM bugfixes, and some improvements to
documentation.
On top of this, a cleanup of kvm_para.h headers, which were exported
by some architectures even though they not support KVM at all. This is
responsible for all the Kbuild changes in the diffstat"
* tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm: (28 commits)
Documentation: kvm: clarify KVM_SET_USER_MEMORY_REGION
KVM: doc: Document the life cycle of a VM and its resources
KVM: selftests: complete IO before migrating guest state
KVM: selftests: disable stack protector for all KVM tests
KVM: selftests: explicitly disable PIE for tests
KVM: selftests: assert on exit reason in CR4/cpuid sync test
KVM: x86: update %rip after emulating IO
x86/kvm/hyper-v: avoid spurious pending stimer on vCPU init
kvm/x86: Move MSR_IA32_ARCH_CAPABILITIES to array emulated_msrs
KVM: x86: Emulate MSR_IA32_ARCH_CAPABILITIES on AMD hosts
kvm: don't redefine flags as something else
kvm: mmu: Used range based flushing in slot_handle_level_range
KVM: export <linux/kvm_para.h> and <asm/kvm_para.h> iif KVM is supported
KVM: x86: remove check on nr_mmu_pages in kvm_arch_commit_memory_region()
kvm: nVMX: Add a vmentry check for HOST_SYSENTER_ESP and HOST_SYSENTER_EIP fields
KVM: SVM: Workaround errata#1096 (insn_len maybe zero on SMAP violation)
KVM: Reject device ioctls from processes other than the VM's creator
KVM: doc: Fix incorrect word ordering regarding supported use of APIs
KVM: x86: fix handling of role.cr4_pae and rename it to 'gpte_size'
KVM: nVMX: Do not inherit quadrant and invalid for the root shadow EPT
...
Diffstat (limited to 'tools/testing/selftests/kvm/lib/kvm_util.c')
-rw-r--r-- | tools/testing/selftests/kvm/lib/kvm_util.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/tools/testing/selftests/kvm/lib/kvm_util.c b/tools/testing/selftests/kvm/lib/kvm_util.c index b52cfdefecbf..efa0aad8b3c6 100644 --- a/tools/testing/selftests/kvm/lib/kvm_util.c +++ b/tools/testing/selftests/kvm/lib/kvm_util.c | |||
@@ -1121,6 +1121,22 @@ int _vcpu_run(struct kvm_vm *vm, uint32_t vcpuid) | |||
1121 | return rc; | 1121 | return rc; |
1122 | } | 1122 | } |
1123 | 1123 | ||
1124 | void vcpu_run_complete_io(struct kvm_vm *vm, uint32_t vcpuid) | ||
1125 | { | ||
1126 | struct vcpu *vcpu = vcpu_find(vm, vcpuid); | ||
1127 | int ret; | ||
1128 | |||
1129 | TEST_ASSERT(vcpu != NULL, "vcpu not found, vcpuid: %u", vcpuid); | ||
1130 | |||
1131 | vcpu->state->immediate_exit = 1; | ||
1132 | ret = ioctl(vcpu->fd, KVM_RUN, NULL); | ||
1133 | vcpu->state->immediate_exit = 0; | ||
1134 | |||
1135 | TEST_ASSERT(ret == -1 && errno == EINTR, | ||
1136 | "KVM_RUN IOCTL didn't exit immediately, rc: %i, errno: %i", | ||
1137 | ret, errno); | ||
1138 | } | ||
1139 | |||
1124 | /* | 1140 | /* |
1125 | * VM VCPU Set MP State | 1141 | * VM VCPU Set MP State |
1126 | * | 1142 | * |