[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 7/7] target/ppc: Enforce that the root page directory size must b
From: |
Cédric Le Goater |
Subject: |
[PATCH 7/7] target/ppc: Enforce that the root page directory size must be at least 5 |
Date: |
Thu, 28 Nov 2019 14:47:00 +0100 |
From: Suraj Jitindar Singh <address@hidden>
According to the ISA the root page directory size of a radix tree for
either process or partition scoped translation must be >= 5.
Thus add this to the list of conditions checked when validating the
partition table entry in validate_pate();
Signed-off-by: Suraj Jitindar Singh <address@hidden>
Reviewed-by: David Gibson <address@hidden>
[clg: - checkpatch fixes ]
Signed-off-by: Cédric Le Goater <address@hidden>
---
target/ppc/mmu-radix64.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/target/ppc/mmu-radix64.c b/target/ppc/mmu-radix64.c
index 066e324464db..b8ecb8fa1d51 100644
--- a/target/ppc/mmu-radix64.c
+++ b/target/ppc/mmu-radix64.c
@@ -212,6 +212,9 @@ static bool validate_pate(PowerPCCPU *cpu, uint64_t lpid,
ppc_v3_pate_t *pate)
if (lpid == 0 && !msr_hv) {
return false;
}
+ if ((pate->dw0 & PATE1_R_PRTS) < 5) {
+ return false;
+ }
/* More checks ... */
return true;
}
--
2.21.0
- [PATCH 0/7] target/ppc: Implement KVM support under TCG (final steps), Cédric Le Goater, 2019/11/28
- [PATCH 1/7] target/ppc: Implement the VTB for HV access, Cédric Le Goater, 2019/11/28
- [PATCH 2/7] target/ppc: Work [S]PURR implementation and add HV support, Cédric Le Goater, 2019/11/28
- [PATCH 3/7] target/ppc: Add SPR ASDR, Cédric Le Goater, 2019/11/28
- [PATCH 4/7] target/ppc: Add SPR TBU40, Cédric Le Goater, 2019/11/28
- [PATCH 5/7] target/ppc: Add privileged message send facilities, Cédric Le Goater, 2019/11/28
- [PATCH 6/7] target/ppc: add support for Hypervisor Facility Unavailable Exception, Cédric Le Goater, 2019/11/28
- [PATCH 7/7] target/ppc: Enforce that the root page directory size must be at least 5,
Cédric Le Goater <=