qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v7 6/6] Add gicversion option to virt machine


From: Peter Maydell
Subject: Re: [Qemu-devel] [PATCH v7 6/6] Add gicversion option to virt machine
Date: Fri, 31 Jul 2015 16:44:44 +0100

On 24 July 2015 at 10:55, Pavel Fedin <address@hidden> wrote:
> Set kernel_irqchip_type according to value of the option and pass it
> around where necessary. Instantiate devices and fdt nodes according
> to the choice.
>
> max_cpus for virt machine increased to 64. GICv2 compatibility check
> happens inside arm_gic_common_realize().
>
>      gicdev = qdev_create(NULL, gictype);
> -    qdev_prop_set_uint32(gicdev, "revision", 2);
> +
> +    for (i = 0; i < vbi->smp_cpus; i++) {
> +        CPUState *cpu = qemu_get_cpu(i);
> +        CPUARMState *env = cpu->env_ptr;
> +        env->nvic = gicdev;
> +    }

We definitely need to come up with a something cleaner
than this (which is ugly for two reasons -- firstly
for borrowing the nvic pointer and secondly because
we shouldn't just be putting random pointers between
the two like this, ideally; and we definitely don't want
the board code to have to do it at this level.)

-- PMM



reply via email to

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