qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 2/3] hw/ppc/spapr: Fix the selection of the proc


From: Cédric Le Goater
Subject: Re: [Qemu-devel] [PATCH 2/3] hw/ppc/spapr: Fix the selection of the processor features
Date: Wed, 28 Sep 2016 15:30:31 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.3.0

On 09/28/2016 01:16 PM, Thomas Huth wrote:
> The current code uses pa_features_206 for POWERPC_MMU_2_06, and
> for everything else, it uses pa_features_207. This is bad in some
> cases because there is also a "degraded" MMU version of ISA 2.06,
> called POWERPC_MMU_2_06a, which should of course use the flags for
> 2.06 instead. And there is also the possibility that the user runs
> the pseries machine with a POWER5+ or even 970 processor. In that
> case we certainly do not want to set the flags for 2.07, and rather
> simply skip the setting of the pa-features property instead.
>
> Signed-off-by: Thomas Huth <address@hidden>

Reviewed-by: Cédric Le Goater <address@hidden>

Thanks,

C.

> ---
>  hw/ppc/spapr.c | 11 +++++++++--
>  1 file changed, 9 insertions(+), 2 deletions(-)
> 
> diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c
> index 7ac775d..46d6b90 100644
> --- a/hw/ppc/spapr.c
> +++ b/hw/ppc/spapr.c
> @@ -559,12 +559,19 @@ static void spapr_populate_pa_features(CPUPPCState 
> *env, void *fdt, int offset)
>      uint8_t *pa_features;
>      size_t pa_size;
>  
> -    if (env->mmu_model == POWERPC_MMU_2_06) {
> +    switch (env->mmu_model) {
> +    case POWERPC_MMU_2_06:
> +    case POWERPC_MMU_2_06a:
>          pa_features = pa_features_206;
>          pa_size = sizeof(pa_features_206);
> -    } else { /* env->mmu_model == POWERPC_MMU_2_07 */
> +        break;
> +    case POWERPC_MMU_2_07:
> +    case POWERPC_MMU_2_07a:
>          pa_features = pa_features_207;
>          pa_size = sizeof(pa_features_207);
> +        break;
> +    default:
> +        return;
>      }
>  
>      if (env->ci_large_pages) {
> 




reply via email to

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