RE: [PATCH v9 0/8] domain context infrastructure

2020-09-29 Thread Lengyel, Tamas
> -Original Message-
> From: Durrant, Paul 
> Sent: Tuesday, September 29, 2020 8:14 AM
> To: Tamas K Lengyel 
> Cc: Lengyel, Tamas ; p...@xen.org; xen-
> de...@lists.xenproject.org; Andrew Cooper ;
> Daniel De Graaf ; George Dunlap
> ; Ian Jackson ; Jan
> Beulich ; Julien Grall ; Marek
> Marczykowski-Górecki ; Roger Pau Monné
> ; Stefano Stabellini ;
> Volodymyr Babchuk ; Wei Liu
> 
> Subject: RE: [PATCH v9 0/8] domain context infrastructure
> 
> > -Original Message-
> > From: Tamas K Lengyel 
> > Sent: 29 September 2020 13:06
> > To: Durrant, Paul 
> > Cc: Lengyel, Tamas ; p...@xen.org;
> > xen-devel@lists.xenproject.org; Andrew Cooper
> > ; Daniel De Graaf ;
> > George Dunlap ; Ian Jackson
> > ; Jan Beulich ; Julien
> > Grall ; Marek Marczykowski-Górecki
> > ; Roger Pau Monné
> > ; Stefano Stabellini ;
> > Volodymyr Babchuk ; Wei Liu
> 
> > Subject: RE: [EXTERNAL] [PATCH v9 0/8] domain context infrastructure
> >
> > CAUTION: This email originated from outside of the organization. Do
> > not click links or open attachments unless you can confirm the sender and
> know the content is safe.
> >
> >
> >
> > On Tue, Sep 29, 2020 at 7:54 AM Durrant, Paul 
> wrote:
> > >
> > > > -Original Message-
> > > > From: Lengyel, Tamas 
> > > > Sent: 28 September 2020 15:17
> > > > To: p...@xen.org; xen-devel@lists.xenproject.org
> > > > Cc: Durrant, Paul ; 'Andrew Cooper'
> > > > ; 'Daniel De Graaf'
> ; 'George Dunlap' ; 'Ian
> Jackson'
> > > > ; 'Jan Beulich' ;
> > > > 'Julien Grall' ; 'Marek Marczykowski-Górecki'
> ; 'Roger Pau Monné'
> > > > ; 'Stefano Stabellini' ;
> 'Volodymyr Babchuk'
> > > > ; 'Wei Liu' 
> > > > Subject: RE: [EXTERNAL] [PATCH v9 0/8] domain context
> > > > infrastructure
> > > >
> > > > CAUTION: This email originated from outside of the organization.
> > > > Do not click links or open attachments unless you can confirm the sender
> and know the content is safe.
> > > >
> > > >
> > > >
> > > > > > Hi Paul,
> > > > > > Could you push a git branch somewhere for this series? I would
> > > > > > like to see this being integrated with VM forking and if its
> > > > > > not too much effort just create the patch for that so that it
> > > > > > could be appended to the
> > > > > series.
> > > > > >
> > > > >
> > > > > Hi Tamas,
> > > > >
> > > > >   Done. See
> > > > > https://xenbits.xen.org/gitweb/?p=people/pauldu/xen.git;a=shortl
> > > > > og;h=refs/h
> > > > > eads/domain-save14
> > > > >
> > > > >   Cheers,
> > > > >
> > > > > Paul
> > > >
> > > > Hi Paul,
> > > > I added a small patch that would save & load the PV context from
> > > > one domain to another that would
> > be
> > > > called during VM forking. Please take a look at
> > > >
> > https://xenbits.xen.org/gitweb/?p=people/tklengyel/xen.git;a=commitdif
> > f;h=1843ca7302e415317fdb9a63b3a4
> > > > d29a385dc766;hp=8149296fdf80c73727e61cea6fe3251aecf8b333. I called
> > > > the function
> > copy_pv_domaincontext
> > > > for now as that seemed like the most appropriate description for
> > > > it. Please let me know if this
> > looks
> > > > good to you. I'm still testing it but if everything checks out it
> > > > would be nice to just append
> > this
> > > > patch to your series.
> > >
> > > Hi Tamas,
> > >
> > >   The code structure appears to be ok... just some cosmetic tweaks:
> > >
> > > - I think you should call the function simply 'copy_domaincontext'
> > > as the idea is that all state
> > (including what is now in hvm context) will be consolidated
> >
> > Sure, I wasn't entirely clear about whether this will be limited to PV
> > context or if it will eventually add the hvm stuff too. Right now I
> > still would have to do that separately.
> >
> > > - The prevailing style in domctl.c AFAICS is that assignments are
> > > mostly not done inside if
> > statements. Personally I thi

RE: [PATCH v9 0/8] domain context infrastructure

2020-09-29 Thread Durrant, Paul
> -Original Message-
> From: Tamas K Lengyel 
> Sent: 29 September 2020 13:06
> To: Durrant, Paul 
> Cc: Lengyel, Tamas ; p...@xen.org; 
> xen-devel@lists.xenproject.org; Andrew
> Cooper ; Daniel De Graaf ; 
> George Dunlap
> ; Ian Jackson ; Jan 
> Beulich ;
> Julien Grall ; Marek Marczykowski-Górecki 
> ; Roger Pau
> Monné ; Stefano Stabellini ; 
> Volodymyr Babchuk
> ; Wei Liu 
> Subject: RE: [EXTERNAL] [PATCH v9 0/8] domain context infrastructure
> 
> CAUTION: This email originated from outside of the organization. Do not click 
> links or open
> attachments unless you can confirm the sender and know the content is safe.
> 
> 
> 
> On Tue, Sep 29, 2020 at 7:54 AM Durrant, Paul  wrote:
> >
> > > -Original Message-
> > > From: Lengyel, Tamas 
> > > Sent: 28 September 2020 15:17
> > > To: p...@xen.org; xen-devel@lists.xenproject.org
> > > Cc: Durrant, Paul ; 'Andrew Cooper' 
> > > ; 'Daniel De
> > > Graaf' ; 'George Dunlap' 
> > > ; 'Ian Jackson'
> > > ; 'Jan Beulich' ; 'Julien 
> > > Grall' ;
> > > 'Marek Marczykowski-Górecki' ; 'Roger 
> > > Pau Monné'
> > > ; 'Stefano Stabellini' ; 
> > > 'Volodymyr Babchuk'
> > > ; 'Wei Liu' 
> > > Subject: RE: [EXTERNAL] [PATCH v9 0/8] domain context infrastructure
> > >
> > > CAUTION: This email originated from outside of the organization. Do not 
> > > click links or open
> > > attachments unless you can confirm the sender and know the content is 
> > > safe.
> > >
> > >
> > >
> > > > > Hi Paul,
> > > > > Could you push a git branch somewhere for this series? I would like to
> > > > > see this being integrated with VM forking and if its not too much
> > > > > effort just create the patch for that so that it could be appended to 
> > > > > the
> > > > series.
> > > > >
> > > >
> > > > Hi Tamas,
> > > >
> > > >   Done. See
> > > > https://xenbits.xen.org/gitweb/?p=people/pauldu/xen.git;a=shortlog;h=refs/h
> > > > eads/domain-save14
> > > >
> > > >   Cheers,
> > > >
> > > > Paul
> > >
> > > Hi Paul,
> > > I added a small patch that would save & load the PV context from one 
> > > domain to another that would
> be
> > > called during VM forking. Please take a look at
> > >
> https://xenbits.xen.org/gitweb/?p=people/tklengyel/xen.git;a=commitdiff;h=1843ca7302e415317fdb9a63b3a4
> > > d29a385dc766;hp=8149296fdf80c73727e61cea6fe3251aecf8b333. I called the 
> > > function
> copy_pv_domaincontext
> > > for now as that seemed like the most appropriate description for it. 
> > > Please let me know if this
> looks
> > > good to you. I'm still testing it but if everything checks out it would 
> > > be nice to just append
> this
> > > patch to your series.
> >
> > Hi Tamas,
> >
> >   The code structure appears to be ok... just some cosmetic tweaks:
> >
> > - I think you should call the function simply 'copy_domaincontext' as the 
> > idea is that all state
> (including what is now in hvm context) will be consolidated
> 
> Sure, I wasn't entirely clear about whether this will be limited to PV
> context or if it will eventually add the hvm stuff too. Right now I
> still would have to do that separately.
> 
> > - The prevailing style in domctl.c AFAICS is that assignments are mostly 
> > not done inside if
> statements. Personally I think this is a good thing.
> 
> I think it cuts down on function sizes when all that is being done
> after an assigment is a NULL-check. No need for a separate line for it
> but I also don't care that much. So if it's more important to whoever
> maintains this to keep the style consistent in this regard I can
> change it.
> 
> >
> >   Once you have something ready to go then I'd be happy to tag it onto my 
> > series if I need to do a
> v10... but I'm currently hoping that won't be necessary.
> 
> I think I'll wait until HVM context is included in the framework as
> well so that we can just switch over everything at once.
> 

