All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alexandru Stefan ISAILA <aisaila@bitdefender.com>
To: "JBeulich@suse.com" <JBeulich@suse.com>,
	"paul.durrant@citrix.com" <paul.durrant@citrix.com>
Cc: "Ian.Jackson@citrix.com" <Ian.Jackson@citrix.com>,
	"andrew.cooper3@citrix.com" <andrew.cooper3@citrix.com>,
	"wei.liu2@citrix.com" <wei.liu2@citrix.com>,
	"xen-devel@lists.xen.org" <xen-devel@lists.xen.org>
Subject: Re: [PATCH v7 08/15] x86/cpu: Remove loop form vmce_save_vcpu_ctxt() func
Date: Wed, 20 Jun 2018 08:56:00 +0000	[thread overview]
Message-ID: <1529484960.4608.16.camel@bitdefender.com> (raw)
In-Reply-To: <5B1A95D702000078001C9878@prv1-mh.provo.novell.com>

On Vi, 2018-06-08 at 08:42 -0600, Jan Beulich wrote:
> >
> > >
> > > >
> > > > On 08.06.18 at 14:46, <Paul.Durrant@citrix.com> wrote:
> > > From: Alexandru Stefan ISAILA [mailto:aisaila@bitdefender.com]
> > > Sent: 08 June 2018 09:51
> > > On Vi, 2018-06-08 at 08:33 +0000, Paul Durrant wrote:
> > > >
> > > > There's a typo in the commit title (s/form/from), but I don't
> > > > understand what you're doing here. You set v to NULL above and
> > > > dereference it below. AFAICT, until patch #15 is applied
> > > > context
> > > > saving will be completely broken.
> > > Yes, this is true, but it could't find a better way to split the
> > > last
> > > patch further.
> > Can't you do it (something like) this way?
> >
> > - Each of patches #1 - #7 register their save_one handler via an
> > extra arg
> > to HVM_REGISTER_SAVE_RESTORE (and hence extra field in
> > hvm_sr_handlers)
> I think either there should be a 1st patch introducing the new field
> and macro
> arg, or patches 1...7 remain the way they are and patch 8 introduces
> and
> uses that field without otherwise touching the handlers. In any event
> all later
> patches then shift down by one in numbering; apart from the numbering
> I
> mostly agree with ...
>
> >
> > - Move (current) patch #15 to patch #8 but have it call the
> > save_one
> > handlers
> > - Then have 7 patches that remove the now redundant save handlers,
> > renaming
> > XXX_save_one to XXX_save and passing NULL as the now useless
> > argument to
> > HVM_REGISTER_SAVE_RESTORE
> > - Then have a final patch deleting the useless arg from
> > HVM_REGISTER_SAVE_RESTORE, cleaning up the callers and also
> > renaming the
> > field in hvm_sr_handlers from save_one to save.
> ... all of this. However, I have to admit I'm not certain yet whether
> the
> extra argument can indeed go away again in the end: There are save
> records which aren't per-vCPU, and I'm not convinced we want to alter
> their handling.
>
So the final plan for the series is like this:
- Base everything on Roger's series
- Keep patches 1-7
- Have patch 8 add an extra arg to HVM_REGISTER_SAVE_RESTORE
and hvm_sr_handlers
- Have patch 9 like the patch 15 form now and have it call the
save_one handlers
- Have the next patches remove the redundant save handlers and
rename the save one
- The final patch should remove the extra arg. This one can be
kept or not.

Is this how I should go? Any thoughts are appreciated.

Thanks,
Alex


________________________
This email was scanned by Bitdefender
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

  reply	other threads:[~2018-06-20  8:56 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-07 14:59 [PATCH v7 00/15] x86/domctl: Save info for one vcpu instance Alexandru Isaila
2018-06-07 14:59 ` [PATCH v7 01/15] x86/cpu: Introduce vmce_save_vcpu_ctxt_one() func Alexandru Isaila
2018-06-08 14:45   ` Jan Beulich
2018-06-07 14:59 ` [PATCH v7 02/15] x86/hvm: Introduce hvm_save_tsc_adjust_one() func Alexandru Isaila
2018-06-07 14:59 ` [PATCH v7 03/15] x86/hvm: Introduce hvm_save_cpu_ctxt_one func Alexandru Isaila
2018-06-08 14:47   ` Jan Beulich
2018-06-07 14:59 ` [PATCH v7 04/15] x86/hvm: Introduce hvm_save_cpu_xsave_states_one Alexandru Isaila
2018-06-08 14:49   ` Jan Beulich
2018-06-07 14:59 ` [PATCH v7 05/15] x86/hvm: Introduce hvm_save_cpu_msrs_one func Alexandru Isaila
2018-06-08 14:50   ` Jan Beulich
2018-06-07 14:59 ` [PATCH v7 06/15] x86/hvm: Introduce hvm_save_mtrr_msr_one func Alexandru Isaila
2018-06-08 14:57   ` Jan Beulich
2018-06-07 14:59 ` [PATCH v7 07/15] x86/hvm: Introduce viridian_save_vcpu_ctxt_one() func Alexandru Isaila
2018-06-08  8:27   ` Paul Durrant
2018-06-07 14:59 ` [PATCH v7 08/15] x86/cpu: Remove loop form vmce_save_vcpu_ctxt() func Alexandru Isaila
2018-06-08  8:33   ` Paul Durrant
2018-06-08  8:51     ` Alexandru Stefan ISAILA
2018-06-08 12:46       ` Paul Durrant
2018-06-08 14:42         ` Jan Beulich
2018-06-20  8:56           ` Alexandru Stefan ISAILA [this message]
2018-06-21  7:39             ` Jan Beulich
2018-06-21  7:47               ` Alexandru Stefan ISAILA
2018-06-21  8:15                 ` Jan Beulich
2018-06-07 14:59 ` [PATCH v7 09/15] x86/hvm: Remove loop from hvm_save_tsc_adjust() func Alexandru Isaila
2018-06-07 14:59 ` [PATCH v7 10/15] x86/hvm: Remove loop from hvm_save_cpu_ctxt func Alexandru Isaila
2018-06-07 14:59 ` [PATCH v7 11/15] x86/hvm: Remove loop from hvm_save_cpu_xsave_states Alexandru Isaila
2018-06-07 14:59 ` [PATCH v7 12/15] x86/hvm: Remove loop from hvm_save_cpu_msrs func Alexandru Isaila
2018-06-07 14:59 ` [PATCH v7 13/15] x86/hvm: Remove loop from hvm_save_mtrr_msr func Alexandru Isaila
2018-06-07 14:59 ` [PATCH v7 14/15] x86/hvm: Remove loop from viridian_save_vcpu_ctxt() func Alexandru Isaila
2018-06-07 14:59 ` [PATCH v7 15/15] x86/domctl: Don't pause the whole domain if only getting vcpu state Alexandru Isaila

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=1529484960.4608.16.camel@bitdefender.com \
    --to=aisaila@bitdefender.com \
    --cc=Ian.Jackson@citrix.com \
    --cc=JBeulich@suse.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=paul.durrant@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.