[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 09/18] target/ppc: Introduce a relocation bool in ppc_radix64_hand
From: |
David Gibson |
Subject: |
[PULL 09/18] target/ppc: Introduce a relocation bool in ppc_radix64_handle_mmu_fault() |
Date: |
Thu, 7 May 2020 15:02:19 +1000 |
From: Cédric Le Goater <address@hidden>
It will ease the introduction of new routines for partition-scoped
Radix translation.
Signed-off-by: Suraj Jitindar Singh <address@hidden>
Signed-off-by: Cédric Le Goater <address@hidden>
Message-Id: <address@hidden>
Reviewed-by: Greg Kurz <address@hidden>
Signed-off-by: David Gibson <address@hidden>
---
target/ppc/mmu-radix64.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/target/ppc/mmu-radix64.c b/target/ppc/mmu-radix64.c
index 9967857058..f6007e9565 100644
--- a/target/ppc/mmu-radix64.c
+++ b/target/ppc/mmu-radix64.c
@@ -229,12 +229,13 @@ int ppc_radix64_handle_mmu_fault(PowerPCCPU *cpu, vaddr
eaddr, int rwx,
uint64_t lpid = 0, pid = 0, offset, size, prtbe0, pte;
int page_size, prot, fault_cause = 0;
ppc_v3_pate_t pate;
+ bool relocation;
assert((rwx == 0) || (rwx == 1) || (rwx == 2));
+ relocation = ((rwx == 2) && (msr_ir == 1)) || ((rwx != 2) && (msr_dr ==
1));
/* HV or virtual hypervisor Real Mode Access */
- if ((msr_hv || cpu->vhyp) &&
- (((rwx == 2) && (msr_ir == 0)) || ((rwx != 2) && (msr_dr == 0)))) {
+ if (!relocation && (msr_hv || cpu->vhyp)) {
/* In real mode top 4 effective addr bits (mostly) ignored */
raddr = eaddr & 0x0FFFFFFFFFFFFFFFULL;
--
2.26.2
- [PULL 00/18] ppc-for-5.1 queue 20200507, David Gibson, 2020/05/07
- [PULL 03/18] ppc/spapr: tweak change system reset helper, David Gibson, 2020/05/07
- [PULL 01/18] target/ppc: Improve syscall exception logging, David Gibson, 2020/05/07
- [PULL 02/18] spapr: Don't check capabilities removed between CAS calls, David Gibson, 2020/05/07
- [PULL 04/18] ppc/pnv: Add support for NMI interface, David Gibson, 2020/05/07
- [PULL 05/18] spapr: Simplify selection of radix/hash during CAS, David Gibson, 2020/05/07
- [PULL 11/18] spapr: Don't allow unplug of NVLink2 devices, David Gibson, 2020/05/07
- [PULL 10/18] target/ppc: Assert if HV mode is set when running under a pseries machine, David Gibson, 2020/05/07
- [PULL 06/18] spapr/cas: Separate CAS handling from rebuilding the FDT, David Gibson, 2020/05/07
- [PULL 07/18] spapr: Drop CAS reboot flag, David Gibson, 2020/05/07
- [PULL 09/18] target/ppc: Introduce a relocation bool in ppc_radix64_handle_mmu_fault(),
David Gibson <=
- [PULL 12/18] target/ppc: Introduce ppc_radix64_xlate() for Radix tree translation, David Gibson, 2020/05/07
- [PULL 08/18] target/ppc: Enforce that the root page directory size must be at least 5, David Gibson, 2020/05/07
- [PULL 17/18] spapr_nvdimm: Tweak error messages, David Gibson, 2020/05/07
- [PULL 13/18] target/ppc: Extend ppc_radix64_check_prot() with a 'partition_scoped' bool, David Gibson, 2020/05/07
- [PULL 15/18] target/ppc: Add support for Radix partition-scoped translation, David Gibson, 2020/05/07
- [PULL 14/18] target/ppc: Rework ppc_radix64_walk_tree() for partition-scoped translation, David Gibson, 2020/05/07
- [PULL 16/18] spapr_nvdimm.c: make 'label-size' mandatory, David Gibson, 2020/05/07
- [PULL 18/18] target-ppc: fix rlwimi, rlwinm, rlwnm for Clang-9, David Gibson, 2020/05/07
- Re: [PULL 00/18] ppc-for-5.1 queue 20200507, no-reply, 2020/05/07
- Re: [PULL 00/18] ppc-for-5.1 queue 20200507, Peter Maydell, 2020/05/07