xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Isaila Alexandru <aisaila@bitdefender.com>
To: "Roger Pau Monné" <roger.pau@citrix.com>
Cc: wei.liu2@citrix.com, andrew.cooper3@citrix.com,
	ian.jackson@eu.citrix.com, xen-devel@lists.xen.org,
	paul.durrant@citrix.com, jbeulich@suse.com
Subject: Re: [PATCH v17 13/13] x86/domctl: Don't pause the whole domain if only getting vcpu state
Date: Wed, 29 Aug 2018 17:02:33 +0300	[thread overview]
Message-ID: <1535551353.20997.18.camel@bitdefender.com> (raw)
In-Reply-To: <1534950925.20997.8.camel@bitdefender.com>

On Mi, 2018-08-22 at 18:15 +0300, Isaila Alexandru wrote:
> On Mi, 2018-08-22 at 16:41 +0200, Roger Pau Monné wrote:
> > 
> > On Wed, Aug 22, 2018 at 05:02:43PM +0300, Alexandru Isaila wrote:
> > > 
> > > 
> > > This patch is focused on moving changing hvm_save_one() to save
> > > one
> > > typecode from one vcpu and now that the save functions get data
> > > from a
> > > single vcpu we can pause the specific vcpu instead of the domain.
> > With this infrastructure added allowing to save a single instance
> > of
> > a
> > specific device I wonder if you would like to add a user to the
> > code
> > in the tree.
> > 
> > If you look at vcpu_hvm in tools/libxc/xc_dom_x86.c it saves the
> > full
> > domain context just to get the CPU and the MTRR state of VCPU#0. Do
> > you think you could switch this code to use the newly introduced
> > machinery to save a single instance of a specific type?
> Sure, I will add a tool patch at the end of the series

Hi Roger, 

Is this urgent to be in this series? If not I will add a new patch
after it is all in. 

