summaryrefslogtreecommitdiffstats
path: root/arch/x86/kvm/vmx.c
diff options
context:
space:
mode:
authorRadim Krčmář2017-04-26 22:32:19 +0200
committerPaolo Bonzini2017-04-27 14:12:22 +0200
commit72875d8a4d92f6f37e051be522b2252fd49bd50e (patch)
treef42dd5ca2b21b57abbb4cc656aadf641cfaf1412 /arch/x86/kvm/vmx.c
parentMerge tag 'kvm-s390-next-4.12-3' of git://git.kernel.org/pub/scm/linux/kernel... (diff)
downloadkernel-qcow2-linux-72875d8a4d92f6f37e051be522b2252fd49bd50e.tar.gz
kernel-qcow2-linux-72875d8a4d92f6f37e051be522b2252fd49bd50e.tar.xz
kernel-qcow2-linux-72875d8a4d92f6f37e051be522b2252fd49bd50e.zip
KVM: add kvm_{test,clear}_request to replace {test,clear}_bit
Users were expected to use kvm_check_request() for testing and clearing, but request have expanded their use since then and some users want to only test or do a faster clear. Make sure that requests are not directly accessed with bit operations. Reviewed-by: Christian Borntraeger <borntraeger@de.ibm.com> Signed-off-by: Radim Krčmář <rkrcmar@redhat.com> Reviewed-by: Andrew Jones <drjones@redhat.com> Reviewed-by: Cornelia Huck <cornelia.huck@de.ibm.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'arch/x86/kvm/vmx.c')
-rw-r--r--arch/x86/kvm/vmx.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c
index a4ef63718101..b003b8dfb20c 100644
--- a/arch/x86/kvm/vmx.c
+++ b/arch/x86/kvm/vmx.c
@@ -6299,7 +6299,7 @@ static int handle_invalid_guest_state(struct kvm_vcpu *vcpu)
if (intr_window_requested && vmx_interrupt_allowed(vcpu))
return handle_interrupt_window(&vmx->vcpu);
- if (test_bit(KVM_REQ_EVENT, &vcpu->requests))
+ if (kvm_test_request(KVM_REQ_EVENT, vcpu))
return 1;
err = emulate_instruction(vcpu, EMULTYPE_NO_REEXECUTE);