[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-ppc] [Qemu-devel] [RFC PATCH v2 3/4] spapr: Make h_register_pr
From: |
Laurent Vivier |
Subject: |
Re: [Qemu-ppc] [Qemu-devel] [RFC PATCH v2 3/4] spapr: Make h_register_process_table hcall flags global |
Date: |
Sun, 21 May 2017 20:48:42 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.1.0 |
On 19/05/2017 07:40, Bharata B Rao wrote:
> The flags used in h_register_process_table hcall are needed in spapr.c
> and hence move them to a header file. While doing so, give them
> slightly specific names.
>
> Signed-off-by: Bharata B Rao <address@hidden>
> Reviewed-by: David Gibson <address@hidden>
> ---
> hw/ppc/spapr_hcall.c | 31 ++++++++++++++-----------------
> include/hw/ppc/spapr.h | 10 ++++++++++
> 2 files changed, 24 insertions(+), 17 deletions(-)
>
> diff --git a/hw/ppc/spapr_hcall.c b/hw/ppc/spapr_hcall.c
> index cea5d99..3915e6f 100644
> --- a/hw/ppc/spapr_hcall.c
> +++ b/hw/ppc/spapr_hcall.c
> @@ -921,13 +921,6 @@ static void spapr_check_setup_free_hpt(sPAPRMachineState
> *spapr,
> return;
> }
>
> -#define FLAGS_MASK 0x01FULL
> -#define FLAG_MODIFY 0x10
> -#define FLAG_REGISTER 0x08
> -#define FLAG_RADIX 0x04
> -#define FLAG_HASH_PROC_TBL 0x02
> -#define FLAG_GTSE 0x01
> -
...
> diff --git a/include/hw/ppc/spapr.h b/include/hw/ppc/spapr.h
> index e581c4a..588872a 100644
> --- a/include/hw/ppc/spapr.h
> +++ b/include/hw/ppc/spapr.h
> @@ -685,4 +685,14 @@ int spapr_rng_populate_dt(void *fdt);
>
> void spapr_do_system_reset_on_cpu(CPUState *cs, run_on_cpu_data arg);
>
> +/*
> + * Defines for flag value used in H_REGISTER_PROC_TBL hcall.
> + */
> +#define SPAPR_PROC_TABLE_MASK 0x01FULL
> +#define SPAPR_PROC_TABLE_MODIFY 0x10
> +#define SPAPR_PROC_TABLE_REGISTER 0x08
> +#define SPAPR_PROC_TABLE_RADIX 0x04
> +#define SPAPR_PROC_TABLE_HPT_PT 0x02
> +#define SPAPR_PROC_TABLE_GTSE 0x01
I think it should be cleaner if you use 0x1fULL
Laurent
- [Qemu-ppc] [RFC PATCH v2 0/4] ppc/spapr: Fix migration of radix guests, Bharata B Rao, 2017/05/19
- [Qemu-ppc] [RFC PATCH v2 2/4] spapr: Unregister HPT savevm handlers for radix guests, Bharata B Rao, 2017/05/19
- [Qemu-ppc] [RFC PATCH v2 3/4] spapr: Make h_register_process_table hcall flags global, Bharata B Rao, 2017/05/19
- Re: [Qemu-ppc] [Qemu-devel] [RFC PATCH v2 3/4] spapr: Make h_register_process_table hcall flags global,
Laurent Vivier <=
- [Qemu-ppc] [RFC PATCH v2 4/4] spapr: Fix migration of Radix guests, Bharata B Rao, 2017/05/19
- Re: [Qemu-ppc] [RFC PATCH v2 4/4] spapr: Fix migration of Radix guests, Suraj Jitindar Singh, 2017/05/22