qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 13/19] target-i386: cpu: attach ICC bus to CPU o


From: Andreas Färber
Subject: Re: [Qemu-devel] [PATCH 13/19] target-i386: cpu: attach ICC bus to CPU on its creation
Date: Mon, 15 Apr 2013 18:06:40 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130329 Thunderbird/17.0.5

Am 15.04.2013 17:49, schrieb Igor Mammedov:
> On Mon, 15 Apr 2013 17:38:51 +0200
> Andreas Färber <address@hidden> wrote:
> 
>> Am 11.04.2013 16:51, schrieb Igor Mammedov:
>>> ... during startup,  so it would be possible to uplug it later
>>
>> unplug?
> CPU won't be unplug-able if it's not on ICC bus.

Sorry? Question was whether "uplug" is a typo and should read "unplug"?
On openSUSE 12.3 there is no command called uplug. :)

>>> and set bus_type to TYPE_ICC_BUS for X86CPU type to make device_add
>>> attach hotplugged CPU to ICC bus.
>>>
>>> Signed-off-by: Igor Mammedov <address@hidden>
>>> ---
>>>  target-i386/cpu.c | 7 +++++++
>>>  1 file changed, 7 insertions(+)
>>>
>>> diff --git a/target-i386/cpu.c b/target-i386/cpu.c
>>> index 4ddc18a..2bb38d6 100644
>>> --- a/target-i386/cpu.c
>>> +++ b/target-i386/cpu.c
[...]
>>> @@ -1620,6 +1622,10 @@ X86CPU *cpu_x86_create(const char *cpu_model,
>>> Error **errp) features = model_pieces[1];
>>>  
>>>      cpu = X86_CPU(object_new(TYPE_X86_CPU));
>>> +    if (icc_bus) {
>>> +        qdev_set_parent_bus(DEVICE(cpu), BUS(icc_bus));
>>> +        object_unref(OBJECT(cpu));
>>
>> Why are you unref'ing here? (Paolo?)
> 
> To leave only one reference to it since qdev_set_parent_bus() just
> incremented it. Like it's done in qdev_try_create().

Ah, I see, thanks.

Andreas

-- 
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg



reply via email to

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