From: Juan Quintela <quintela@redhat.com>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: patches@linaro.org, qemu-devel@nongnu.org,
"Dr . David Alan Gilbert" <dgilbert@redhat.com>,
Shannon Zhao <shannon.zhaosl@gmail.com>,
qemu-arm@nongnu.org, Shannon Zhao <zhaoshenglong@huawei.com>
Subject: Re: [Qemu-arm] [PATCH for-3.0 v2 3/5] target/arm: Add dummy needed functions to M profile vmstate subsections
Date: Tue, 07 Aug 2018 16:40:17 +0200 [thread overview]
Message-ID: <87600m2qb2.fsf@trasno.org> (raw)
In-Reply-To: <20180806123445.1459-4-peter.maydell@linaro.org> (Peter Maydell's message of "Mon, 6 Aug 2018 13:34:43 +0100")
Peter Maydell <peter.maydell@linaro.org> wrote:
> Currently the migration code incorrectly treats a subsection with
> no .needed function pointer as if it was the subsection list
> terminator -- it is ignored and so is everything after it.
> Work around this by giving various M profile vmstate structs
> a 'needed' function that always returns true.
> We reuse m_needed() for this, since it's always true here.
>
> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
> Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Reviewed-by: Juan Quintela <quintela@redhat.com>
> ---
> Not strictly a regression as it only affects M profile CPUs
> with the security extensions, and migration of those was
> broken anyway in 2.12 due to a different bug.
> ---
> target/arm/machine.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/target/arm/machine.c b/target/arm/machine.c
> index 2e28d086bdf..ff4ec22bf75 100644
> --- a/target/arm/machine.c
> +++ b/target/arm/machine.c
> @@ -184,6 +184,7 @@ static const VMStateDescription vmstate_m_faultmask_primask = {
> .name = "cpu/m/faultmask-primask",
> .version_id = 1,
> .minimum_version_id = 1,
> + .needed = m_needed,
> .fields = (VMStateField[]) {
> VMSTATE_UINT32(env.v7m.faultmask[M_REG_NS], ARMCPU),
> VMSTATE_UINT32(env.v7m.primask[M_REG_NS], ARMCPU),
> @@ -230,6 +231,7 @@ static const VMStateDescription vmstate_m_scr = {
> .name = "cpu/m/scr",
> .version_id = 1,
> .minimum_version_id = 1,
> + .needed = m_needed,
> .fields = (VMStateField[]) {
> VMSTATE_UINT32(env.v7m.scr[M_REG_NS], ARMCPU),
> VMSTATE_END_OF_LIST()
> @@ -240,6 +242,7 @@ static const VMStateDescription vmstate_m_other_sp = {
> .name = "cpu/m/other-sp",
> .version_id = 1,
> .minimum_version_id = 1,
> + .needed = m_needed,
> .fields = (VMStateField[]) {
> VMSTATE_UINT32(env.v7m.other_sp, ARMCPU),
> VMSTATE_END_OF_LIST()
But having 3 subsections with the same needed function ... we could have
a single subsection.
Later, Juan.
WARNING: multiple messages have this Message-ID (diff)
From: Juan Quintela <quintela@redhat.com>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: qemu-arm@nongnu.org, qemu-devel@nongnu.org, patches@linaro.org,
"Dr . David Alan Gilbert" <dgilbert@redhat.com>,
Shannon Zhao <zhaoshenglong@huawei.com>,
Shannon Zhao <shannon.zhaosl@gmail.com>
Subject: Re: [Qemu-devel] [PATCH for-3.0 v2 3/5] target/arm: Add dummy needed functions to M profile vmstate subsections
Date: Tue, 07 Aug 2018 16:40:17 +0200 [thread overview]
Message-ID: <87600m2qb2.fsf@trasno.org> (raw)
In-Reply-To: <20180806123445.1459-4-peter.maydell@linaro.org> (Peter Maydell's message of "Mon, 6 Aug 2018 13:34:43 +0100")
Peter Maydell <peter.maydell@linaro.org> wrote:
> Currently the migration code incorrectly treats a subsection with
> no .needed function pointer as if it was the subsection list
> terminator -- it is ignored and so is everything after it.
> Work around this by giving various M profile vmstate structs
> a 'needed' function that always returns true.
> We reuse m_needed() for this, since it's always true here.
>
> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
> Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Reviewed-by: Juan Quintela <quintela@redhat.com>
> ---
> Not strictly a regression as it only affects M profile CPUs
> with the security extensions, and migration of those was
> broken anyway in 2.12 due to a different bug.
> ---
> target/arm/machine.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/target/arm/machine.c b/target/arm/machine.c
> index 2e28d086bdf..ff4ec22bf75 100644
> --- a/target/arm/machine.c
> +++ b/target/arm/machine.c
> @@ -184,6 +184,7 @@ static const VMStateDescription vmstate_m_faultmask_primask = {
> .name = "cpu/m/faultmask-primask",
> .version_id = 1,
> .minimum_version_id = 1,
> + .needed = m_needed,
> .fields = (VMStateField[]) {
> VMSTATE_UINT32(env.v7m.faultmask[M_REG_NS], ARMCPU),
> VMSTATE_UINT32(env.v7m.primask[M_REG_NS], ARMCPU),
> @@ -230,6 +231,7 @@ static const VMStateDescription vmstate_m_scr = {
> .name = "cpu/m/scr",
> .version_id = 1,
> .minimum_version_id = 1,
> + .needed = m_needed,
> .fields = (VMStateField[]) {
> VMSTATE_UINT32(env.v7m.scr[M_REG_NS], ARMCPU),
> VMSTATE_END_OF_LIST()
> @@ -240,6 +242,7 @@ static const VMStateDescription vmstate_m_other_sp = {
> .name = "cpu/m/other-sp",
> .version_id = 1,
> .minimum_version_id = 1,
> + .needed = m_needed,
> .fields = (VMStateField[]) {
> VMSTATE_UINT32(env.v7m.other_sp, ARMCPU),
> VMSTATE_END_OF_LIST()
But having 3 subsections with the same needed function ... we could have
a single subsection.
Later, Juan.
next prev parent reply other threads:[~2018-08-07 14:40 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-08-06 12:34 [Qemu-arm] [PATCH for-3.0 v2 0/5] Arm migration fixes for 3.0 Peter Maydell
2018-08-06 12:34 ` [Qemu-devel] " Peter Maydell
2018-08-06 12:34 ` [Qemu-arm] [PATCH for-3.0 v2 1/5] hw/intc/arm_gicv3_common: Give no-migration-shift-bug subsection a needed function Peter Maydell
2018-08-06 12:34 ` [Qemu-devel] " Peter Maydell
2018-08-07 14:34 ` [Qemu-arm] " Juan Quintela
2018-08-07 14:34 ` [Qemu-devel] " Juan Quintela
2018-08-06 12:34 ` [Qemu-arm] [PATCH for-3.0 v2 2/5] hw/intc/arm_gicv3_common: Combine duplicate .subsections in vmstate_gicv3_cpu Peter Maydell
2018-08-06 12:34 ` [Qemu-devel] " Peter Maydell
2018-08-07 14:34 ` [Qemu-arm] " Juan Quintela
2018-08-07 14:34 ` [Qemu-devel] " Juan Quintela
2018-08-06 12:34 ` [Qemu-arm] [PATCH for-3.0 v2 3/5] target/arm: Add dummy needed functions to M profile vmstate subsections Peter Maydell
2018-08-06 12:34 ` [Qemu-devel] " Peter Maydell
2018-08-07 14:40 ` Juan Quintela [this message]
2018-08-07 14:40 ` Juan Quintela
2018-08-07 14:45 ` [Qemu-arm] " Peter Maydell
2018-08-07 14:45 ` [Qemu-devel] " Peter Maydell
2018-08-07 14:50 ` Juan Quintela
2018-08-07 14:50 ` Juan Quintela
2018-08-06 12:34 ` [Qemu-arm] [PATCH for-3.0 v2 4/5] hw/intc/arm_gicv3_common: Move post_load hooks to top-level VMSD Peter Maydell
2018-08-06 12:34 ` [Qemu-devel] " Peter Maydell
2018-08-06 15:32 ` [Qemu-arm] " Dr. David Alan Gilbert
2018-08-06 15:32 ` [Qemu-devel] " Dr. David Alan Gilbert
2018-08-07 14:41 ` [Qemu-arm] " Juan Quintela
2018-08-07 14:41 ` [Qemu-devel] " Juan Quintela
2018-08-06 12:34 ` [Qemu-arm] [PATCH for-3.0 v2 5/5] hw/intc/arm_gicv3_common: Move gicd shift bug handling to gicv3_post_load Peter Maydell
2018-08-06 12:34 ` [Qemu-devel] " Peter Maydell
2018-08-06 15:39 ` [Qemu-arm] " Dr. David Alan Gilbert
2018-08-06 15:39 ` [Qemu-devel] " Dr. David Alan Gilbert
2018-08-06 14:06 ` [Qemu-arm] [Qemu-devel] [PATCH for-3.0 v2 0/5] Arm migration fixes for 3.0 Richard Henderson
2018-08-06 14:06 ` Richard Henderson
2018-08-06 16:50 ` [Qemu-arm] " Peter Maydell
2018-08-06 16:50 ` 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=87600m2qb2.fsf@trasno.org \
--to=quintela@redhat.com \
--cc=dgilbert@redhat.com \
--cc=patches@linaro.org \
--cc=peter.maydell@linaro.org \
--cc=qemu-arm@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=shannon.zhaosl@gmail.com \
--cc=zhaoshenglong@huawei.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.