All of lore.kernel.org
 help / color / mirror / Atom feed
From: alvise rigo <a.rigo@virtualopensystems.com>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: "tech@virtualopensystems.com" <tech@virtualopensystems.com>,
	QEMU Developers <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] [RFC 4/4] Relevant changes to enable KVM to TCG migration
Date: Wed, 26 Feb 2014 11:02:19 +0100	[thread overview]
Message-ID: <CAH47eN2aO=Uyo7Dk7ZmjMhXwxNrCB-oRMKV2cf6yrtoXZSHUsg@mail.gmail.com> (raw)
In-Reply-To: <CAFEAcA8D0y=yys9_+v1MAtVxsBppwCwXau00EH0_xo05HdWzAg@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 3519 bytes --]

I agree that this is a sort of workaround, but it seems to me that a
proper solution is not possible without changing the ideas contemplated
now in the migration code.
Are we willing to accept some major changes in the code to embrace
this type of migration?

Thanks,
alvise


On Tue, Feb 25, 2014 at 7:25 PM, Peter Maydell <peter.maydell@linaro.org>wrote:

> On 25 February 2014 16:52, Alvise Rigo <a.rigo@virtualopensystems.com>
> wrote:
> > CPUARMState:
> > * added adfsr cp register.
> > * added aifsr cp register.
> > These registers have been added because they are migrated by KVM. This
> prevents
> > the migration from failing when trying to copy their values.
>
> This should be done in a separate patch.
>
> > ARMCPRegInfo:
> > * added a pointer to the parent that generated the register (if any).
> > * a flag to inform that we have already copied the value of the register:
> >   this prevents the register from being overwritten by the parent
> register
> >   value, which could be not set.
> >
> > helper.c:
> > * added mechanism to track the cp register "parent".
> > * compare_cpreg_array(): compare the incoming cp registers with the
> >   cpreg_list keeping a list of the registers that do not succeeded the
> >   match.
> > * handle_cpreg_kvm2tcg_migration(): try to solve the mismatch of
> >   cp registers coming from KVM; without this additional step the
> >   migration would fail even if it's feasible.
> >
> > Signed-off-by: Alvise Rigo <a.rigo@virtualopensystems.com>
> > ---
> >  target-arm/cpu.h     |  43 +++++++++++++
> >  target-arm/helper.c  | 167
> +++++++++++++++++++++++++++++++++++++++++++++++++--
> >  target-arm/machine.c |  46 ++++++++++----
> >  3 files changed, 238 insertions(+), 18 deletions(-)
> >
> > diff --git a/target-arm/cpu.h b/target-arm/cpu.h
> > index 3c8a2db..a97246d 100644
> > --- a/target-arm/cpu.h
> > +++ b/target-arm/cpu.h
> > @@ -184,6 +184,8 @@ typedef struct CPUARMState {
> >                          MPU write buffer control.  */
> >          uint32_t c5_insn; /* Fault status registers.  */
> >          uint32_t c5_data;
> > +        uint32_t c5_adfsr;
> > +        uint32_t c5_aifsr;
> >          uint32_t c6_region[8]; /* MPU base/size registers.  */
> >          uint32_t c6_insn; /* Fault address registers.  */
> >          uint32_t c6_data;
> > @@ -197,6 +199,7 @@ typedef struct CPUARMState {
> >          uint32_t c9_pmxevtyper; /* perf monitor event type */
> >          uint32_t c9_pmuserenr; /* perf monitor user enable */
> >          uint32_t c9_pminten; /* perf monitor interrupt enables */
> > +        uint32_t c9_l2ctlr; /* L2 Control Register */
> >          uint32_t c12_vbar; /* vector base address register */
> >          uint32_t c13_fcse; /* FCSE PID.  */
> >          uint32_t c13_context; /* Context ID.  */
> > @@ -867,6 +870,15 @@ struct ARMCPRegInfo {
> >      uint8_t opc0;
> >      uint8_t opc1;
> >      uint8_t opc2;
> > +    /* When migrating this flag tells if the register's value has
> already
> > +     * been copied. This is used in some unlikely cases where KVM
> migrates
> > +     * a register that in TCG is generated by a wildcarded or
> > +     * ARM_CP_STATE_BOTH parent (hence a not migratable register);
> > +     * in those cases, we will set the field "parent" to point to the
> > +     * generating register. Most of the time this field can stay false.
> > +     * */
> > +    bool skip_cpreglist;
>
> This reads to me like it's papering over a problem rather
> than fixing it.
>
> thanks
> -- PMM
>

[-- Attachment #2: Type: text/html, Size: 4480 bytes --]

  reply	other threads:[~2014-02-26 10:02 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-25 16:52 [Qemu-devel] [RFC 0/4] target-arm: KVM to TCG migration Alvise Rigo
2014-02-25 16:52 ` [Qemu-devel] [RFC 1/4] Fix issue affecting get_int32_le() in vmstate.c Alvise Rigo
2014-02-25 18:11   ` Eduardo Habkost
2014-02-25 18:16   ` Peter Maydell
2014-02-25 18:52   ` Juan Quintela
2014-02-25 18:55     ` Peter Maydell
2014-02-25 16:52 ` [Qemu-devel] [RFC 2/4] Added flag in ARMCPU to track last execution mode Alvise Rigo
2014-02-25 18:19   ` Peter Maydell
2014-02-26  9:16     ` alvise rigo
2014-02-26  9:56       ` Peter Maydell
2014-02-25 16:52 ` [Qemu-devel] [RFC 3/4] Add l2ctlr cp register to CPUARMState Alvise Rigo
2014-02-25 18:22   ` Peter Maydell
2014-02-26  9:17     ` alvise rigo
2014-02-26 10:07       ` Peter Maydell
2014-02-25 16:52 ` [Qemu-devel] [RFC 4/4] Relevant changes to enable KVM to TCG migration Alvise Rigo
2014-02-25 18:25   ` Peter Maydell
2014-02-26 10:02     ` alvise rigo [this message]
2014-02-26 10:04       ` Peter Maydell
2014-02-26 10:27         ` alvise rigo
2014-02-26 10:33           ` Peter Maydell
2014-03-03 21:39       ` Peter Maydell
2014-03-05 15:01         ` alvise rigo
2014-03-05 17:11           ` Peter Maydell

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='CAH47eN2aO=Uyo7Dk7ZmjMhXwxNrCB-oRMKV2cf6yrtoXZSHUsg@mail.gmail.com' \
    --to=a.rigo@virtualopensystems.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=tech@virtualopensystems.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 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.