[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-ppc] [PATCH v7 18/19] spapr: add a 'pseries-4.0-xive' machine
From: |
Cédric Le Goater |
Subject: |
Re: [Qemu-ppc] [PATCH v7 18/19] spapr: add a 'pseries-4.0-xive' machine type |
Date: |
Mon, 10 Dec 2018 23:17:33 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.3.1 |
On 12/9/18 8:46 PM, Cédric Le Goater wrote:
> This pseries machine makes use of a new sPAPR IRQ backend supporting
> the XIVE interrupt mode.
>
> The guest OS is required to have support for the XIVE exploitation
> mode of the POWER9 interrupt controller.
>
> Signed-off-by: Cédric Le Goater <address@hidden>
> ---
> hw/ppc/spapr.c | 15 +++++++++++++++
> 1 file changed, 15 insertions(+)
>
> diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c
> index 4012ebd794a4..3cc134a0b673 100644
> --- a/hw/ppc/spapr.c
> +++ b/hw/ppc/spapr.c
> @@ -3985,6 +3985,21 @@ static void
> spapr_machine_4_0_class_options(MachineClass *mc)
>
> DEFINE_SPAPR_MACHINE(4_0, "4.0", true);
>
> +static void spapr_machine_4_0_xive_instance_options(MachineState *machine)
> +{
> + spapr_machine_4_0_instance_options(machine);
> +}
> +
> +static void spapr_machine_4_0_xive_class_options(MachineClass *mc)
> +{
> + sPAPRMachineClass *smc = SPAPR_MACHINE_CLASS(mc);
> +
> + spapr_machine_4_0_class_options(mc);> + smc->irq = &spapr_irq_xive;
I have been adding checks on the CPU model to export the XIVE capability
only on POWER9 processors but it breaks some of the tests.
I was wondering if we could add a default POWER9 CPU to the -xive machine :
+ mc->default_cpu_type = POWERPC_CPU_TYPE_NAME("power9_v2.0");
and if we could change tests/cpu-plug-test.c with :
@@ -198,8 +198,13 @@ static void add_pseries_test_case(const
}
data = g_new(PlugTestData, 1);
data->machine = g_strdup(mname);
- data->cpu_model = "power8_v2.0";
- data->device_model = g_strdup("power8_v2.0-spapr-cpu-core");
+ if (g_str_has_suffix(mname, "xive")) {
+ data->cpu_model = "power9_v2.0";
+ data->device_model = g_strdup("power9_v2.0-spapr-cpu-core");
+ } else {
+ data->cpu_model = "power8_v2.0";
+ data->device_model = g_strdup("power8_v2.0-spapr-cpu-core");
+ }
data->sockets = 2;
data->cores = 3;
data->threads = 1;
or if there is a better way ?
Thanks,
C.
> +}
> +
> +DEFINE_SPAPR_MACHINE(4_0_xive, "4.0-xive", false);
> +
> /*
> * pseries-3.1
> */
>
- Re: [Qemu-ppc] [PATCH v7 16/19] spapr: introduce a new sPAPR IRQ backend supporting XIVE and XICS, (continued)
[Qemu-ppc] [PATCH v7 17/19] spapr: Add a pseries-4.0 machine type, Cédric Le Goater, 2018/12/09
Re: [Qemu-ppc] [PATCH v7 17/19] spapr: Add a pseries-4.0 machine type, David Gibson, 2018/12/10
[Qemu-ppc] [PATCH v7 18/19] spapr: add a 'pseries-4.0-xive' machine type, Cédric Le Goater, 2018/12/09
[Qemu-ppc] [PATCH v7 19/19] spapr: add a 'pseries-4.0-dual' machine type, Cédric Le Goater, 2018/12/09