Re: [RFC PATCH v6 01/92] kvm: introduce KVMI (VM introspection subsystem)

2019-08-14 Thread Paolo Bonzini
On 14/08/19 11:48, Adalbert Lazăr wrote: >> Why does closing the socket require destroying the kvmi object? E.g. can >> it be marked as defunct or whatever and only fully removed on a synchronous >> unhook from userspace? Re-hooking could either require said unhook, or >> maybe reuse the

Re: [RFC PATCH v6 01/92] kvm: introduce KVMI (VM introspection subsystem)

2019-08-14 Thread Adalbert Lazăr
On Tue, 13 Aug 2019 08:01:28 -0700, Sean Christopherson wrote: > On Tue, Aug 13, 2019 at 02:09:51PM +0200, Paolo Bonzini wrote: > > On 13/08/19 13:57, Adalbert Lazăr wrote: > > >> The refcounting approach seems a bit backwards, and AFAICT is driven by > > >> implementing unhook via a message,

Re: [RFC PATCH v6 01/92] kvm: introduce KVMI (VM introspection subsystem)

2019-08-13 Thread Paolo Bonzini
On 13/08/19 17:01, Sean Christopherson wrote: >>> It's a bit unclear how, but we'll try to get ride of the refcount object, >>> which will remove a lot of code, indeed. >> You can keep it for now. It may become clearer how to fix it after the >> event loop is cleaned up. > By event loop, do you

Re: [RFC PATCH v6 01/92] kvm: introduce KVMI (VM introspection subsystem)

2019-08-13 Thread Sean Christopherson
On Tue, Aug 13, 2019 at 02:09:51PM +0200, Paolo Bonzini wrote: > On 13/08/19 13:57, Adalbert Lazăr wrote: > >> The refcounting approach seems a bit backwards, and AFAICT is driven by > >> implementing unhook via a message, which also seems backwards. I assume > >> hook and unhook are relatively

Re: [RFC PATCH v6 01/92] kvm: introduce KVMI (VM introspection subsystem)

2019-08-13 Thread Paolo Bonzini
On 13/08/19 13:57, Adalbert Lazăr wrote: >> The refcounting approach seems a bit backwards, and AFAICT is driven by >> implementing unhook via a message, which also seems backwards. I assume >> hook and unhook are relatively rare events and not performance critical, >> so make those the

Re: [RFC PATCH v6 01/92] kvm: introduce KVMI (VM introspection subsystem)

2019-08-13 Thread Adalbert Lazăr
On Mon, 12 Aug 2019 13:20:30 -0700, Sean Christopherson wrote: > On Fri, Aug 09, 2019 at 06:59:16PM +0300, Adalbert Lazăr wrote: > > diff --git a/arch/x86/kvm/Kconfig b/arch/x86/kvm/Kconfig > > index 72fa955f4a15..f70a6a1b6814 100644 > > --- a/arch/x86/kvm/Kconfig > > +++ b/arch/x86/kvm/Kconfig

Re: [RFC PATCH v6 01/92] kvm: introduce KVMI (VM introspection subsystem)

2019-08-13 Thread Paolo Bonzini
On 12/08/19 22:20, Sean Christopherson wrote: > The refcounting approach seems a bit backwards, and AFAICT is driven by > implementing unhook via a message, which also seems backwards. I assume > hook and unhook are relatively rare events and not performance critical, > so make those the

Re: [RFC PATCH v6 01/92] kvm: introduce KVMI (VM introspection subsystem)

2019-08-12 Thread Sean Christopherson
On Fri, Aug 09, 2019 at 06:59:16PM +0300, Adalbert Lazăr wrote: > diff --git a/arch/x86/kvm/Kconfig b/arch/x86/kvm/Kconfig > index 72fa955f4a15..f70a6a1b6814 100644 > --- a/arch/x86/kvm/Kconfig > +++ b/arch/x86/kvm/Kconfig > @@ -96,6 +96,13 @@ config KVM_MMU_AUDIT >This option adds a R/W

[RFC PATCH v6 01/92] kvm: introduce KVMI (VM introspection subsystem)

2019-08-09 Thread Adalbert Lazăr
From: Mihai Donțu Besides the pointer to the new structure, the patch adds to the kvm structure a reference counter (the new object will be used by the thread receiving introspection commands/events) and a completion variable (to signal that the VM can be hooked by the introspection tool).