Am 10.07.2012 10:45, schrieb Paolo Bonzini:
> Il 10/07/2012 08:16, Liu Ping Fan ha scritto:
>> Signed-off-by: Liu Ping Fan <pingf...@linux.vnet.ibm.com>
>> ---
>>  hw/pc.c |   10 +++++-----
>>  1 files changed, 5 insertions(+), 5 deletions(-)
>>
>> diff --git a/hw/pc.c b/hw/pc.c
>> index c7e9ab3..8df58c9 100644
>> --- a/hw/pc.c
>> +++ b/hw/pc.c
>> @@ -886,17 +886,17 @@ DeviceState *cpu_get_current_apic(void)
>>      }
>>  }
>>  
>> -static DeviceState *apic_init(void *env, uint8_t apic_id)
>> +static DeviceState *apic_init(void *cpu, void *env, uint8_t apic_id)
>>  {
>>      DeviceState *dev;
>>      static int apic_mapped;
>>  
>>      if (kvm_irqchip_in_kernel()) {
>> -        dev = qdev_create(NULL, "kvm-apic");
>> +        dev = qdev_create_kid(OBJECT(cpu), "kvm-apic");
>>      } else if (xen_enabled()) {
>> -        dev = qdev_create(NULL, "xen-apic");
>> +        dev = qdev_create_kid(OBJECT(cpu), "xen-apic");
>>      } else {
>> -        dev = qdev_create(NULL, "apic");
>> +        dev = qdev_create_kid(OBJECT(cpu), "apic");
>>      }
> 
> Does it make sense instead to do this in the realize method of the CPU?

Igor was working on patches to do that. We ran into other design issues
on that road, yesterday I made a proposal how we might proceed with his
approach:

http://lists.nongnu.org/archive/html/qemu-devel/2012-07/msg00992.html

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