@@ -36,6 +36,9 @@ its TLB with a VCPU request. The API consists of the following functions::
/* Make request @req of all VCPUs of the VM with struct kvm @kvm. */
bool kvm_make_all_cpus_request(struct kvm *kvm, unsigned int req);
+ /* Clear request @req of all VCPUs of the VM with struct kvm @kvm. */
+ void kvm_clear_all_cpus_request(struct kvm *kvm, unsigned int req);
+
Typically a requester wants the VCPU to perform the activity as soon
as possible after making the request. This means most requests
(kvm_make_request() calls) are followed by a call to kvm_vcpu_kick(),
@@ -355,6 +355,16 @@ bool kvm_make_all_cpus_request(struct kvm *kvm, unsigned int req)
}
EXPORT_SYMBOL_GPL(kvm_make_all_cpus_request);
+void kvm_clear_all_cpus_request(struct kvm *kvm, unsigned int req)
+{
+ unsigned long i;
+ struct kvm_vcpu *vcpu;
+
+ kvm_for_each_vcpu(i, vcpu, kvm)
+ kvm_clear_request(req, vcpu);
+}
+EXPORT_SYMBOL_GPL(kvm_clear_all_cpus_request);
+
#ifndef CONFIG_HAVE_KVM_ARCH_TLB_FLUSH_ALL
void kvm_flush_remote_tlbs(struct kvm *kvm)
{
Clear the given request in all vcpus of the VM with struct kvm. Signed-off-by: Emanuele Giuseppe Esposito <eesposit@redhat.com> --- Documentation/virt/kvm/vcpu-requests.rst | 3 +++ virt/kvm/kvm_main.c | 10 ++++++++++ 2 files changed, 13 insertions(+)