qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v5 1/3] sclp-s390: Add device to manage s390 mem


From: Matthew Rosato
Subject: Re: [Qemu-devel] [PATCH v5 1/3] sclp-s390: Add device to manage s390 memory hotplug
Date: Wed, 25 Jun 2014 11:16:43 -0400
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.6.0

On 06/25/2014 10:53 AM, Igor Mammedov wrote:
> On Wed, 25 Jun 2014 10:26:58 -0400
> Matthew Rosato <address@hidden> wrote:
> 
>> Add sclpMemoryHotplugDev to contain associated data structures, etc.
>>
>> Signed-off-by: Matthew Rosato <address@hidden>
>> ---
>>  hw/s390x/sclp.c         |   30 ++++++++++++++++++++++++++++++
>>  include/hw/s390x/sclp.h |   20 ++++++++++++++++++++
>>  2 files changed, 50 insertions(+)
>>
>> diff --git a/hw/s390x/sclp.c b/hw/s390x/sclp.c
>> index d8ddf35..769d7c3 100644
>> --- a/hw/s390x/sclp.c
>> +++ b/hw/s390x/sclp.c
>> @@ -183,3 +183,33 @@ void s390_sclp_init(void)
>>                                OBJECT(dev), NULL);
>>      qdev_init_nofail(dev);
>>  }
>> +
>> +sclpMemoryHotplugDev *init_sclp_memory_hotplug_dev(void)
>> +{
>> +    DeviceState *dev;
>> +    dev = qdev_create(NULL, TYPE_SCLP_MEMORY_HOTPLUG_DEV);
>> +    object_property_add_child(qdev_get_machine(),
>> +                              TYPE_SCLP_MEMORY_HOTPLUG_DEV,
>> +                              OBJECT(dev), NULL);
>> +    qdev_init_nofail(dev);
>> +    return SCLP_MEMORY_HOTPLUG_DEV(object_resolve_path(
>> +                                   TYPE_SCLP_MEMORY_HOTPLUG_DEV, NULL));
>> +}
>> +
>> +sclpMemoryHotplugDev *get_sclp_memory_hotplug_dev(void)
>> +{
>> +    return SCLP_MEMORY_HOTPLUG_DEV(object_resolve_path(
>> +                                   TYPE_SCLP_MEMORY_HOTPLUG_DEV, NULL));
>> +}
>> +
>> +static TypeInfo sclp_memory_hotplug_dev_info = {
>> +    .name = TYPE_SCLP_MEMORY_HOTPLUG_DEV,
>> +    .parent = TYPE_SYS_BUS_DEVICE,
>> +    .instance_size = sizeof(sclpMemoryHotplugDev),
> 
> Either parent above should be TYPE_DEVICE or
>  s/DeviceState/SysBusDevice/ below
> 

Oops, good catch - I tested s/DeviceState/SysBusDevice/ and will include
it in the next version.  Thanks.

>> +struct sclpMemoryHotplugDev {
>> +    DeviceState parent;
> 
> 
> 




reply via email to

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