qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH for-5.0?] target/arm: Fix ID_MMFR4 value on AArch64 'max' CPU
@ 2020-04-22 12:45 Peter Maydell
  2020-04-22 12:49 ` Edgar E. Iglesias
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Peter Maydell @ 2020-04-22 12:45 UTC (permalink / raw)
  To: qemu-arm, qemu-devel
  Cc: Laurent Desnogues, Alex Bennée, Richard Henderson

In commit 41a4bf1feab098da4cd the added code to set the CNP
field in ID_MMFR4 for the AArch64 'max' CPU had a typo
where it used the wrong variable name, resulting in ID_MMFR4
fields AC2, XNX and LSM being wrong. Fix the typo.

Fixes: 41a4bf1feab098da4cd
Reported-by: Laurent Desnogues <laurent.desnogues@gmail.com>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
---
maybe 5.0 just because it's so trivial. I dunno...

There's also an error where we use the uint32_t u variable
to update the 64-bit ID_AA64DFR0 register, but that's harmless
because as it happens the top 32 bits of that register are
all zeroes anyway, so we can just fix that in 5.1.

 target/arm/cpu64.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/target/arm/cpu64.c b/target/arm/cpu64.c
index 62d36f9e8d3..95d0c8c101a 100644
--- a/target/arm/cpu64.c
+++ b/target/arm/cpu64.c
@@ -705,7 +705,7 @@ static void aarch64_max_initfn(Object *obj)
         u = cpu->isar.id_mmfr4;
         u = FIELD_DP32(u, ID_MMFR4, HPDS, 1); /* AA32HPD */
         u = FIELD_DP32(u, ID_MMFR4, AC2, 1); /* ACTLR2, HACTLR2 */
-        u = FIELD_DP32(t, ID_MMFR4, CNP, 1); /* TTCNP */
+        u = FIELD_DP32(u, ID_MMFR4, CNP, 1); /* TTCNP */
         cpu->isar.id_mmfr4 = u;
 
         u = cpu->isar.id_aa64dfr0;
-- 
2.20.1



^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH for-5.0?] target/arm: Fix ID_MMFR4 value on AArch64 'max' CPU
  2020-04-22 12:45 [PATCH for-5.0?] target/arm: Fix ID_MMFR4 value on AArch64 'max' CPU Peter Maydell
@ 2020-04-22 12:49 ` Edgar E. Iglesias
  2020-04-22 13:05 ` Laurent Desnogues
  2020-04-22 17:41 ` Philippe Mathieu-Daudé
  2 siblings, 0 replies; 5+ messages in thread
From: Edgar E. Iglesias @ 2020-04-22 12:49 UTC (permalink / raw)
  To: Peter Maydell; +Cc: Laurent Desnogues, qemu-arm, Richard Henderson, qemu-devel

On Wed, Apr 22, 2020 at 01:45:01PM +0100, Peter Maydell wrote:
> In commit 41a4bf1feab098da4cd the added code to set the CNP
> field in ID_MMFR4 for the AArch64 'max' CPU had a typo
> where it used the wrong variable name, resulting in ID_MMFR4
> fields AC2, XNX and LSM being wrong. Fix the typo.
> 
> Fixes: 41a4bf1feab098da4cd
> Reported-by: Laurent Desnogues <laurent.desnogues@gmail.com>

Reviewed-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>



> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
> ---
> maybe 5.0 just because it's so trivial. I dunno...
> 
> There's also an error where we use the uint32_t u variable
> to update the 64-bit ID_AA64DFR0 register, but that's harmless
> because as it happens the top 32 bits of that register are
> all zeroes anyway, so we can just fix that in 5.1.
> 
>  target/arm/cpu64.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/target/arm/cpu64.c b/target/arm/cpu64.c
> index 62d36f9e8d3..95d0c8c101a 100644
> --- a/target/arm/cpu64.c
> +++ b/target/arm/cpu64.c
> @@ -705,7 +705,7 @@ static void aarch64_max_initfn(Object *obj)
>          u = cpu->isar.id_mmfr4;
>          u = FIELD_DP32(u, ID_MMFR4, HPDS, 1); /* AA32HPD */
>          u = FIELD_DP32(u, ID_MMFR4, AC2, 1); /* ACTLR2, HACTLR2 */
> -        u = FIELD_DP32(t, ID_MMFR4, CNP, 1); /* TTCNP */
> +        u = FIELD_DP32(u, ID_MMFR4, CNP, 1); /* TTCNP */
>          cpu->isar.id_mmfr4 = u;
>  
>          u = cpu->isar.id_aa64dfr0;
> -- 
> 2.20.1
> 
> 


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH for-5.0?] target/arm: Fix ID_MMFR4 value on AArch64 'max' CPU
  2020-04-22 12:45 [PATCH for-5.0?] target/arm: Fix ID_MMFR4 value on AArch64 'max' CPU Peter Maydell
  2020-04-22 12:49 ` Edgar E. Iglesias
@ 2020-04-22 13:05 ` Laurent Desnogues
  2020-04-22 17:41 ` Philippe Mathieu-Daudé
  2 siblings, 0 replies; 5+ messages in thread
From: Laurent Desnogues @ 2020-04-22 13:05 UTC (permalink / raw)
  To: Peter Maydell
  Cc: Alex Bennée, qemu-arm, Richard Henderson,
	qemu-devel@nongnu.org

On Wed, Apr 22, 2020 at 2:45 PM Peter Maydell <peter.maydell@linaro.org> wrote:
>
> In commit 41a4bf1feab098da4cd the added code to set the CNP
> field in ID_MMFR4 for the AArch64 'max' CPU had a typo
> where it used the wrong variable name, resulting in ID_MMFR4
> fields AC2, XNX and LSM being wrong. Fix the typo.
>
> Fixes: 41a4bf1feab098da4cd
> Reported-by: Laurent Desnogues <laurent.desnogues@gmail.com>
> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>

Reviewed-by: Laurent Desnogues <laurent.desnogues@gmail.com>

Thanks,

Laurent

> ---
> maybe 5.0 just because it's so trivial. I dunno...
>
> There's also an error where we use the uint32_t u variable
> to update the 64-bit ID_AA64DFR0 register, but that's harmless
> because as it happens the top 32 bits of that register are
> all zeroes anyway, so we can just fix that in 5.1.
>
>  target/arm/cpu64.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/target/arm/cpu64.c b/target/arm/cpu64.c
> index 62d36f9e8d3..95d0c8c101a 100644
> --- a/target/arm/cpu64.c
> +++ b/target/arm/cpu64.c
> @@ -705,7 +705,7 @@ static void aarch64_max_initfn(Object *obj)
>          u = cpu->isar.id_mmfr4;
>          u = FIELD_DP32(u, ID_MMFR4, HPDS, 1); /* AA32HPD */
>          u = FIELD_DP32(u, ID_MMFR4, AC2, 1); /* ACTLR2, HACTLR2 */
> -        u = FIELD_DP32(t, ID_MMFR4, CNP, 1); /* TTCNP */
> +        u = FIELD_DP32(u, ID_MMFR4, CNP, 1); /* TTCNP */
>          cpu->isar.id_mmfr4 = u;
>
>          u = cpu->isar.id_aa64dfr0;
> --
> 2.20.1
>


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH for-5.0?] target/arm: Fix ID_MMFR4 value on AArch64 'max' CPU
  2020-04-22 12:45 [PATCH for-5.0?] target/arm: Fix ID_MMFR4 value on AArch64 'max' CPU Peter Maydell
  2020-04-22 12:49 ` Edgar E. Iglesias
  2020-04-22 13:05 ` Laurent Desnogues
@ 2020-04-22 17:41 ` Philippe Mathieu-Daudé
  2020-04-22 17:43   ` Philippe Mathieu-Daudé
  2 siblings, 1 reply; 5+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-04-22 17:41 UTC (permalink / raw)
  To: Peter Maydell, qemu-arm, qemu-devel
  Cc: Laurent Desnogues, Richard Henderson, Alex Bennée

On 4/22/20 2:45 PM, Peter Maydell wrote:
> In commit 41a4bf1feab098da4cd the added code to set the CNP
> field in ID_MMFR4 for the AArch64 'max' CPU had a typo
> where it used the wrong variable name, resulting in ID_MMFR4
> fields AC2, XNX and LSM being wrong. Fix the typo.
> 
> Fixes: 41a4bf1feab098da4cd
> Reported-by: Laurent Desnogues <laurent.desnogues@gmail.com>

Nice testing/catch Laurent!

Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>

> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
> ---
> maybe 5.0 just because it's so trivial. I dunno...
> 
> There's also an error where we use the uint32_t u variable
> to update the 64-bit ID_AA64DFR0 register, but that's harmless
> because as it happens the top 32 bits of that register are
> all zeroes anyway, so we can just fix that in 5.1.
> 
>   target/arm/cpu64.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/target/arm/cpu64.c b/target/arm/cpu64.c
> index 62d36f9e8d3..95d0c8c101a 100644
> --- a/target/arm/cpu64.c
> +++ b/target/arm/cpu64.c
> @@ -705,7 +705,7 @@ static void aarch64_max_initfn(Object *obj)
>           u = cpu->isar.id_mmfr4;
>           u = FIELD_DP32(u, ID_MMFR4, HPDS, 1); /* AA32HPD */
>           u = FIELD_DP32(u, ID_MMFR4, AC2, 1); /* ACTLR2, HACTLR2 */
> -        u = FIELD_DP32(t, ID_MMFR4, CNP, 1); /* TTCNP */
> +        u = FIELD_DP32(u, ID_MMFR4, CNP, 1); /* TTCNP */
>           cpu->isar.id_mmfr4 = u;
>   
>           u = cpu->isar.id_aa64dfr0;
> 



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH for-5.0?] target/arm: Fix ID_MMFR4 value on AArch64 'max' CPU
  2020-04-22 17:41 ` Philippe Mathieu-Daudé
@ 2020-04-22 17:43   ` Philippe Mathieu-Daudé
  0 siblings, 0 replies; 5+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-04-22 17:43 UTC (permalink / raw)
  To: Peter Maydell, qemu-arm, QEMU Developers
  Cc: Laurent Desnogues, Richard Henderson, Alex Bennée

On Wed, Apr 22, 2020 at 7:41 PM Philippe Mathieu-Daudé
<philmd@redhat.com> wrote:
>
> On 4/22/20 2:45 PM, Peter Maydell wrote:
> > In commit 41a4bf1feab098da4cd the added code to set the CNP
> > field in ID_MMFR4 for the AArch64 'max' CPU had a typo
> > where it used the wrong variable name, resulting in ID_MMFR4
> > fields AC2, XNX and LSM being wrong. Fix the typo.
> >
> > Fixes: 41a4bf1feab098da4cd
> > Reported-by: Laurent Desnogues <laurent.desnogues@gmail.com>
>
> Nice testing/catch Laurent!
>
> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
>
> > Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
> > ---
> > maybe 5.0 just because it's so trivial. I dunno...

BTW FWIW LGTM...

> >
> > There's also an error where we use the uint32_t u variable
> > to update the 64-bit ID_AA64DFR0 register, but that's harmless
> > because as it happens the top 32 bits of that register are
> > all zeroes anyway, so we can just fix that in 5.1.
> >
> >   target/arm/cpu64.c | 2 +-
> >   1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/target/arm/cpu64.c b/target/arm/cpu64.c
> > index 62d36f9e8d3..95d0c8c101a 100644
> > --- a/target/arm/cpu64.c
> > +++ b/target/arm/cpu64.c
> > @@ -705,7 +705,7 @@ static void aarch64_max_initfn(Object *obj)
> >           u = cpu->isar.id_mmfr4;
> >           u = FIELD_DP32(u, ID_MMFR4, HPDS, 1); /* AA32HPD */
> >           u = FIELD_DP32(u, ID_MMFR4, AC2, 1); /* ACTLR2, HACTLR2 */
> > -        u = FIELD_DP32(t, ID_MMFR4, CNP, 1); /* TTCNP */
> > +        u = FIELD_DP32(u, ID_MMFR4, CNP, 1); /* TTCNP */
> >           cpu->isar.id_mmfr4 = u;
> >
> >           u = cpu->isar.id_aa64dfr0;
> >



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2020-04-22 17:45 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-04-22 12:45 [PATCH for-5.0?] target/arm: Fix ID_MMFR4 value on AArch64 'max' CPU Peter Maydell
2020-04-22 12:49 ` Edgar E. Iglesias
2020-04-22 13:05 ` Laurent Desnogues
2020-04-22 17:41 ` Philippe Mathieu-Daudé
2020-04-22 17:43   ` Philippe Mathieu-Daudé

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).