[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-ppc] [PULL 33/36] ppc/spapr: Use proper HPTE accessors for H_READ
From: |
David Gibson |
Subject: |
[Qemu-ppc] [PULL 33/36] ppc/spapr: Use proper HPTE accessors for H_READ |
Date: |
Fri, 26 Apr 2019 16:06:24 +1000 |
From: Benjamin Herrenschmidt <address@hidden>
Signed-off-by: Benjamin Herrenschmidt <address@hidden>
Signed-off-by: Cédric Le Goater <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: David Gibson <address@hidden>
---
hw/ppc/spapr_hcall.c | 11 +++++------
1 file changed, 5 insertions(+), 6 deletions(-)
diff --git a/hw/ppc/spapr_hcall.c b/hw/ppc/spapr_hcall.c
index 8a736797b9..3534079777 100644
--- a/hw/ppc/spapr_hcall.c
+++ b/hw/ppc/spapr_hcall.c
@@ -304,8 +304,8 @@ static target_ulong h_read(PowerPCCPU *cpu,
SpaprMachineState *spapr,
{
target_ulong flags = args[0];
target_ulong ptex = args[1];
- uint8_t *hpte;
int i, ridx, n_entries = 1;
+ const ppc_hash_pte64_t *hptes;
if (!valid_ptex(cpu, ptex)) {
return H_PARAMETER;
@@ -317,13 +317,12 @@ static target_ulong h_read(PowerPCCPU *cpu,
SpaprMachineState *spapr,
n_entries = 4;
}
- hpte = spapr->htab + (ptex * HASH_PTE_SIZE_64);
-
+ hptes = ppc_hash64_map_hptes(cpu, ptex, n_entries);
for (i = 0, ridx = 0; i < n_entries; i++) {
- args[ridx++] = ldq_p(hpte);
- args[ridx++] = ldq_p(hpte + (HASH_PTE_SIZE_64/2));
- hpte += HASH_PTE_SIZE_64;
+ args[ridx++] = ppc_hash64_hpte0(cpu, hptes, i);
+ args[ridx++] = ppc_hash64_hpte1(cpu, hptes, i);
}
+ ppc_hash64_unmap_hptes(cpu, hptes, ptex, n_entries);
return H_SUCCESS;
}
--
2.20.1
- [Qemu-ppc] [PULL 27/36] target/ppc: Style fixes for translate/spe-impl.inc.c, (continued)
- [Qemu-ppc] [PULL 27/36] target/ppc: Style fixes for translate/spe-impl.inc.c, David Gibson, 2019/04/26
- [Qemu-ppc] [PULL 24/36] target/ppc: Style fixes for translate/fp-impl.inc.c, David Gibson, 2019/04/26
- [Qemu-ppc] [PULL 20/36] target/ppc: Style fixes for mmu_helper.c, David Gibson, 2019/04/26
- [Qemu-ppc] [PULL 22/36] target/ppc: Style fixes for translate_init.inc.c, David Gibson, 2019/04/26
- [Qemu-ppc] [PULL 34/36] ppc/hash64: Rework R and C bit updates, David Gibson, 2019/04/26
- [Qemu-ppc] [PULL 32/36] target/ppc: Don't check UPRT in radix mode when in HV real mode, David Gibson, 2019/04/26
- [Qemu-ppc] [PULL 25/36] target/ppc: Style fixes for translate/vsx-impl.inc.c, David Gibson, 2019/04/26
- [Qemu-ppc] [PULL 36/36] target/ppc: improve performance of large BAT invalidations, David Gibson, 2019/04/26
- [Qemu-ppc] [PULL 30/36] target/ppc/trace-events: Fix trivial typo, David Gibson, 2019/04/26
- [Qemu-ppc] [PULL 35/36] ppc/hash32: Rework R and C bit updates, David Gibson, 2019/04/26
- [Qemu-ppc] [PULL 33/36] ppc/spapr: Use proper HPTE accessors for H_READ,
David Gibson <=
- [Qemu-ppc] [PULL 31/36] target/ppc/kvm: Convert DPRINTF to traces, David Gibson, 2019/04/26
- [Qemu-ppc] [PULL 03/36] spapr/rtas: modify spapr_rtas_register() to remove RTAS handlers, David Gibson, 2019/04/26
- [Qemu-ppc] [PULL 28/36] spapr_pci: Get rid of duplicate code for node name creation, David Gibson, 2019/04/26
- Re: [Qemu-ppc] [PULL 00/36] ppc-for-4.1 queue 20190426, Peter Maydell, 2019/04/28