It may be a while before I have everything moved over so you may still want to 
go ahead with this patch if the delay is likely to block things. Also, without 
this I assume any records I port over from HVM context (and hence remove the 
save code) are going to cause breakage for VM forking?

  Paul

> Tamas


Re: [PATCH v9 0/8] domain context infrastructure

2020-09-29 Thread Tamas K Lengyel
On Tue, Sep 29, 2020 at 7:54 AM Durrant, Paul  wrote:
>
> > -Original Message-
> > From: Lengyel, Tamas 
> > Sent: 28 September 2020 15:17
> > To: p...@xen.org; xen-devel@lists.xenproject.org
> > Cc: Durrant, Paul ; 'Andrew Cooper' 
> > ; 'Daniel De
> > Graaf' ; 'George Dunlap' ; 
> > 'Ian Jackson'
> > ; 'Jan Beulich' ; 'Julien 
> > Grall' ;
> > 'Marek Marczykowski-Górecki' ; 'Roger Pau 
> > Monné'
> > ; 'Stefano Stabellini' ; 
> > 'Volodymyr Babchuk'
> > ; 'Wei Liu' 
> > Subject: RE: [EXTERNAL] [PATCH v9 0/8] domain context infrastructure
> >
> > CAUTION: This email originated from outside of the organization. Do not 
> > click links or open
> > attachments unless you can confirm the sender and know the content is safe.
> >
> >
> >
> > > > Hi Paul,
> > > > Could you push a git branch somewhere for this series? I would like to
> > > > see this being integrated with VM forking and if its not too much
> > > > effort just create the patch for that so that it could be appended to 
> > > > the
> > > series.
> > > >
> > >
> > > Hi Tamas,
> > >
> > >   Done. See
> > > https://xenbits.xen.org/gitweb/?p=people/pauldu/xen.git;a=shortlog;h=refs/h
> > > eads/domain-save14
> > >
> > >   Cheers,
> > >
> > > Paul
> >
> > Hi Paul,
> > I added a small patch that would save & load the PV context from one domain 
> > to another that would be
> > called during VM forking. Please take a look at
> > https://xenbits.xen.org/gitweb/?p=people/tklengyel/xen.git;a=commitdiff;h=1843ca7302e415317fdb9a63b3a4
> > d29a385dc766;hp=8149296fdf80c73727e61cea6fe3251aecf8b333. I called the 
> > function copy_pv_domaincontext
> > for now as that seemed like the most appropriate description for it. Please 
> > let me know if this looks
> > good to you. I'm still testing it but if everything checks out it would be 
> > nice to just append this
> > patch to your series.
>
> Hi Tamas,
>
>   The code structure appears to be ok... just some cosmetic tweaks:
>
> - I think you should call the function simply 'copy_domaincontext' as the 
> idea is that all state (including what is now in hvm context) will be 
> consolidated

Sure, I wasn't entirely clear about whether this will be limited to PV
context or if it will eventually add the hvm stuff too. Right now I
still would have to do that separately.

> - The prevailing style in domctl.c AFAICS is that assignments are mostly not 
> done inside if statements. Personally I think this is a good thing.

