[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 2/6] ppc/spapr: Use proper HPTE accessors for H_
From: |
David Gibson |
Subject: |
Re: [Qemu-devel] [PATCH 2/6] ppc/spapr: Use proper HPTE accessors for H_READ |
Date: |
Fri, 12 Apr 2019 16:11:46 +1000 |
User-agent: |
Mutt/1.11.3 (2019-02-01) |
On Thu, Apr 11, 2019 at 10:00:00AM +0200, Cédric Le Goater wrote:
> From: Benjamin Herrenschmidt <address@hidden>
>
> Signed-off-by: Benjamin Herrenschmidt <address@hidden>
> Signed-off-by: Cédric Le Goater <address@hidden>
Applied, thanks.
> ---
> 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 be8044a92f2f..7761d4a841af 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;
> }
--
David Gibson | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_
| _way_ _around_!
http://www.ozlabs.org/~dgibson
signature.asc
Description: PGP signature
- [Qemu-devel] [PATCH 0/6] ppc: misc fixes for Radix and Hash, Cédric Le Goater, 2019/04/11
- [Qemu-devel] [PATCH 2/6] ppc/spapr: Use proper HPTE accessors for H_READ, Cédric Le Goater, 2019/04/11
- Re: [Qemu-devel] [PATCH 2/6] ppc/spapr: Use proper HPTE accessors for H_READ,
David Gibson <=
- [Qemu-devel] [PATCH 1/6] target/ppc: Don't check UPRT in radix mode when in HV real mode, Cédric Le Goater, 2019/04/11
- [Qemu-devel] [PATCH 3/6] ppc/hash64: Rework R and C bit updates, Cédric Le Goater, 2019/04/11
- [Qemu-devel] [PATCH 4/6] ppc/hash32: Rework R and C bit updates, Cédric Le Goater, 2019/04/11
- [Qemu-devel] [PATCH 5/6] memory_ldst: Add atomic ops for PTE updates, Cédric Le Goater, 2019/04/11