Displaying 5 results from an estimated 5 matches for "kvmi_end_introspect".
2019 Aug 13
1
[RFC PATCH v6 02/92] kvm: introspection: add basic ioctls (hook/unhook)
...9/08/19 17:59, Adalbert Laz?r wrote:
> +static int kvmi_recv(void *arg)
> +{
> + struct kvmi *ikvm = arg;
> +
> + kvmi_info(ikvm, "Hooking VM\n");
> +
> + while (kvmi_msg_process(ikvm))
> + ;
> +
> + kvmi_info(ikvm, "Unhooking VM\n");
> +
> + kvmi_end_introspection(ikvm);
> +
> + return 0;
> +}
> +
Rename this to kvmi_recv_thread instead, please.
> +
> + /*
> + * Make sure all the KVM/KVMI structures are linked and no pointer
> + * is read as NULL after the reference count has been set.
> + */
> + smp_mb__before_atomic();...
2019 Aug 09
0
[RFC PATCH v6 02/92] kvm: introspection: add basic ioctls (hook/unhook)
...struct kvm *kvm)
{
+ kfree(kvm->kvmi);
+ kvm->kvmi = NULL;
}
static void kvmi_release(struct kvm *kvm)
{
+ kvmi_sock_put(IKVM(kvm));
kvmi_destroy(kvm);
complete(&kvm->kvmi_completed);
@@ -43,6 +64,111 @@ void kvmi_put(struct kvm *kvm)
kvmi_release(kvm);
}
+static void kvmi_end_introspection(struct kvmi *ikvm)
+{
+ struct kvm *kvm = ikvm->kvm;
+
+ /* Signal QEMU which is waiting for POLLHUP. */
+ kvmi_sock_shutdown(ikvm);
+
+ /*
+ * At this moment the socket is shut down, no more commands will come
+ * from the introspector, and the only way into the introspection is
+ * thru...
2019 Aug 09
0
[RFC PATCH v6 27/92] kvm: introspection: use page track
...>access = full_access;
+ kvmi_arch_update_page_tracking(kvm, slot, m);
+ m->access = prev_access;
+ }
+
+ start++;
+ }
+
+ write_unlock(&ikvm->access_tree_lock);
+ spin_unlock(&kvm->mmu_lock);
+ srcu_read_unlock(&kvm->srcu, idx);
+
+ kvmi_put(kvm);
+}
+
static void kvmi_end_introspection(struct kvmi *ikvm)
{
struct kvm *kvm = ikvm->kvm;
@@ -290,6 +563,22 @@ static void kvmi_end_introspection(struct kvmi *ikvm)
*/
kvmi_abort_events(kvm);
+ /*
+ * This may sleep on synchronize_srcu() so it's not allowed to be
+ * called under kvmi_put().
+ * Also synchronize_sr...
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