search for: kvmi_job_wait

Displaying 5 results from an estimated 5 matches for "kvmi_job_wait".

2019 Aug 13
1
[RFC PATCH v6 16/92] kvm: introspection: handle events and event replies
..._waiting" means "there is a reply that is waiting". What you mean is "waiting_for_reply". The overall structure of the jobs code is confusing. The same function kvm_run_jobs_and_wait is an infinite loop before and gets a "break" later. It is also not clear why kvmi_job_wait is called through a job. Can you have instead just kvm_run_jobs in KVM_REQ_INTROSPECTION, and something like this instead when sending an event: int kvmi_wait_for_reply(struct kvm_vcpu *vcpu) { struct kvmi_vcpu *ivcpu = IVCPU(vcpu); while (ivcpu->waiting_for_reply) { kvmi_run_jobs(vcpu);...
2019 Aug 09
0
[RFC PATCH v6 13/92] kvm: introspection: make the vCPU wait even when its jobs list is empty
...cpu); + struct kvmi_job *job; + + while ((job = kvmi_pull_job(ivcpu))) { + job->fct(vcpu, job->ctx); + kvmi_free_job(job); + } +} + +static bool done_waiting(struct kvm_vcpu *vcpu) +{ + struct kvmi_vcpu *ivcpu = IVCPU(vcpu); + + return !list_empty(&ivcpu->job_list); +} + +static void kvmi_job_wait(struct kvm_vcpu *vcpu, void *ctx) +{ + struct swait_queue_head *wq = kvm_arch_vcpu_wq(vcpu); + struct kvmi_vcpu *ivcpu = IVCPU(vcpu); + int err; + + err = swait_event_killable(*wq, done_waiting(vcpu)); + + if (err) + ivcpu->killed = true; +} + +int kvmi_run_jobs_and_wait(struct kvm_vcpu *vcpu)...
2019 Aug 09
0
[RFC PATCH v6 16/92] kvm: introspection: handle events and event replies
...vcpu) { struct kvmi_vcpu *ivcpu = IVCPU(vcpu); + if (!need_to_wait(vcpu)) + return true; + return !list_empty(&ivcpu->job_list); } @@ -552,6 +564,9 @@ int kvmi_run_jobs_and_wait(struct kvm_vcpu *vcpu) break; } + if (!need_to_wait(vcpu)) + break; + kvmi_add_job(vcpu, kvmi_job_wait, NULL, NULL); } diff --git a/virt/kvm/kvmi_int.h b/virt/kvm/kvmi_int.h index 33ea05cb99af..70c8ca0343a3 100644 --- a/virt/kvm/kvmi_int.h +++ b/virt/kvm/kvmi_int.h @@ -82,7 +82,18 @@ struct kvmi_job { void (*free_fct)(void *ctx); }; +struct kvmi_vcpu_reply { + int error; + int action; + u32...
2019 Aug 09
117
[RFC PATCH v6 00/92] VM introspection
The KVM introspection subsystem provides a facility for applications running on the host or in a separate VM, to control the execution of other VM-s (pause, resume, shutdown), query the state of the vCPUs (GPRs, MSRs etc.), alter the page access bits in the shadow page tables (only for the hardware backed ones, eg. Intel's EPT) and receive notifications when events of interest have taken place
2019 Aug 09
117
[RFC PATCH v6 00/92] VM introspection
The KVM introspection subsystem provides a facility for applications running on the host or in a separate VM, to control the execution of other VM-s (pause, resume, shutdown), query the state of the vCPUs (GPRs, MSRs etc.), alter the page access bits in the shadow page tables (only for the hardware backed ones, eg. Intel's EPT) and receive notifications when events of interest have taken place