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
|
@ -28,6 +28,7 @@
|
|||
#include "mmu-hash64.h"
|
||||
#include "exec/log.h"
|
||||
#include "hw/hw.h"
|
||||
#include "mmu-book3s-v3.h"
|
||||
|
||||
//#define DEBUG_SLB
|
||||
|
||||
|
@ -726,6 +727,13 @@ int ppc_hash64_handle_mmu_fault(PowerPCCPU *cpu, vaddr eaddr,
|
|||
/* 2. Translation is on, so look up the SLB */
|
||||
slb = slb_lookup(cpu, eaddr);
|
||||
if (!slb) {
|
||||
/* No entry found, check if in-memory segment tables are in use */
|
||||
if ((env->mmu_model & POWERPC_MMU_V3) && ppc64_use_proc_tbl(cpu)) {
|
||||
/* TODO - Unsupported */
|
||||
error_report("Segment Table Support Unimplemented");
|
||||
exit(1);
|
||||
}
|
||||
/* Segment still not found, generate the appropriate interrupt */
|
||||
if (rwx == 2) {
|
||||
cs->exception_index = POWERPC_EXCP_ISEG;
|
||||
env->error_code = 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue