[PATCH 0/2] target/ppc: Fix detection of 64-bit MMU models

Greg Kurz posted 2 patches 3 years, 4 months ago
Test checkpatch passed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20201209173536.1437351-1-groug@kaod.org
Maintainers: David Gibson <david@gibson.dropbear.id.au>
target/ppc/cpu-qom.h            |  5 +++++
target/ppc/excp_helper.c        |  4 ++--
target/ppc/machine.c            |  4 ++--
target/ppc/mmu-hash64.c         |  2 +-
target/ppc/mmu_helper.c         | 10 +++++-----
target/ppc/translate.c          |  4 ++--
target/ppc/translate_init.c.inc |  2 +-
7 files changed, 18 insertions(+), 13 deletions(-)
[PATCH 0/2] target/ppc: Fix detection of 64-bit MMU models
Posted by Greg Kurz 3 years, 4 months ago
Stephane Duverger posted a patch to fix a miscomputation of the
'need_access_type' flag in ppc_tr_init_disas_context(), which can
cause QEMU to abort with 32-bit CPUs.

This series contains an extended version of Stephane's patch and
introduce an mmu_is_64bit() helper to avoid a similar confusion
in the future.

Greg Kurz (1):
  target/ppc: Introduce an mmu_is_64bit() helper

Stephane Duverger (1):
  ppc/translate: Use POWERPC_MMU_64 to detect 64-bit MMU models

 target/ppc/cpu-qom.h            |  5 +++++
 target/ppc/excp_helper.c        |  4 ++--
 target/ppc/machine.c            |  4 ++--
 target/ppc/mmu-hash64.c         |  2 +-
 target/ppc/mmu_helper.c         | 10 +++++-----
 target/ppc/translate.c          |  4 ++--
 target/ppc/translate_init.c.inc |  2 +-
 7 files changed, 18 insertions(+), 13 deletions(-)

-- 
2.26.2



Re: [PATCH 0/2] target/ppc: Fix detection of 64-bit MMU models
Posted by David Gibson 3 years, 4 months ago
On Wed, Dec 09, 2020 at 06:35:34PM +0100, Greg Kurz wrote:
> Stephane Duverger posted a patch to fix a miscomputation of the
> 'need_access_type' flag in ppc_tr_init_disas_context(), which can
> cause QEMU to abort with 32-bit CPUs.
> 
> This series contains an extended version of Stephane's patch and
> introduce an mmu_is_64bit() helper to avoid a similar confusion
> in the future.

Applied to ppc-for-6.0, thanks.

Really that whole mmu_model thing is a mess.  A mix of flags and an
enum, for something that should probably be class callbacks in most
cases.  But your patches certainly improve things.

-- 
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson