mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 16:23:55 -06:00
target/ppc/POWER9: Add POWER9 mmu fault handler
Add a new mmu fault handler for the POWER9 cpu and add it as the handler for the POWER9 cpu definition. This handler checks if the guest is radix or hash based on the value in the partition table entry and calls the correct fault handler accordingly. The hash fault handling code has also been updated to check if the partition is using segment tables. Currently only legacy hash (no segment tables) is supported. Signed-off-by: Suraj Jitindar Singh <sjitindarsingh@gmail.com> Reviewed-by: David Gibson <david@gibson.dropbear.id.au> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
This commit is contained in:
parent
4f4f28ffc1
commit
b2899495e3
6 changed files with 113 additions and 2 deletions
|
@ -29,6 +29,7 @@
|
|||
#include "exec/log.h"
|
||||
#include "helper_regs.h"
|
||||
#include "qemu/error-report.h"
|
||||
#include "mmu-book3s-v3.h"
|
||||
|
||||
//#define DEBUG_MMU
|
||||
//#define DEBUG_BATS
|
||||
|
@ -1285,6 +1286,13 @@ void dump_mmu(FILE *f, fprintf_function cpu_fprintf, CPUPPCState *env)
|
|||
case POWERPC_MMU_2_07a:
|
||||
dump_slb(f, cpu_fprintf, ppc_env_get_cpu(env));
|
||||
break;
|
||||
case POWERPC_MMU_3_00:
|
||||
if (ppc64_radix_guest(ppc_env_get_cpu(env))) {
|
||||
/* TODO - Unsupported */
|
||||
} else {
|
||||
dump_slb(f, cpu_fprintf, ppc_env_get_cpu(env));
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
default:
|
||||
qemu_log_mask(LOG_UNIMP, "%s: unimplemented\n", __func__);
|
||||
|
@ -1426,6 +1434,13 @@ hwaddr ppc_cpu_get_phys_page_debug(CPUState *cs, vaddr addr)
|
|||
case POWERPC_MMU_2_07:
|
||||
case POWERPC_MMU_2_07a:
|
||||
return ppc_hash64_get_phys_page_debug(cpu, addr);
|
||||
case POWERPC_MMU_3_00:
|
||||
if (ppc64_radix_guest(ppc_env_get_cpu(env))) {
|
||||
/* TODO - Unsupported */
|
||||
} else {
|
||||
return ppc_hash64_get_phys_page_debug(cpu, addr);
|
||||
}
|
||||
break;
|
||||
#endif
|
||||
|
||||
case POWERPC_MMU_32B:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue