qemu-ppc
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-ppc] [PATCH v4 1/5] target/ppc: return a nil HPT base address


From: David Gibson
Subject: Re: [Qemu-ppc] [PATCH v4 1/5] target/ppc: return a nil HPT base address on sPAPR machines
Date: Thu, 3 May 2018 00:59:35 +1000
User-agent: Mutt/1.9.3 (2018-01-21)

On Tue, Apr 24, 2018 at 01:30:41PM +0200, Cédric Le Goater wrote:
> commit e57ca75ce3b2 ("target/ppc: Manage external HPT via virtual
> hypervisor") exported a set of methods to manipulate the HPT from the
> core hash MMU. But SPR_SDR1 is still used under some circumstances to
> get the base address of the HPT, which is incorrect for the sPAPR
> machines.
> 
> Only the logging should be impacted.
> 
> Signed-off-by: Cédric Le Goater <address@hidden>

Even better would be having an asserT(!vhyp) here, but that would
require some irritating fiddling with the callers.

This is a fine interim step, applued.

> ---
> 
>  Changes since v3:
> 
>  - removed spapr_hpt_base() ops and just return zero instead
> 
>  target/ppc/mmu-hash64.h | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/target/ppc/mmu-hash64.h b/target/ppc/mmu-hash64.h
> index f23b78d78754..53dcec5b9316 100644
> --- a/target/ppc/mmu-hash64.h
> +++ b/target/ppc/mmu-hash64.h
> @@ -101,6 +101,9 @@ void ppc_hash64_finalize(PowerPCCPU *cpu);
>  
>  static inline hwaddr ppc_hash64_hpt_base(PowerPCCPU *cpu)
>  {
> +    if (cpu->vhyp) {
> +        return 0;
> +    }
>      return cpu->env.spr[SPR_SDR1] & SDR_64_HTABORG;
>  }
>  

-- 
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

Attachment: signature.asc
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]