[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 4/4] virt: Set reset-cbar on CPUs
From: |
Peter Maydell |
Subject: |
Re: [Qemu-devel] [PATCH 4/4] virt: Set reset-cbar on CPUs |
Date: |
Wed, 26 Feb 2014 17:05:17 +0000 |
On 25 February 2014 08:23, Peter Crosthwaite
<address@hidden> wrote:
> On Tue, Feb 25, 2014 at 6:24 AM, Peter Maydell <address@hidden> wrote:
>> Set the reset-cbar property on CPUs used by the virt board,
>> if they have it. This isn't necessary for correct functioning
>> under Linux (since the A9 isn't a valid CPU for the virt board),
>> but it is the correct behaviour.
>>
>> Signed-off-by: Peter Maydell <address@hidden>
>> ---
>> hw/arm/virt.c | 11 +++++++++++
>> 1 file changed, 11 insertions(+)
>>
>> diff --git a/hw/arm/virt.c b/hw/arm/virt.c
>> index 517f2fe..b418b77 100644
>> --- a/hw/arm/virt.c
>> +++ b/hw/arm/virt.c
>> @@ -379,6 +379,7 @@ static void machvirt_init(QEMUMachineInitArgs *args)
>> for (n = 0; n < smp_cpus; n++) {
>> ObjectClass *oc = cpu_class_by_name(TYPE_ARM_CPU, cpu_model);
>> Object *cpuobj;
>> + Error *err = NULL;
>>
>> if (!oc) {
>> fprintf(stderr, "Unable to find CPU definition\n");
>> @@ -390,6 +391,16 @@ static void machvirt_init(QEMUMachineInitArgs *args)
>> if (n > 0) {
>> object_property_set_bool(cpuobj, true, "start-powered-off",
>> NULL);
>> }
>> +
>> + if (object_property_find(cpuobj, "reset-cbar", NULL)) {
>> + object_property_set_int(cpuobj,
>> vbi->memmap[VIRT_CPUPERIPHS].base,
>> + "reset-cbar", &err);
>> + if (err) {
>> + error_report("%s", error_get_pretty(err));
>> + exit(1);
>> + }
>
> If the property exists (as enforced by the if), and you cant set it,
> its probably a fatal and candidate for error_abort.
Yeah. It was rather unclear to me what the right error handling
behaviour for these was.
thanks
-- PMM