I think it cuts down on function sizes when all that is being done
after an assigment is a NULL-check. No need for a separate line for it
but I also don't care that much. So if it's more important to whoever
maintains this to keep the style consistent in this regard I can
change it.

>
>   Once you have something ready to go then I'd be happy to tag it onto my 
> series if I need to do a v10... but I'm currently hoping that won't be 
> necessary.

I think I'll wait until HVM context is included in the framework as
well so that we can just switch over everything at once.

Tamas



RE: [PATCH v9 0/8] domain context infrastructure

2020-09-29 Thread Durrant, Paul
> -Original Message-
> From: Lengyel, Tamas 
> Sent: 28 September 2020 15:17
> To: p...@xen.org; xen-devel@lists.xenproject.org
> Cc: Durrant, Paul ; 'Andrew Cooper' 
> ; 'Daniel De
> Graaf' ; 'George Dunlap' ; 
> 'Ian Jackson'
> ; 'Jan Beulich' ; 'Julien 
> Grall' ;
> 'Marek Marczykowski-Górecki' ; 'Roger Pau 
> Monné'
> ; 'Stefano Stabellini' ; 
> 'Volodymyr Babchuk'
> ; 'Wei Liu' 
> Subject: RE: [EXTERNAL] [PATCH v9 0/8] domain context infrastructure
> 
> CAUTION: This email originated from outside of the organization. Do not click 
> links or open
> attachments unless you can confirm the sender and know the content is safe.
> 
> 
> 
> > > Hi Paul,
> > > Could you push a git branch somewhere for this series? I would like to
> > > see this being integrated with VM forking and if its not too much
> > > effort just create the patch for that so that it could be appended to the
> > series.
> > >
> >
> > Hi Tamas,
> >
> >   Done. See
> > https://xenbits.xen.org/gitweb/?p=people/pauldu/xen.git;a=shortlog;h=refs/h
> > eads/domain-save14
> >
> >   Cheers,
> >
> > Paul
> 
> Hi Paul,
> I added a small patch that would save & load the PV context from one domain 
> to another that would be
> called during VM forking. Please take a look at
> https://xenbits.xen.org/gitweb/?p=people/tklengyel/xen.git;a=commitdiff;h=1843ca7302e415317fdb9a63b3a4
> d29a385dc766;hp=8149296fdf80c73727e61cea6fe3251aecf8b333. I called the 
> function copy_pv_domaincontext
> for now as that seemed like the most appropriate description for it. Please 
> let me know if this looks
> good to you. I'm still testing it but if everything checks out it would be 
> nice to just append this
> patch to your series.

Hi Tamas,

  The code structure appears to be ok... just some cosmetic tweaks:

- I think you should call the function simply 'copy_domaincontext' as the idea 
is that all state (including what is now in hvm context) will be consolidated
- The prevailing style in domctl.c AFAICS is that assignments are mostly not 
done inside if statements. Personally I think this is a good thing.

  Once you have something ready to go then I'd be happy to tag it onto my 
series if I need to do a v10... but I'm currently hoping that won't be 
necessary.

  Cheers,

Paul

> 
> Thanks,
> Tamas


RE: [PATCH v9 0/8] domain context infrastructure

2020-09-28 Thread Lengyel, Tamas
> > Hi Paul,
> > Could you push a git branch somewhere for this series? I would like to
> > see this being integrated with VM forking and if its not too much
> > effort just create the patch for that so that it could be appended to the
> series.
> >
> 
> Hi Tamas,
> 
>   Done. See
> https://xenbits.xen.org/gitweb/?p=people/pauldu/xen.git;a=shortlog;h=refs/h
> eads/domain-save14
> 
>   Cheers,
> 
> Paul

Hi Paul,
I added a small patch that would save & load the PV context from one domain to 
another that would be called during VM forking. Please take a look at 
https://xenbits.xen.org/gitweb/?p=people/tklengyel/xen.git;a=commitdiff;h=1843ca7302e415317fdb9a63b3a4d29a385dc766;hp=8149296fdf80c73727e61cea6fe3251aecf8b333.
 I called the function copy_pv_domaincontext for now as that seemed like the 
