qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Bharata B Rao <bharata@linux.vnet.ibm.com>
To: David Gibson <david@gibson.dropbear.id.au>
Cc: qemu-devel@nongnu.org, qemu-ppc@nongnu.org,
	sam.bobroff@au1.ibm.com, rnsastry@linux.vnet.ibm.com
Subject: Re: [Qemu-devel] [RFC PATCH v1 5/6] spapr: Unregister HPT savevm handlers for radix guests
Date: Wed, 17 May 2017 12:48:21 +0530	[thread overview]
Message-ID: <20170517071821.GC3446@in.ibm.com> (raw)
In-Reply-To: <20170517065933.GM15596@umbus.fritz.box>

On Wed, May 17, 2017 at 04:59:33PM +1000, David Gibson wrote:
> On Wed, May 17, 2017 at 09:19:21AM +0530, Bharata B Rao wrote:
> > HPT gets created by default and later when the guest turns out to be
> > a radix guest, the HPT is destroyed when guest does H_REGISTER_PROC_TBL
> > hcall.
> 
> I don't think that's entirely accurate.  At least in some KVM
> configurations, we assume radix first, and only allocate the HPT once
> the guest confirms it is doing hash.

Right, that statement is true for TCG radix guests, will rephrase it.

> 
> > Let HTAB savevm handlers registration and unregistration follow
> > the same model so that we don't end up having unrequired HTAB savevm
> > handlers for radix guests.
> > 
> > This also ensures that HTAB savevm handlers seemlessly get destroyed and
> > recreated like HTAB itself when hash guest reboots.
> > 
> > Signed-off-by: Bharata B Rao <bharata@linux.vnet.ibm.com>
> > ---
> >  hw/ppc/spapr.c         | 15 +++++++++++++--
> >  hw/ppc/spapr_hcall.c   |  1 +
> >  include/hw/ppc/spapr.h |  2 ++
> >  3 files changed, 16 insertions(+), 2 deletions(-)
> > 
> > diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c
> > index 521eef1..05abfc1 100644
> > --- a/hw/ppc/spapr.c
> > +++ b/hw/ppc/spapr.c
> > @@ -1237,6 +1237,7 @@ static void spapr_reallocate_hpt(sPAPRMachineState *spapr, int shift,
> >  
> >      /* Clean up any HPT info from a previous boot */
> >      spapr_free_hpt(spapr);
> > +    spapr_htab_savevm_unregister(spapr);
> 
> I'd prefer that the unregister be folded into spapr_free_hpt().
> Basically we want calls that create or remove the HPT and handle
> everything - allocation/freeing if necessary, informing KVM if
> necessary, and registering/deregistering the savevm handlers if
> necesary.
> 
> I think that will also remove the need for the trivial
> spapr_htab_savevm_{un,}register() wrappers.

Sure, will consolidate this in the next version.

Regards,
Bharata.

  reply	other threads:[~2017-05-17  7:19 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-17  3:49 [Qemu-devel] [RFC PATCH v1 0/6] ppc/spapr: Fix migration of radix guests Bharata B Rao
2017-05-17  3:49 ` [Qemu-devel] [RFC PATCH v1 1/6] migration: Fix unregister_savevm() Bharata B Rao
2017-05-17  6:43   ` David Gibson
2017-05-17 10:12     ` Bharata B Rao
2017-05-17  3:49 ` [Qemu-devel] [RFC PATCH v1 2/6] migration: Introduce unregister_savevm_live() Bharata B Rao
2017-05-17  6:45   ` David Gibson
2017-05-17  7:21     ` Bharata B Rao
2017-05-17  3:49 ` [Qemu-devel] [RFC PATCH v1 3/6] spapr: Make h_register_process_table hcall flags global Bharata B Rao
2017-05-17  3:49 ` [Qemu-devel] [RFC PATCH v1 4/6] spapr: Consolidate HPT freeing code into a routine Bharata B Rao
2017-05-17  6:55   ` David Gibson
2017-05-17  3:49 ` [Qemu-devel] [RFC PATCH v1 5/6] spapr: Unregister HPT savevm handlers for radix guests Bharata B Rao
2017-05-17  6:59   ` David Gibson
2017-05-17  7:18     ` Bharata B Rao [this message]
2017-05-17  7:23       ` David Gibson
2017-05-17  3:49 ` [Qemu-devel] [RFC PATCH v1 6/6] spapr: Fix migration of Radix guests Bharata B Rao
2017-05-17  7:00   ` David Gibson
2017-05-17  7:15     ` Bharata B Rao
2017-05-17  7:20       ` David Gibson
2017-05-18  5:03         ` Bharata B Rao
2017-05-18  5:50           ` David Gibson

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=20170517071821.GC3446@in.ibm.com \
    --to=bharata@linux.vnet.ibm.com \
    --cc=david@gibson.dropbear.id.au \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-ppc@nongnu.org \
    --cc=rnsastry@linux.vnet.ibm.com \
    --cc=sam.bobroff@au1.ibm.com \
    /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).