mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-24 21:54:34 -04:00
KVM: Add mini-API for vcpu->requests
Makes it a little more readable and hackable. Signed-off-by: Avi Kivity <avi@redhat.com>
This commit is contained in:
parent
36633f32ba
commit
a8eeb04a44
8 changed files with 37 additions and 23 deletions
|
|
@ -624,5 +624,20 @@ static inline long kvm_vm_ioctl_assigned_device(struct kvm *kvm, unsigned ioctl,
|
|||
|
||||
#endif
|
||||
|
||||
static inline void kvm_make_request(int req, struct kvm_vcpu *vcpu)
|
||||
{
|
||||
set_bit(req, &vcpu->requests);
|
||||
}
|
||||
|
||||
static inline bool kvm_make_check_request(int req, struct kvm_vcpu *vcpu)
|
||||
{
|
||||
return test_and_set_bit(req, &vcpu->requests);
|
||||
}
|
||||
|
||||
static inline bool kvm_check_request(int req, struct kvm_vcpu *vcpu)
|
||||
{
|
||||
return test_and_clear_bit(req, &vcpu->requests);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue