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

Re: [Xen-devel] [PATCH 7/7] xen: Implement hot_add_cpu hook.

On 20/06/13 14:40, Stefano Stabellini wrote:
>> > diff --git a/hw/acpi_piix4.c b/hw/acpi_piix4.c
>> > index 56d7c2c..059b64f 100644
>> > --- a/hw/acpi_piix4.c
>> > +++ b/hw/acpi_piix4.c
>> > @@ -662,6 +662,26 @@ static void piix4_cpu_hotplug_req(PIIX4PMState *s, 
>> > int64_t cpu_id,
>> >      pm_update_sci(s);
>> >  }
>> >  
>> > +static PIIX4PMState *piix4pm_state;
> I really dislike this static variable. Isn't there a way to retrieve the
> PIIX4PMState from the cpu_id?

There is currently no other way to get the state from. The way it's done
upsteam is by introducing a new notifier for added cpus, but it just
another static variable hidden somewhere else.

The patch introducing the new notifier could be backported but not as
is, as it would require other change on the CPU object (as explain in an
other mail in this thread).

So this static global variable seams to me the simple thing to do for
the release instead of backporting more and more patches.

Anthony PERARD

Xen-devel mailing list



Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.