most appropriate description for it. Please let me know if this looks good to 
you. I'm still testing it but if everything checks out it would be nice to just 
append this patch to your series.

Thanks,
Tamas


RE: [PATCH v9 0/8] domain context infrastructure

2020-09-25 Thread Paul Durrant
> -Original Message-
> From: Lengyel, Tamas 
> Sent: 24 September 2020 20:36
> To: Paul Durrant ; xen-devel@lists.xenproject.org
> Cc: Paul Durrant ; Andrew Cooper 
> ; Daniel De Graaf
> ; George Dunlap ; Ian Jackson
> ; Jan Beulich ; Julien Grall 
> ; Marek
> Marczykowski-Górecki ; Roger Pau Monné 
> ;
> Stefano Stabellini ; Volodymyr Babchuk 
> ; Wei Liu
> 
> Subject: RE: [PATCH v9 0/8] domain context infrastructure
> 
> 
> 
> > -Original Message-
> > From: Xen-devel  On Behalf Of Paul
> > Durrant
> > Sent: Thursday, September 24, 2020 9:10 AM
> > To: xen-devel@lists.xenproject.org
> > Cc: Paul Durrant ; Andrew Cooper
> > ; Daniel De Graaf ;
> > George Dunlap ; Ian Jackson
> > ; Jan Beulich ; Julien Grall
> > ; Marek Marczykowski-Górecki
> > ; Roger Pau Monné
> > ; Stefano Stabellini ;
> > Volodymyr Babchuk ; Wei Liu
> > 
> > Subject: [PATCH v9 0/8] domain context infrastructure
> >
> > From: Paul Durrant 
> >
> > Paul Durrant (8):
> >   xen/common: introduce a new framework for save/restore of 'domain'
> > context
> >   xen/common/domctl: introduce XEN_DOMCTL_get/setdomaincontext
> >   tools/misc: add xen-domctx to present domain context
> >   docs/specs: add missing definitions to libxc-migration-stream
> >   docs / tools: specific migration v4 to include DOMAIN_CONTEXT
> >   common/domain: add a domain context record for shared_info...
> >   x86/time: add a domain context record for tsc_info...
> >   tools/libxc: add DOMAIN_CONTEXT records to the migration stream...
> 
> 
> Hi Paul,
> Could you push a git branch somewhere for this series? I would like to see 
> this being integrated with
> VM forking and if its not too much effort just create the patch for that so 
> that it could be appended
> to the series.
> 

Hi Tamas,

  Done. See 
https://xenbits.xen.org/gitweb/?p=people/pauldu/xen.git;a=shortlog;h=refs/heads/domain-save14

  Cheers,

Paul





RE: [PATCH v9 0/8] domain context infrastructure

2020-09-24 Thread Lengyel, Tamas


> -Original Message-
> From: Xen-devel  On Behalf Of Paul
> Durrant
> Sent: Thursday, September 24, 2020 9:10 AM
> To: xen-devel@lists.xenproject.org
> Cc: Paul Durrant ; Andrew Cooper
> ; Daniel De Graaf ;
> George Dunlap ; Ian Jackson
> ; Jan Beulich ; Julien Grall
> ; Marek Marczykowski-Górecki
> ; Roger Pau Monné
> ; Stefano Stabellini ;
> Volodymyr Babchuk ; Wei Liu
> 
> Subject: [PATCH v9 0/8] domain context infrastructure
> 
> From: Paul Durrant 
> 
> Paul Durrant (8):
>   xen/common: introduce a new framework for save/restore of 'domain'
> context
>   xen/common/domctl: introduce XEN_DOMCTL_get/setdomaincontext
>   tools/misc: add xen-domctx to present domain context
>   docs/specs: add missing definitions to libxc-migration-stream
>   docs / tools: specific migration v4 to include DOMAIN_CONTEXT
>   common/domain: add a domain context record for shared_info...
>   x86/time: add a domain context record for tsc_info...
>   tools/libxc: add DOMAIN_CONTEXT records to the migration stream...


Hi Paul,
Could you push a git branch somewhere for this series? I would like to see this 
being integrated with VM forking and if its not too much effort just create the 
patch for that so that it could be appended to the series.

Thanks,
Tamas