Re: [Xen-devel] [PATCH v2 07/10] vm_event: Add vm_event_ng interface

2019-07-31 Thread Jan Beulich
On 31.07.2019 14:53, Petre Ovidiu PIRCALABU wrote: > On Thu, 2019-07-18 at 14:44 +, Jan Beulich wrote: >> On 18.07.2019 15:59, Petre Ovidiu PIRCALABU wrote: >>> Before using xenforeignmemory_map_resource I investigated several >>> different approaches: >>> - Allocate the memory in hypervisor

Re: [Xen-devel] [PATCH v2 07/10] vm_event: Add vm_event_ng interface

2019-07-31 Thread Petre Ovidiu PIRCALABU
On Thu, 2019-07-18 at 14:44 +, Jan Beulich wrote: > On 18.07.2019 15:59, Petre Ovidiu PIRCALABU wrote: > > Before using xenforeignmemory_map_resource I investigated several > > different approaches: > > - Allocate the memory in hypervisor and xc_map_foreign_pages > > (doesn't > > work because

Re: [Xen-devel] [PATCH v2 07/10] vm_event: Add vm_event_ng interface

2019-07-22 Thread Petre Ovidiu PIRCALABU
On Mon, 2019-07-22 at 07:59 +, Jan Beulich wrote: > On 19.07.2019 19:40, Petre Ovidiu PIRCALABU wrote: > > On Fri, 2019-07-19 at 12:59 +, Jan Beulich wrote: > > > On 19.07.2019 14:37, Paul Durrant wrote: > > > > > From: Jan Beulich > > > > > Sent: 19 July 2019 13:32 > > > > > > > > > >

Re: [Xen-devel] [PATCH v2 07/10] vm_event: Add vm_event_ng interface

2019-07-22 Thread Jan Beulich
On 19.07.2019 19:40, Petre Ovidiu PIRCALABU wrote: > On Fri, 2019-07-19 at 12:59 +, Jan Beulich wrote: >> On 19.07.2019 14:37, Paul Durrant wrote: From: Jan Beulich Sent: 19 July 2019 13:32 On 19.07.2019 14:11, Paul Durrant wrote: >> -Original Message- >>

Re: [Xen-devel] [PATCH v2 07/10] vm_event: Add vm_event_ng interface

2019-07-22 Thread Paul Durrant
> -Original Message- > From: Petre Ovidiu PIRCALABU > Sent: 19 July 2019 18:40 > To: Jan Beulich ; Paul Durrant ; > Andrew Cooper > > Cc: JulienGrall ; Alexandru Stefan ISAILA > ; Razvan > Cojocaru ; George Dunlap > ; Ian Jackson > ; Roger Pau Monne ; Stefano > Stabellini > ;

Re: [Xen-devel] [PATCH v2 07/10] vm_event: Add vm_event_ng interface

2019-07-19 Thread Petre Ovidiu PIRCALABU
On Fri, 2019-07-19 at 12:59 +, Jan Beulich wrote: > On 19.07.2019 14:37, Paul Durrant wrote: > > > From: Jan Beulich > > > Sent: 19 July 2019 13:32 > > > > > > On 19.07.2019 14:11, Paul Durrant wrote: > > > > > -Original Message- > > > > > From: Petre Ovidiu PIRCALABU > > > > >

Re: [Xen-devel] [PATCH v2 07/10] vm_event: Add vm_event_ng interface

2019-07-19 Thread Jan Beulich
On 19.07.2019 14:37, Paul Durrant wrote: >> From: Jan Beulich >> Sent: 19 July 2019 13:32 >> >> On 19.07.2019 14:11, Paul Durrant wrote: -Original Message- From: Petre Ovidiu PIRCALABU Sent: 19 July 2019 12:24 Sorry, my mistake. I meant to say it's shared with

Re: [Xen-devel] [PATCH v2 07/10] vm_event: Add vm_event_ng interface

2019-07-19 Thread Paul Durrant
> -Original Message- > From: Jan Beulich > Sent: 19 July 2019 13:32 > To: Paul Durrant > Cc: 'Petre Ovidiu PIRCALABU' ; JulienGrall > ; > Alexandru Stefan ISAILA ; Razvan Cojocaru > ; Andrew > Cooper ; George Dunlap ; > Ian Jackson > ; Roger Pau Monne ; Stefano > Stabellini > ;

Re: [Xen-devel] [PATCH v2 07/10] vm_event: Add vm_event_ng interface

2019-07-19 Thread Jan Beulich
On 19.07.2019 14:11, Paul Durrant wrote: >> -Original Message- >> From: Petre Ovidiu PIRCALABU >> Sent: 19 July 2019 12:24 >> >> On Fri, 2019-07-19 at 08:26 +, Paul Durrant wrote: From: Jan Beulich Sent: 19 July 2019 09:22 On 19.07.2019 09:56, Paul Durrant wrote:

Re: [Xen-devel] [PATCH v2 07/10] vm_event: Add vm_event_ng interface

2019-07-19 Thread Paul Durrant
> -Original Message- > From: Petre Ovidiu PIRCALABU > Sent: 19 July 2019 12:24 > To: Paul Durrant ; 'Jan Beulich' > Cc: JulienGrall ; Alexandru Stefan ISAILA > ; Razvan > Cojocaru ; Andrew Cooper > ; George Dunlap > ; Ian Jackson ; Roger Pau > Monne > ; Stefano Stabellini ; >

Re: [Xen-devel] [PATCH v2 07/10] vm_event: Add vm_event_ng interface

2019-07-19 Thread Petre Ovidiu PIRCALABU
On Fri, 2019-07-19 at 08:26 +, Paul Durrant wrote: > > -Original Message- > > From: Jan Beulich > > Sent: 19 July 2019 09:22 > > To: Paul Durrant > > Cc: 'Petre Ovidiu PIRCALABU' ; > > JulienGrall ; > > Alexandru Stefan ISAILA ; Razvan Cojocaru > > ; Andrew > > Cooper ; George Dunlap

Re: [Xen-devel] [PATCH v2 07/10] vm_event: Add vm_event_ng interface

2019-07-19 Thread Paul Durrant
> -Original Message- > From: Jan Beulich > Sent: 19 July 2019 09:22 > To: Paul Durrant > Cc: 'Petre Ovidiu PIRCALABU' ; JulienGrall > ; > Alexandru Stefan ISAILA ; Razvan Cojocaru > ; Andrew > Cooper ; George Dunlap ; > Ian Jackson > ; Roger Pau Monne ; Stefano > Stabellini > ;

Re: [Xen-devel] [PATCH v2 07/10] vm_event: Add vm_event_ng interface

2019-07-19 Thread Jan Beulich
On 19.07.2019 09:56, Paul Durrant wrote: >> From: Petre Ovidiu PIRCALABU >> Sent: 18 July 2019 14:59 >> >> So, at this point the most promising solution is allocating the memory >> in XEN, sharing it with ID using share_xen_page_with_guest, and mapping >> it with xenforeignmemory_map_resource

Re: [Xen-devel] [PATCH v2 07/10] vm_event: Add vm_event_ng interface

2019-07-19 Thread Paul Durrant
> -Original Message- > From: Petre Ovidiu PIRCALABU > Sent: 18 July 2019 14:59 > To: Jan Beulich ; Paul Durrant > Cc: JulienGrall ; Alexandru Stefan ISAILA > ; Razvan > Cojocaru ; Andrew Cooper > ; Roger Pau Monne > ; George Dunlap ; Ian Jackson > ; Stefano Stabellini ; >

Re: [Xen-devel] [PATCH v2 07/10] vm_event: Add vm_event_ng interface

2019-07-18 Thread Petre Ovidiu PIRCALABU
On Thu, 2019-07-18 at 14:44 +, Jan Beulich wrote: > On 18.07.2019 15:59, Petre Ovidiu PIRCALABU wrote: > > Before using xenforeignmemory_map_resource I investigated several > > different approaches: > > - Allocate the memory in hypervisor and xc_map_foreign_pages > > (doesn't > > work because

Re: [Xen-devel] [PATCH v2 07/10] vm_event: Add vm_event_ng interface

2019-07-18 Thread Jan Beulich
On 18.07.2019 15:59, Petre Ovidiu PIRCALABU wrote: > Before using xenforeignmemory_map_resource I investigated several > different approaches: > - Allocate the memory in hypervisor and xc_map_foreign_pages (doesn't > work because you cannot "foreignmap" pages of your own domain. > - Allocate the

Re: [Xen-devel] [PATCH v2 07/10] vm_event: Add vm_event_ng interface

2019-07-18 Thread Petre Ovidiu PIRCALABU
On Wed, 2019-07-17 at 16:32 +, Jan Beulich wrote: > On 17.07.2019 16:41, Petre Ovidiu PIRCALABU wrote: > > On Wed, 2019-07-17 at 10:06 +, Jan Beulich wrote: > > > On 16.07.2019 19:06, Petre Pircalabu wrote: > > > > +static void vm_event_channels_free_buffer(struct > > > >

Re: [Xen-devel] [PATCH v2 07/10] vm_event: Add vm_event_ng interface

2019-07-17 Thread Paul Durrant
> -Original Message- [snip] > >>> +} > >>> + > >>> +if ( !vm_event_check(ved) ) > >>> +return -EINVAL; > >>> + > >>> +if ( frame != 0 || nr_frames != to_channels(ved)->nr_frames ) > >>> +return -EINVAL; > >> > >> Is there a particular reason for this

Re: [Xen-devel] [PATCH v2 07/10] vm_event: Add vm_event_ng interface

2019-07-17 Thread Jan Beulich
On 17.07.2019 16:41, Petre Ovidiu PIRCALABU wrote: > On Wed, 2019-07-17 at 10:06 +, Jan Beulich wrote: >> On 16.07.2019 19:06, Petre Pircalabu wrote: >>> +static void vm_event_channels_free_buffer(struct >>> vm_event_channels_domain *impl) >>>{ >>> -

Re: [Xen-devel] [PATCH v2 07/10] vm_event: Add vm_event_ng interface

2019-07-17 Thread Petre Ovidiu PIRCALABU
On Wed, 2019-07-17 at 16:42 +0300, Alexandru Stefan ISAILA wrote: > > + > > +out: > > +rc2 = xc_domain_unpause(xch, domain_id); > > +if ( rc1 || rc2 ) > > +{ > > +if ( rc2 ) > > +PERROR("Unable to pause domain\n"); > > + > > +if ( rc1 == 0 ) > > +

Re: [Xen-devel] [PATCH v2 07/10] vm_event: Add vm_event_ng interface

2019-07-17 Thread Petre Ovidiu PIRCALABU
On Wed, 2019-07-17 at 10:06 +, Jan Beulich wrote: > On 16.07.2019 19:06, Petre Pircalabu wrote: > > +static void vm_event_channels_free_buffer(struct > > vm_event_channels_domain *impl) > > { > > -vm_event_ring_resume(to_ring(v->domain->vm_event_monitor)); > > +int i; > > + > > +

Re: [Xen-devel] [PATCH v2 07/10] vm_event: Add vm_event_ng interface

2019-07-17 Thread Alexandru Stefan ISAILA
> + > +out: > +rc2 = xc_domain_unpause(xch, domain_id); > +if ( rc1 || rc2 ) > +{ > +if ( rc2 ) > +PERROR("Unable to pause domain\n"); > + > +if ( rc1 == 0 ) > +rc1 = rc2; You can use !rc1 here. > +} > + > +return rc1; > +} > + > +int

Re: [Xen-devel] [PATCH v2 07/10] vm_event: Add vm_event_ng interface

2019-07-17 Thread Jan Beulich
On 17.07.2019 14:38, Tamas K Lengyel wrote: >> I've omitted all style comments (formatting, plain vs unsigned int >> etc) - I'd like to leave that to the VM event maintainers. > > Do we have an automated way to check for style issues, like astyle? We don't; there is some work underway towards

Re: [Xen-devel] [PATCH v2 07/10] vm_event: Add vm_event_ng interface

2019-07-17 Thread Tamas K Lengyel
> I've omitted all style comments (formatting, plain vs unsigned int > etc) - I'd like to leave that to the VM event maintainers. Do we have an automated way to check for style issues, like astyle? In my projects I integrate that into my Travis checks so I don't have to do that manually (see

Re: [Xen-devel] [PATCH v2 07/10] vm_event: Add vm_event_ng interface

2019-07-17 Thread Petre Ovidiu PIRCALABU
On Tue, 2019-07-16 at 15:13 -0600, Tamas K Lengyel wrote: > On Tue, Jul 16, 2019 at 11:06 AM Petre Pircalabu > wrote: > > > > In high throughput introspection scenarios where lots of monitor > > vm_events are generated, the ring buffer can fill up before the > > monitor > > application gets a

Re: [Xen-devel] [PATCH v2 07/10] vm_event: Add vm_event_ng interface

2019-07-17 Thread Jan Beulich
On 16.07.2019 19:06, Petre Pircalabu wrote: > +static void vm_event_channels_free_buffer(struct vm_event_channels_domain > *impl) > { > -vm_event_ring_resume(to_ring(v->domain->vm_event_monitor)); > +int i; > + > +vunmap(impl->slots); > +impl->slots = NULL; > + > +for ( i =

Re: [Xen-devel] [PATCH v2 07/10] vm_event: Add vm_event_ng interface

2019-07-16 Thread Tamas K Lengyel
On Tue, Jul 16, 2019 at 11:06 AM Petre Pircalabu wrote: > > In high throughput introspection scenarios where lots of monitor > vm_events are generated, the ring buffer can fill up before the monitor > application gets a chance to handle all the requests thus blocking > other vcpus which will have

[Xen-devel] [PATCH v2 07/10] vm_event: Add vm_event_ng interface

2019-07-16 Thread Petre Pircalabu
In high throughput introspection scenarios where lots of monitor vm_events are generated, the ring buffer can fill up before the monitor application gets a chance to handle all the requests thus blocking other vcpus which will have to wait for a slot to become available. This patch adds support