Thanks, 
Alex
> > 
> > 
> > > 
> > > 
> > > Signed-off-by: Alexandru Isaila <aisaila@bitdefender.com>
> > > 
> > > ---
> > > Changes since V15:
> > > 	- Moved pause/unpause calls into hvm_save_one()
> > > 	- Re-add the loop in hvm_save_one().
> > > ---
> > >  xen/arch/x86/domctl.c   |  2 --
> > >  xen/arch/x86/hvm/save.c | 12 ++++++++++--
> > >  2 files changed, 10 insertions(+), 4 deletions(-)
> > > 
> > > diff --git a/xen/arch/x86/domctl.c b/xen/arch/x86/domctl.c
> > > index 8fbbf3a..cb53980 100644
> > > --- a/xen/arch/x86/domctl.c
> > > +++ b/xen/arch/x86/domctl.c
> > > @@ -591,12 +591,10 @@ long arch_do_domctl(
> > >               !is_hvm_domain(d) )
> > >              break;
> > >  
> > > -        domain_pause(d);
> > >          ret = hvm_save_one(d, domctl->u.hvmcontext_partial.type,
> > >                             domctl-
> > > >u.hvmcontext_partial.instance,
> > >                             domctl->u.hvmcontext_partial.buffer,
> > >                             &domctl->u.hvmcontext_partial.bufsz);
> > > -        domain_unpause(d);
> > >  
> > >          if ( !ret )
> > >              copyback = true;
> > > diff --git a/xen/arch/x86/hvm/save.c b/xen/arch/x86/hvm/save.c
> > > index 49741e0..2d35f17 100644
> > > --- a/xen/arch/x86/hvm/save.c
> > > +++ b/xen/arch/x86/hvm/save.c
> > > @@ -149,12 +149,15 @@ int hvm_save_one(struct domain *d, unsigned
> > > int typecode, unsigned int instance,
> > >          instance >= d->max_vcpus )
> > >          return -ENOENT;
> > >      ctxt.size = hvm_sr_handlers[typecode].size;
> > > -    if ( hvm_sr_handlers[typecode].kind == HVMSR_PER_VCPU )
> > > -        ctxt.size *= d->max_vcpus;
> > This chunk seems to belong to a different patch?
> > 
> > The change just mentions pausing a vpcu instead of the whole
> > domain,
> > but the size of the save context doesn't depend on whether the
> > whole
> > domain is paused vs a single vcpu is paused.
> Right, git rebase did not report any error so it tricked me. I will
> have that removed from this patch. 
> 
> Thanks, 
> Alex
> 
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xenproject.org
> https://lists.xenproject.org/mailman/listinfo/xen-devel

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

  reply	other threads:[~2018-08-29 14:02 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-22 14:02 [PATCH v17 00/14] x86/domctl: Save info for one vcpu instance Alexandru Isaila
2018-08-22 14:02 ` [PATCH v17 01/13] x86/cpu: Introduce vmce_save_vcpu_ctxt_one() func Alexandru Isaila
2018-08-22 14:02 ` [PATCH v17 02/13] x86/hvm: Introduce hvm_save_tsc_adjust_one() func Alexandru Isaila
2018-08-22 14:02 ` [PATCH v17 03/13] x86/hvm: Introduce hvm_save_cpu_ctxt_one func Alexandru Isaila
2018-08-28 15:33   ` Razvan Cojocaru
2018-08-28 15:43     ` Jan Beulich
2018-08-22 14:02 ` [PATCH v17 04/13] x86/hvm: Introduce hvm_save_cpu_xsave_states_one Alexandru Isaila
2018-08-22 14:02 ` [PATCH v17 05/13] x86/hvm: Introduce hvm_save_cpu_msrs_one func Alexandru Isaila
2018-08-22 14:02 ` [PATCH v17 06/13] x86/hvm: Introduce hvm_save_mtrr_msr_one func Alexandru Isaila
2018-08-22 14:02 ` [PATCH v17 07/13] x86/hvm: Introduce viridian_save_vcpu_ctxt_one() func Alexandru Isaila
2018-08-22 14:02 ` [PATCH v17 08/13] x86/hvm: Introduce lapic_save_hidden_one Alexandru Isaila
2018-08-22 14:02 ` [PATCH v17 09/13] x86/hvm: Introduce lapic_save_regs_one func Alexandru Isaila
2018-08-22 14:02 ` [PATCH v17 10/13] x86/hvm: Add handler for save_one funcs Alexandru Isaila
2018-08-22 14:02 ` [PATCH v17 11/13] x86/domctl: Use hvm_save_vcpu_handler Alexandru Isaila
2018-08-22 14:28   ` Roger Pau Monné
2018-08-27  8:39     ` Jan Beulich
2018-08-22 14:02 ` [PATCH v17 12/13] x86/hvm: Remove redundant save functions Alexandru Isaila
2018-08-22 15:04   ` Roger Pau Monné
2018-08-22 15:22     ` Isaila Alexandru
2018-08-22 15:26       ` Roger Pau Monné
2018-08-28 15:27   ` Jan Beulich
2018-08-22 14:02 ` [PATCH v17 13/13] x86/domctl: Don't pause the whole domain if only getting vcpu state Alexandru Isaila
2018-08-22 14:41   ` Roger Pau Monné
2018-08-22 15:15     ` Isaila Alexandru
2018-08-29 14:02       ` Isaila Alexandru [this message]
2018-08-29 14:13         ` Jan Beulich
2018-08-31 13:56           ` Isaila Alexandru
2018-08-31 15:23             ` Jan Beulich
2018-09-03 14:36             ` Roger Pau Monné
2018-09-03 14:42               ` Isaila Alexandru
2018-09-03 14:56                 ` Roger Pau Monné

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1535551353.20997.18.camel@bitdefender.com \
    --to=aisaila@bitdefender.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=ian.jackson@eu.citrix.com \
    --cc=jbeulich@suse.com \
    --cc=paul.durrant@citrix.com \
    --cc=roger.pau@citrix.com \
    --cc=wei.liu2@citrix.com \
    --cc=xen-devel@lists.xen.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).