search for: swait_event_killable_exclus

Displaying 3 results from an estimated 3 matches for "swait_event_killable_exclus".

2020 Feb 07
0
[RFC PATCH v7 01/78] sched/swait: add swait_event_killable_exclusive()
...lude/linux/swait.h index 73e06e9986d4..9c53383219f6 100644 --- a/include/linux/swait.h +++ b/include/linux/swait.h @@ -297,4 +297,15 @@ do { \ __ret; \ }) +#define __swait_event_killable(wq, condition) \ + ___swait_event(wq, condition, TASK_KILLABLE, 0, schedule()) + +#define swait_event_killable_exclusive(wq, condition) \ +({ \ + int __ret = 0; \ + if (!(condition)) \ + __ret = __swait_event_killable(wq, condition); \ + __ret; \ +}) + #endif /* _LINUX_SWAIT_H */
2020 Feb 07
0
[RFC PATCH v7 52/78] KVM: introspection: add KVMI_EVENT_PAUSE_VCPU
..._wait_for_reply(struct kvm_vcpu *vcpu) +{ + struct swait_queue_head *wq = kvm_arch_vcpu_wq(vcpu); + struct kvm_vcpu_introspection *vcpui = VCPUI(vcpu); + int err = 0; + + vcpui->waiting_for_reply = true; + + while (vcpui->waiting_for_reply && !err) { + kvmi_run_jobs(vcpu); + + err = swait_event_killable_exclusive(*wq, + !vcpui->waiting_for_reply || + !list_empty(&vcpui->job_list)); + } + + return err; +} + +static int kvmi_send_event(struct kvm_vcpu *vcpu, u32 ev_id, + void *ev, size_t ev_size, + void *rpl, size_t rpl_size, int *action) +{ + struct kvmi_msg_hdr hdr; + struct kvmi_...
2020 Feb 07
78
[RFC PATCH v7 00/78] VM introspection
...nd KVMI_VCPU_TRANSLATE_GVA [Mathieu] - restore the status of MSRs, CR3, descriptors access interception and prevent conflicts with userspace [Sean] - other fixes for allmost all the issues pointed in the previous code review [Sean, Paolo] Adalbert Laz?r (19): sched/swait: add swait_event_killable_exclusive() KVM: add new error codes for VM introspection KVM: add kvm_vcpu_kick_and_wait() KVM: doc: fix the hypercall numbering KVM: x86: add .control_cr3_intercept() to struct kvm_x86_ops KVM: x86: add .control_desc_intercept() KVM: x86: intercept the write access on sidt and other emulated...