From: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: qemu-arm <qemu-arm@nongnu.org>,
Richard Henderson <richard.henderson@linaro.org>,
QEMU Developers <qemu-devel@nongnu.org>
Subject: Re: [Qemu-arm] [PATCH 7/9] target/arm: Expand vector registers for SVE
Date: Thu, 11 Jan 2018 18:58:41 +0000 [thread overview]
Message-ID: <20180111185840.GE13384@work-vm> (raw)
In-Reply-To: <CAFEAcA9EZ0jY6tR2E7ZzfWnAfSJ3hjGNT7za+RZC-SGuBY6Hfg@mail.gmail.com>
* Peter Maydell (peter.maydell@linaro.org) wrote:
> On 18 December 2017 at 17:30, Richard Henderson
> <richard.henderson@linaro.org> wrote:
> > Change vfp.regs as a uint64_t to vfp.zregs as an ARMVectorReg.
> > The previous patches have made the change in representation
> > relatively painless.
> >
> > Add vfp.pregs as an ARMPredicateReg. Let FFR be P16 to make
> > it easier to treat it as for any other predicate.
>
> > diff --git a/target/arm/machine.c b/target/arm/machine.c
> > index a85c2430d3..39f3123b10 100644
> > --- a/target/arm/machine.c
> > +++ b/target/arm/machine.c
> > @@ -50,7 +50,42 @@ static const VMStateDescription vmstate_vfp = {
> > .minimum_version_id = 3,
> > .needed = vfp_needed,
> > .fields = (VMStateField[]) {
> > - VMSTATE_UINT64_ARRAY(env.vfp.regs, ARMCPU, 64),
> > + /* For compatibility, store Qn out of Zn here. */
> > + /* TODO: store the other quadwords in another subsection,
> > + along with predicate registers and ZCR_EL[1-3]. */
>
> I think we should get the migration state stuff right at the point
> where we change the data structure in cpu.h.
>
>
> > + VMSTATE_UINT64_SUB_ARRAY(env.vfp.zregs[0].d, ARMCPU, 0, 2),
> > + VMSTATE_UINT64_SUB_ARRAY(env.vfp.zregs[1].d, ARMCPU, 0, 2),
> > + VMSTATE_UINT64_SUB_ARRAY(env.vfp.zregs[2].d, ARMCPU, 0, 2),
>
> David: does the migration code guarantee that we can split an
> old VMSTATE_UINT64_ARRAY into being a sequence of SUB_ARRAYs
> like this and retain the same on-the-wire format (ie and
> keep migration compat) ?
There's no on-the-wire protocol for this - it's just the array elements,
so as long as the total adds up the same and it's still uint64's
it should work.
Dave
> I suspect we've used this clever trick before elsewhere, but thought
> it better to check...
>
> thanks
> -- PMM
--
Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK
WARNING: multiple messages have this Message-ID (diff)
From: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: Richard Henderson <richard.henderson@linaro.org>,
QEMU Developers <qemu-devel@nongnu.org>,
qemu-arm <qemu-arm@nongnu.org>
Subject: Re: [Qemu-devel] [PATCH 7/9] target/arm: Expand vector registers for SVE
Date: Thu, 11 Jan 2018 18:58:41 +0000 [thread overview]
Message-ID: <20180111185840.GE13384@work-vm> (raw)
In-Reply-To: <CAFEAcA9EZ0jY6tR2E7ZzfWnAfSJ3hjGNT7za+RZC-SGuBY6Hfg@mail.gmail.com>
* Peter Maydell (peter.maydell@linaro.org) wrote:
> On 18 December 2017 at 17:30, Richard Henderson
> <richard.henderson@linaro.org> wrote:
> > Change vfp.regs as a uint64_t to vfp.zregs as an ARMVectorReg.
> > The previous patches have made the change in representation
> > relatively painless.
> >
> > Add vfp.pregs as an ARMPredicateReg. Let FFR be P16 to make
> > it easier to treat it as for any other predicate.
>
> > diff --git a/target/arm/machine.c b/target/arm/machine.c
> > index a85c2430d3..39f3123b10 100644
> > --- a/target/arm/machine.c
> > +++ b/target/arm/machine.c
> > @@ -50,7 +50,42 @@ static const VMStateDescription vmstate_vfp = {
> > .minimum_version_id = 3,
> > .needed = vfp_needed,
> > .fields = (VMStateField[]) {
> > - VMSTATE_UINT64_ARRAY(env.vfp.regs, ARMCPU, 64),
> > + /* For compatibility, store Qn out of Zn here. */
> > + /* TODO: store the other quadwords in another subsection,
> > + along with predicate registers and ZCR_EL[1-3]. */
>
> I think we should get the migration state stuff right at the point
> where we change the data structure in cpu.h.
>
>
> > + VMSTATE_UINT64_SUB_ARRAY(env.vfp.zregs[0].d, ARMCPU, 0, 2),
> > + VMSTATE_UINT64_SUB_ARRAY(env.vfp.zregs[1].d, ARMCPU, 0, 2),
> > + VMSTATE_UINT64_SUB_ARRAY(env.vfp.zregs[2].d, ARMCPU, 0, 2),
>
> David: does the migration code guarantee that we can split an
> old VMSTATE_UINT64_ARRAY into being a sequence of SUB_ARRAYs
> like this and retain the same on-the-wire format (ie and
> keep migration compat) ?
There's no on-the-wire protocol for this - it's just the array elements,
so as long as the total adds up the same and it's still uint64's
it should work.
Dave
> I suspect we've used this clever trick before elsewhere, but thought
> it better to check...
>
> thanks
> -- PMM
--
Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK
next prev parent reply other threads:[~2018-01-11 18:59 UTC|newest]
Thread overview: 55+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-18 17:30 [Qemu-devel] [PATCH 0/9] target/arm: Prepatory work for SVE Richard Henderson
2017-12-18 17:30 ` [Qemu-arm] [PATCH 1/9] target/arm: Mark disas_set_insn_syndrome inline Richard Henderson
2017-12-18 17:30 ` [Qemu-devel] " Richard Henderson
2017-12-18 20:27 ` [Qemu-devel] [Qemu-arm] " Philippe Mathieu-Daudé
2018-01-11 18:45 ` Peter Maydell
2018-01-11 18:45 ` [Qemu-devel] " Peter Maydell
2017-12-18 17:30 ` [Qemu-arm] [PATCH 2/9] target/arm: Use pointers in crypto helpers Richard Henderson
2017-12-18 17:30 ` [Qemu-devel] " Richard Henderson
2018-01-11 18:45 ` [Qemu-arm] " Peter Maydell
2018-01-11 18:45 ` [Qemu-devel] " Peter Maydell
2017-12-18 17:30 ` [Qemu-arm] [PATCH 3/9] target/arm: Use pointers in neon zip/uzp helpers Richard Henderson
2017-12-18 17:30 ` [Qemu-devel] " Richard Henderson
2018-01-11 18:46 ` [Qemu-arm] " Peter Maydell
2018-01-11 18:46 ` [Qemu-devel] " Peter Maydell
2017-12-18 17:30 ` [Qemu-arm] [PATCH 4/9] target/arm: Use pointers in neon tbl helper Richard Henderson
2017-12-18 17:30 ` [Qemu-devel] " Richard Henderson
2018-01-11 18:46 ` Peter Maydell
2018-01-11 18:46 ` Peter Maydell
2017-12-18 17:30 ` [Qemu-devel] [PATCH 5/9] target/arm: Add aa32_vfp_dreg/aa64_vfp_qreg helpers Richard Henderson
2018-01-11 18:39 ` [Qemu-arm] " Peter Maydell
2018-01-11 18:39 ` [Qemu-devel] " Peter Maydell
2018-01-11 19:29 ` [Qemu-arm] " Richard Henderson
2018-01-11 19:29 ` [Qemu-devel] " Richard Henderson
2018-01-12 18:24 ` [Qemu-arm] " Peter Maydell
2018-01-12 18:24 ` [Qemu-devel] " Peter Maydell
2018-01-12 18:44 ` [Qemu-arm] " Richard Henderson
2018-01-12 18:44 ` [Qemu-devel] " Richard Henderson
2018-01-12 18:44 ` [Qemu-arm] " Peter Maydell
2018-01-12 18:44 ` [Qemu-devel] " Peter Maydell
2018-01-12 18:47 ` Richard Henderson
2018-01-12 18:47 ` Richard Henderson
2017-12-18 17:30 ` [Qemu-arm] [PATCH 6/9] vmstate: Add VMSTATE_UINT64_SUB_ARRAY Richard Henderson
2017-12-18 17:30 ` [Qemu-devel] " Richard Henderson
2017-12-18 20:29 ` [Qemu-devel] [Qemu-arm] " Philippe Mathieu-Daudé
2018-01-11 18:46 ` Peter Maydell
2018-01-11 18:46 ` [Qemu-devel] " Peter Maydell
2017-12-18 17:30 ` [Qemu-devel] [PATCH 7/9] target/arm: Expand vector registers for SVE Richard Henderson
2018-01-11 18:44 ` Peter Maydell
2018-01-11 18:44 ` Peter Maydell
2018-01-11 18:58 ` Dr. David Alan Gilbert [this message]
2018-01-11 18:58 ` Dr. David Alan Gilbert
2018-01-12 18:38 ` [Qemu-arm] " Peter Maydell
2018-01-12 18:38 ` [Qemu-devel] " Peter Maydell
2018-01-12 18:50 ` [Qemu-arm] " Richard Henderson
2018-01-12 18:50 ` [Qemu-devel] " Richard Henderson
2017-12-18 17:30 ` [Qemu-devel] [PATCH 8/9] target/arm: Add ZCR.LEN to tb->flags Richard Henderson
2018-01-12 18:49 ` [Qemu-arm] " Peter Maydell
2018-01-12 18:49 ` [Qemu-devel] " Peter Maydell
2018-01-15 10:00 ` [Qemu-arm] " Peter Maydell
2018-01-15 10:00 ` [Qemu-devel] " Peter Maydell
2017-12-18 17:30 ` [Qemu-devel] [PATCH 9/9] target/arm: Add ARM_FEATURE_SVE Richard Henderson
2018-01-11 18:42 ` [Qemu-arm] " Peter Maydell
2018-01-11 18:42 ` [Qemu-devel] " Peter Maydell
2018-01-11 19:32 ` Richard Henderson
2018-01-11 19:32 ` Richard Henderson
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=20180111185840.GE13384@work-vm \
--to=dgilbert@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-arm@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=richard.henderson@linaro.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.