[Qemu-devel] [PATCH v1] pc: Use hotplug_handler_(plug|unplug|unplug_request)

David Hildenbrand posted 1 patch 5 years, 3 months ago
Test asan passed
Test docker-clang@ubuntu passed
Test docker-mingw@fedora passed
Test checkpatch passed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20181212095707.19358-1-david@redhat.com
Maintainers: Marcel Apfelbaum <marcel.apfelbaum@gmail.com>, Richard Henderson <rth@twiddle.net>, Paolo Bonzini <pbonzini@redhat.com>, Eduardo Habkost <ehabkost@redhat.com>, "Michael S. Tsirkin" <mst@redhat.com>
hw/i386/pc.c | 30 ++++++++----------------------
1 file changed, 8 insertions(+), 22 deletions(-)
[Qemu-devel] [PATCH v1] pc: Use hotplug_handler_(plug|unplug|unplug_request)
Posted by David Hildenbrand 5 years, 3 months ago
Let's avoid manually looking up the hotplug handler class. Use the
existing wrappers instead.

Signed-off-by: David Hildenbrand <david@redhat.com>
---
 hw/i386/pc.c | 30 ++++++++----------------------
 1 file changed, 8 insertions(+), 22 deletions(-)

diff --git a/hw/i386/pc.c b/hw/i386/pc.c
index 4cd2fbca4d..c8857138f9 100644
--- a/hw/i386/pc.c
+++ b/hw/i386/pc.c
@@ -1711,7 +1711,6 @@ static void pc_memory_pre_plug(HotplugHandler *hotplug_dev, DeviceState *dev,
 static void pc_memory_plug(HotplugHandler *hotplug_dev,
                            DeviceState *dev, Error **errp)
 {
-    HotplugHandlerClass *hhc;
     Error *local_err = NULL;
     PCMachineState *pcms = PC_MACHINE(hotplug_dev);
     bool is_nvdimm = object_dynamic_cast(OBJECT(dev), TYPE_NVDIMM);
@@ -1725,8 +1724,7 @@ static void pc_memory_plug(HotplugHandler *hotplug_dev,
         nvdimm_plug(&pcms->acpi_nvdimm_state);
     }
 
-    hhc = HOTPLUG_HANDLER_GET_CLASS(pcms->acpi_dev);
-    hhc->plug(HOTPLUG_HANDLER(pcms->acpi_dev), dev, &error_abort);
+    hotplug_handler_plug(HOTPLUG_HANDLER(pcms->acpi_dev), dev, &error_abort);
 out:
     error_propagate(errp, local_err);
 }
@@ -1734,7 +1732,6 @@ out:
 static void pc_memory_unplug_request(HotplugHandler *hotplug_dev,
                                      DeviceState *dev, Error **errp)
 {
-    HotplugHandlerClass *hhc;
     Error *local_err = NULL;
     PCMachineState *pcms = PC_MACHINE(hotplug_dev);
 
@@ -1755,9 +1752,8 @@ static void pc_memory_unplug_request(HotplugHandler *hotplug_dev,
         goto out;
     }
 
-    hhc = HOTPLUG_HANDLER_GET_CLASS(pcms->acpi_dev);
-    hhc->unplug_request(HOTPLUG_HANDLER(pcms->acpi_dev), dev, &local_err);
-
+    hotplug_handler_unplug_request(HOTPLUG_HANDLER(pcms->acpi_dev), dev,
+                                   &local_err);
 out:
     error_propagate(errp, local_err);
 }
@@ -1766,12 +1762,9 @@ static void pc_memory_unplug(HotplugHandler *hotplug_dev,
                              DeviceState *dev, Error **errp)
 {
     PCMachineState *pcms = PC_MACHINE(hotplug_dev);
-    HotplugHandlerClass *hhc;
     Error *local_err = NULL;
 
-    hhc = HOTPLUG_HANDLER_GET_CLASS(pcms->acpi_dev);
-    hhc->unplug(HOTPLUG_HANDLER(pcms->acpi_dev), dev, &local_err);
-
+    hotplug_handler_unplug(HOTPLUG_HANDLER(pcms->acpi_dev), dev, &local_err);
     if (local_err) {
         goto out;
     }
@@ -1813,14 +1806,12 @@ static void pc_cpu_plug(HotplugHandler *hotplug_dev,
                         DeviceState *dev, Error **errp)
 {
     CPUArchId *found_cpu;
-    HotplugHandlerClass *hhc;
     Error *local_err = NULL;
     X86CPU *cpu = X86_CPU(dev);
     PCMachineState *pcms = PC_MACHINE(hotplug_dev);
 
     if (pcms->acpi_dev) {
-        hhc = HOTPLUG_HANDLER_GET_CLASS(pcms->acpi_dev);
-        hhc->plug(HOTPLUG_HANDLER(pcms->acpi_dev), dev, &local_err);
+        hotplug_handler_plug(HOTPLUG_HANDLER(pcms->acpi_dev), dev, &local_err);
         if (local_err) {
             goto out;
         }
@@ -1844,7 +1835,6 @@ static void pc_cpu_unplug_request_cb(HotplugHandler *hotplug_dev,
                                      DeviceState *dev, Error **errp)
 {
     int idx = -1;
-    HotplugHandlerClass *hhc;
     Error *local_err = NULL;
     X86CPU *cpu = X86_CPU(dev);
     PCMachineState *pcms = PC_MACHINE(hotplug_dev);
@@ -1861,9 +1851,8 @@ static void pc_cpu_unplug_request_cb(HotplugHandler *hotplug_dev,
         goto out;
     }
 
-    hhc = HOTPLUG_HANDLER_GET_CLASS(pcms->acpi_dev);
-    hhc->unplug_request(HOTPLUG_HANDLER(pcms->acpi_dev), dev, &local_err);
-
+    hotplug_handler_unplug_request(HOTPLUG_HANDLER(pcms->acpi_dev), dev,
+                                   &local_err);
     if (local_err) {
         goto out;
     }
@@ -1877,14 +1866,11 @@ static void pc_cpu_unplug_cb(HotplugHandler *hotplug_dev,
                              DeviceState *dev, Error **errp)
 {
     CPUArchId *found_cpu;
-    HotplugHandlerClass *hhc;
     Error *local_err = NULL;
     X86CPU *cpu = X86_CPU(dev);
     PCMachineState *pcms = PC_MACHINE(hotplug_dev);
 
-    hhc = HOTPLUG_HANDLER_GET_CLASS(pcms->acpi_dev);
-    hhc->unplug(HOTPLUG_HANDLER(pcms->acpi_dev), dev, &local_err);
-
+    hotplug_handler_unplug(HOTPLUG_HANDLER(pcms->acpi_dev), dev, &local_err);
     if (local_err) {
         goto out;
     }
-- 
2.17.2


Re: [Qemu-devel] [PATCH v1] pc: Use hotplug_handler_(plug|unplug|unplug_request)
Posted by Paolo Bonzini 5 years, 3 months ago
On 12/12/18 10:57, David Hildenbrand wrote:
> Let's avoid manually looking up the hotplug handler class. Use the
> existing wrappers instead.
> 
> Signed-off-by: David Hildenbrand <david@redhat.com>
> ---
>  hw/i386/pc.c | 30 ++++++++----------------------
>  1 file changed, 8 insertions(+), 22 deletions(-)
> 
> diff --git a/hw/i386/pc.c b/hw/i386/pc.c
> index 4cd2fbca4d..c8857138f9 100644
> --- a/hw/i386/pc.c
> +++ b/hw/i386/pc.c
> @@ -1711,7 +1711,6 @@ static void pc_memory_pre_plug(HotplugHandler *hotplug_dev, DeviceState *dev,
>  static void pc_memory_plug(HotplugHandler *hotplug_dev,
>                             DeviceState *dev, Error **errp)
>  {
> -    HotplugHandlerClass *hhc;
>      Error *local_err = NULL;
>      PCMachineState *pcms = PC_MACHINE(hotplug_dev);
>      bool is_nvdimm = object_dynamic_cast(OBJECT(dev), TYPE_NVDIMM);
> @@ -1725,8 +1724,7 @@ static void pc_memory_plug(HotplugHandler *hotplug_dev,
>          nvdimm_plug(&pcms->acpi_nvdimm_state);
>      }
>  
> -    hhc = HOTPLUG_HANDLER_GET_CLASS(pcms->acpi_dev);
> -    hhc->plug(HOTPLUG_HANDLER(pcms->acpi_dev), dev, &error_abort);
> +    hotplug_handler_plug(HOTPLUG_HANDLER(pcms->acpi_dev), dev, &error_abort);
>  out:
>      error_propagate(errp, local_err);
>  }
> @@ -1734,7 +1732,6 @@ out:
>  static void pc_memory_unplug_request(HotplugHandler *hotplug_dev,
>                                       DeviceState *dev, Error **errp)
>  {
> -    HotplugHandlerClass *hhc;
>      Error *local_err = NULL;
>      PCMachineState *pcms = PC_MACHINE(hotplug_dev);
>  
> @@ -1755,9 +1752,8 @@ static void pc_memory_unplug_request(HotplugHandler *hotplug_dev,
>          goto out;
>      }
>  
> -    hhc = HOTPLUG_HANDLER_GET_CLASS(pcms->acpi_dev);
> -    hhc->unplug_request(HOTPLUG_HANDLER(pcms->acpi_dev), dev, &local_err);
> -
> +    hotplug_handler_unplug_request(HOTPLUG_HANDLER(pcms->acpi_dev), dev,
> +                                   &local_err);
>  out:
>      error_propagate(errp, local_err);
>  }
> @@ -1766,12 +1762,9 @@ static void pc_memory_unplug(HotplugHandler *hotplug_dev,
>                               DeviceState *dev, Error **errp)
>  {
>      PCMachineState *pcms = PC_MACHINE(hotplug_dev);
> -    HotplugHandlerClass *hhc;
>      Error *local_err = NULL;
>  
> -    hhc = HOTPLUG_HANDLER_GET_CLASS(pcms->acpi_dev);
> -    hhc->unplug(HOTPLUG_HANDLER(pcms->acpi_dev), dev, &local_err);
> -
> +    hotplug_handler_unplug(HOTPLUG_HANDLER(pcms->acpi_dev), dev, &local_err);
>      if (local_err) {
>          goto out;
>      }
> @@ -1813,14 +1806,12 @@ static void pc_cpu_plug(HotplugHandler *hotplug_dev,
>                          DeviceState *dev, Error **errp)
>  {
>      CPUArchId *found_cpu;
> -    HotplugHandlerClass *hhc;
>      Error *local_err = NULL;
>      X86CPU *cpu = X86_CPU(dev);
>      PCMachineState *pcms = PC_MACHINE(hotplug_dev);
>  
>      if (pcms->acpi_dev) {
> -        hhc = HOTPLUG_HANDLER_GET_CLASS(pcms->acpi_dev);
> -        hhc->plug(HOTPLUG_HANDLER(pcms->acpi_dev), dev, &local_err);
> +        hotplug_handler_plug(HOTPLUG_HANDLER(pcms->acpi_dev), dev, &local_err);
>          if (local_err) {
>              goto out;
>          }
> @@ -1844,7 +1835,6 @@ static void pc_cpu_unplug_request_cb(HotplugHandler *hotplug_dev,
>                                       DeviceState *dev, Error **errp)
>  {
>      int idx = -1;
> -    HotplugHandlerClass *hhc;
>      Error *local_err = NULL;
>      X86CPU *cpu = X86_CPU(dev);
>      PCMachineState *pcms = PC_MACHINE(hotplug_dev);
> @@ -1861,9 +1851,8 @@ static void pc_cpu_unplug_request_cb(HotplugHandler *hotplug_dev,
>          goto out;
>      }
>  
> -    hhc = HOTPLUG_HANDLER_GET_CLASS(pcms->acpi_dev);
> -    hhc->unplug_request(HOTPLUG_HANDLER(pcms->acpi_dev), dev, &local_err);
> -
> +    hotplug_handler_unplug_request(HOTPLUG_HANDLER(pcms->acpi_dev), dev,
> +                                   &local_err);
>      if (local_err) {
>          goto out;
>      }
> @@ -1877,14 +1866,11 @@ static void pc_cpu_unplug_cb(HotplugHandler *hotplug_dev,
>                               DeviceState *dev, Error **errp)
>  {
>      CPUArchId *found_cpu;
> -    HotplugHandlerClass *hhc;
>      Error *local_err = NULL;
>      X86CPU *cpu = X86_CPU(dev);
>      PCMachineState *pcms = PC_MACHINE(hotplug_dev);
>  
> -    hhc = HOTPLUG_HANDLER_GET_CLASS(pcms->acpi_dev);
> -    hhc->unplug(HOTPLUG_HANDLER(pcms->acpi_dev), dev, &local_err);
> -
> +    hotplug_handler_unplug(HOTPLUG_HANDLER(pcms->acpi_dev), dev, &local_err);
>      if (local_err) {
>          goto out;
>      }
> 

Queued, thanks.

Paolo

Re: [Qemu-devel] [PATCH v1] pc: Use hotplug_handler_(plug|unplug|unplug_request)
Posted by David Hildenbrand 5 years, 1 month ago
On 14.12.18 10:58, Paolo Bonzini wrote:
> On 12/12/18 10:57, David Hildenbrand wrote:
>> Let's avoid manually looking up the hotplug handler class. Use the
>> existing wrappers instead.
>>
>> Signed-off-by: David Hildenbrand <david@redhat.com>
>> ---
>>  hw/i386/pc.c | 30 ++++++++----------------------
>>  1 file changed, 8 insertions(+), 22 deletions(-)
>>
>> diff --git a/hw/i386/pc.c b/hw/i386/pc.c
>> index 4cd2fbca4d..c8857138f9 100644
>> --- a/hw/i386/pc.c
>> +++ b/hw/i386/pc.c
>> @@ -1711,7 +1711,6 @@ static void pc_memory_pre_plug(HotplugHandler *hotplug_dev, DeviceState *dev,
>>  static void pc_memory_plug(HotplugHandler *hotplug_dev,
>>                             DeviceState *dev, Error **errp)
>>  {
>> -    HotplugHandlerClass *hhc;
>>      Error *local_err = NULL;
>>      PCMachineState *pcms = PC_MACHINE(hotplug_dev);
>>      bool is_nvdimm = object_dynamic_cast(OBJECT(dev), TYPE_NVDIMM);
>> @@ -1725,8 +1724,7 @@ static void pc_memory_plug(HotplugHandler *hotplug_dev,
>>          nvdimm_plug(&pcms->acpi_nvdimm_state);
>>      }
>>  
>> -    hhc = HOTPLUG_HANDLER_GET_CLASS(pcms->acpi_dev);
>> -    hhc->plug(HOTPLUG_HANDLER(pcms->acpi_dev), dev, &error_abort);
>> +    hotplug_handler_plug(HOTPLUG_HANDLER(pcms->acpi_dev), dev, &error_abort);
>>  out:
>>      error_propagate(errp, local_err);
>>  }
>> @@ -1734,7 +1732,6 @@ out:
>>  static void pc_memory_unplug_request(HotplugHandler *hotplug_dev,
>>                                       DeviceState *dev, Error **errp)
>>  {
>> -    HotplugHandlerClass *hhc;
>>      Error *local_err = NULL;
>>      PCMachineState *pcms = PC_MACHINE(hotplug_dev);
>>  
>> @@ -1755,9 +1752,8 @@ static void pc_memory_unplug_request(HotplugHandler *hotplug_dev,
>>          goto out;
>>      }
>>  
>> -    hhc = HOTPLUG_HANDLER_GET_CLASS(pcms->acpi_dev);
>> -    hhc->unplug_request(HOTPLUG_HANDLER(pcms->acpi_dev), dev, &local_err);
>> -
>> +    hotplug_handler_unplug_request(HOTPLUG_HANDLER(pcms->acpi_dev), dev,
>> +                                   &local_err);
>>  out:
>>      error_propagate(errp, local_err);
>>  }
>> @@ -1766,12 +1762,9 @@ static void pc_memory_unplug(HotplugHandler *hotplug_dev,
>>                               DeviceState *dev, Error **errp)
>>  {
>>      PCMachineState *pcms = PC_MACHINE(hotplug_dev);
>> -    HotplugHandlerClass *hhc;
>>      Error *local_err = NULL;
>>  
>> -    hhc = HOTPLUG_HANDLER_GET_CLASS(pcms->acpi_dev);
>> -    hhc->unplug(HOTPLUG_HANDLER(pcms->acpi_dev), dev, &local_err);
>> -
>> +    hotplug_handler_unplug(HOTPLUG_HANDLER(pcms->acpi_dev), dev, &local_err);
>>      if (local_err) {
>>          goto out;
>>      }
>> @@ -1813,14 +1806,12 @@ static void pc_cpu_plug(HotplugHandler *hotplug_dev,
>>                          DeviceState *dev, Error **errp)
>>  {
>>      CPUArchId *found_cpu;
>> -    HotplugHandlerClass *hhc;
>>      Error *local_err = NULL;
>>      X86CPU *cpu = X86_CPU(dev);
>>      PCMachineState *pcms = PC_MACHINE(hotplug_dev);
>>  
>>      if (pcms->acpi_dev) {
>> -        hhc = HOTPLUG_HANDLER_GET_CLASS(pcms->acpi_dev);
>> -        hhc->plug(HOTPLUG_HANDLER(pcms->acpi_dev), dev, &local_err);
>> +        hotplug_handler_plug(HOTPLUG_HANDLER(pcms->acpi_dev), dev, &local_err);
>>          if (local_err) {
>>              goto out;
>>          }
>> @@ -1844,7 +1835,6 @@ static void pc_cpu_unplug_request_cb(HotplugHandler *hotplug_dev,
>>                                       DeviceState *dev, Error **errp)
>>  {
>>      int idx = -1;
>> -    HotplugHandlerClass *hhc;
>>      Error *local_err = NULL;
>>      X86CPU *cpu = X86_CPU(dev);
>>      PCMachineState *pcms = PC_MACHINE(hotplug_dev);
>> @@ -1861,9 +1851,8 @@ static void pc_cpu_unplug_request_cb(HotplugHandler *hotplug_dev,
>>          goto out;
>>      }
>>  
>> -    hhc = HOTPLUG_HANDLER_GET_CLASS(pcms->acpi_dev);
>> -    hhc->unplug_request(HOTPLUG_HANDLER(pcms->acpi_dev), dev, &local_err);
>> -
>> +    hotplug_handler_unplug_request(HOTPLUG_HANDLER(pcms->acpi_dev), dev,
>> +                                   &local_err);
>>      if (local_err) {
>>          goto out;
>>      }
>> @@ -1877,14 +1866,11 @@ static void pc_cpu_unplug_cb(HotplugHandler *hotplug_dev,
>>                               DeviceState *dev, Error **errp)
>>  {
>>      CPUArchId *found_cpu;
>> -    HotplugHandlerClass *hhc;
>>      Error *local_err = NULL;
>>      X86CPU *cpu = X86_CPU(dev);
>>      PCMachineState *pcms = PC_MACHINE(hotplug_dev);
>>  
>> -    hhc = HOTPLUG_HANDLER_GET_CLASS(pcms->acpi_dev);
>> -    hhc->unplug(HOTPLUG_HANDLER(pcms->acpi_dev), dev, &local_err);
>> -
>> +    hotplug_handler_unplug(HOTPLUG_HANDLER(pcms->acpi_dev), dev, &local_err);
>>      if (local_err) {
>>          goto out;
>>      }
>>
> 
> Queued, thanks.

Paolo, just wondering, is this still on your queue or fell of the wagon?

Thanks!

> 
> Paolo
> 


-- 

Thanks,

David / dhildenb

Re: [Qemu-devel] [PATCH v1] pc: Use hotplug_handler_(plug|unplug|unplug_request)
Posted by Paolo Bonzini 5 years, 1 month ago
On 30/01/19 13:35, David Hildenbrand wrote:
> On 14.12.18 10:58, Paolo Bonzini wrote:
>> On 12/12/18 10:57, David Hildenbrand wrote:
>>> Let's avoid manually looking up the hotplug handler class. Use the
>>> existing wrappers instead.
>>>
>>> Signed-off-by: David Hildenbrand <david@redhat.com>
>>> ---
>>>  hw/i386/pc.c | 30 ++++++++----------------------
>>>  1 file changed, 8 insertions(+), 22 deletions(-)
>>>
>>> diff --git a/hw/i386/pc.c b/hw/i386/pc.c
>>> index 4cd2fbca4d..c8857138f9 100644
>>> --- a/hw/i386/pc.c
>>> +++ b/hw/i386/pc.c
>>> @@ -1711,7 +1711,6 @@ static void pc_memory_pre_plug(HotplugHandler *hotplug_dev, DeviceState *dev,
>>>  static void pc_memory_plug(HotplugHandler *hotplug_dev,
>>>                             DeviceState *dev, Error **errp)
>>>  {
>>> -    HotplugHandlerClass *hhc;
>>>      Error *local_err = NULL;
>>>      PCMachineState *pcms = PC_MACHINE(hotplug_dev);
>>>      bool is_nvdimm = object_dynamic_cast(OBJECT(dev), TYPE_NVDIMM);
>>> @@ -1725,8 +1724,7 @@ static void pc_memory_plug(HotplugHandler *hotplug_dev,
>>>          nvdimm_plug(&pcms->acpi_nvdimm_state);
>>>      }
>>>  
>>> -    hhc = HOTPLUG_HANDLER_GET_CLASS(pcms->acpi_dev);
>>> -    hhc->plug(HOTPLUG_HANDLER(pcms->acpi_dev), dev, &error_abort);
>>> +    hotplug_handler_plug(HOTPLUG_HANDLER(pcms->acpi_dev), dev, &error_abort);
>>>  out:
>>>      error_propagate(errp, local_err);
>>>  }
>>> @@ -1734,7 +1732,6 @@ out:
>>>  static void pc_memory_unplug_request(HotplugHandler *hotplug_dev,
>>>                                       DeviceState *dev, Error **errp)
>>>  {
>>> -    HotplugHandlerClass *hhc;
>>>      Error *local_err = NULL;
>>>      PCMachineState *pcms = PC_MACHINE(hotplug_dev);
>>>  
>>> @@ -1755,9 +1752,8 @@ static void pc_memory_unplug_request(HotplugHandler *hotplug_dev,
>>>          goto out;
>>>      }
>>>  
>>> -    hhc = HOTPLUG_HANDLER_GET_CLASS(pcms->acpi_dev);
>>> -    hhc->unplug_request(HOTPLUG_HANDLER(pcms->acpi_dev), dev, &local_err);
>>> -
>>> +    hotplug_handler_unplug_request(HOTPLUG_HANDLER(pcms->acpi_dev), dev,
>>> +                                   &local_err);
>>>  out:
>>>      error_propagate(errp, local_err);
>>>  }
>>> @@ -1766,12 +1762,9 @@ static void pc_memory_unplug(HotplugHandler *hotplug_dev,
>>>                               DeviceState *dev, Error **errp)
>>>  {
>>>      PCMachineState *pcms = PC_MACHINE(hotplug_dev);
>>> -    HotplugHandlerClass *hhc;
>>>      Error *local_err = NULL;
>>>  
>>> -    hhc = HOTPLUG_HANDLER_GET_CLASS(pcms->acpi_dev);
>>> -    hhc->unplug(HOTPLUG_HANDLER(pcms->acpi_dev), dev, &local_err);
>>> -
>>> +    hotplug_handler_unplug(HOTPLUG_HANDLER(pcms->acpi_dev), dev, &local_err);
>>>      if (local_err) {
>>>          goto out;
>>>      }
>>> @@ -1813,14 +1806,12 @@ static void pc_cpu_plug(HotplugHandler *hotplug_dev,
>>>                          DeviceState *dev, Error **errp)
>>>  {
>>>      CPUArchId *found_cpu;
>>> -    HotplugHandlerClass *hhc;
>>>      Error *local_err = NULL;
>>>      X86CPU *cpu = X86_CPU(dev);
>>>      PCMachineState *pcms = PC_MACHINE(hotplug_dev);
>>>  
>>>      if (pcms->acpi_dev) {
>>> -        hhc = HOTPLUG_HANDLER_GET_CLASS(pcms->acpi_dev);
>>> -        hhc->plug(HOTPLUG_HANDLER(pcms->acpi_dev), dev, &local_err);
>>> +        hotplug_handler_plug(HOTPLUG_HANDLER(pcms->acpi_dev), dev, &local_err);
>>>          if (local_err) {
>>>              goto out;
>>>          }
>>> @@ -1844,7 +1835,6 @@ static void pc_cpu_unplug_request_cb(HotplugHandler *hotplug_dev,
>>>                                       DeviceState *dev, Error **errp)
>>>  {
>>>      int idx = -1;
>>> -    HotplugHandlerClass *hhc;
>>>      Error *local_err = NULL;
>>>      X86CPU *cpu = X86_CPU(dev);
>>>      PCMachineState *pcms = PC_MACHINE(hotplug_dev);
>>> @@ -1861,9 +1851,8 @@ static void pc_cpu_unplug_request_cb(HotplugHandler *hotplug_dev,
>>>          goto out;
>>>      }
>>>  
>>> -    hhc = HOTPLUG_HANDLER_GET_CLASS(pcms->acpi_dev);
>>> -    hhc->unplug_request(HOTPLUG_HANDLER(pcms->acpi_dev), dev, &local_err);
>>> -
>>> +    hotplug_handler_unplug_request(HOTPLUG_HANDLER(pcms->acpi_dev), dev,
>>> +                                   &local_err);
>>>      if (local_err) {
>>>          goto out;
>>>      }
>>> @@ -1877,14 +1866,11 @@ static void pc_cpu_unplug_cb(HotplugHandler *hotplug_dev,
>>>                               DeviceState *dev, Error **errp)
>>>  {
>>>      CPUArchId *found_cpu;
>>> -    HotplugHandlerClass *hhc;
>>>      Error *local_err = NULL;
>>>      X86CPU *cpu = X86_CPU(dev);
>>>      PCMachineState *pcms = PC_MACHINE(hotplug_dev);
>>>  
>>> -    hhc = HOTPLUG_HANDLER_GET_CLASS(pcms->acpi_dev);
>>> -    hhc->unplug(HOTPLUG_HANDLER(pcms->acpi_dev), dev, &local_err);
>>> -
>>> +    hotplug_handler_unplug(HOTPLUG_HANDLER(pcms->acpi_dev), dev, &local_err);
>>>      if (local_err) {
>>>          goto out;
>>>      }
>>>
>>
>> Queued, thanks.
> 
> Paolo, just wondering, is this still on your queue or fell of the wagon?

I had some issues with the previous pull request and also have to really
spend some time on KVM.  But it's still queued.

Paolo


Re: [Qemu-devel] [PATCH v1] pc: Use hotplug_handler_(plug|unplug|unplug_request)
Posted by David Hildenbrand 5 years, 1 month ago
On 30.01.19 14:09, Paolo Bonzini wrote:
> On 30/01/19 13:35, David Hildenbrand wrote:
>> On 14.12.18 10:58, Paolo Bonzini wrote:
>>> On 12/12/18 10:57, David Hildenbrand wrote:
>>>> Let's avoid manually looking up the hotplug handler class. Use the
>>>> existing wrappers instead.
>>>>
>>>> Signed-off-by: David Hildenbrand <david@redhat.com>
>>>> ---
>>>>  hw/i386/pc.c | 30 ++++++++----------------------
>>>>  1 file changed, 8 insertions(+), 22 deletions(-)
>>>>
>>>> diff --git a/hw/i386/pc.c b/hw/i386/pc.c
>>>> index 4cd2fbca4d..c8857138f9 100644
>>>> --- a/hw/i386/pc.c
>>>> +++ b/hw/i386/pc.c
>>>> @@ -1711,7 +1711,6 @@ static void pc_memory_pre_plug(HotplugHandler *hotplug_dev, DeviceState *dev,
>>>>  static void pc_memory_plug(HotplugHandler *hotplug_dev,
>>>>                             DeviceState *dev, Error **errp)
>>>>  {
>>>> -    HotplugHandlerClass *hhc;
>>>>      Error *local_err = NULL;
>>>>      PCMachineState *pcms = PC_MACHINE(hotplug_dev);
>>>>      bool is_nvdimm = object_dynamic_cast(OBJECT(dev), TYPE_NVDIMM);
>>>> @@ -1725,8 +1724,7 @@ static void pc_memory_plug(HotplugHandler *hotplug_dev,
>>>>          nvdimm_plug(&pcms->acpi_nvdimm_state);
>>>>      }
>>>>  
>>>> -    hhc = HOTPLUG_HANDLER_GET_CLASS(pcms->acpi_dev);
>>>> -    hhc->plug(HOTPLUG_HANDLER(pcms->acpi_dev), dev, &error_abort);
>>>> +    hotplug_handler_plug(HOTPLUG_HANDLER(pcms->acpi_dev), dev, &error_abort);
>>>>  out:
>>>>      error_propagate(errp, local_err);
>>>>  }
>>>> @@ -1734,7 +1732,6 @@ out:
>>>>  static void pc_memory_unplug_request(HotplugHandler *hotplug_dev,
>>>>                                       DeviceState *dev, Error **errp)
>>>>  {
>>>> -    HotplugHandlerClass *hhc;
>>>>      Error *local_err = NULL;
>>>>      PCMachineState *pcms = PC_MACHINE(hotplug_dev);
>>>>  
>>>> @@ -1755,9 +1752,8 @@ static void pc_memory_unplug_request(HotplugHandler *hotplug_dev,
>>>>          goto out;
>>>>      }
>>>>  
>>>> -    hhc = HOTPLUG_HANDLER_GET_CLASS(pcms->acpi_dev);
>>>> -    hhc->unplug_request(HOTPLUG_HANDLER(pcms->acpi_dev), dev, &local_err);
>>>> -
>>>> +    hotplug_handler_unplug_request(HOTPLUG_HANDLER(pcms->acpi_dev), dev,
>>>> +                                   &local_err);
>>>>  out:
>>>>      error_propagate(errp, local_err);
>>>>  }
>>>> @@ -1766,12 +1762,9 @@ static void pc_memory_unplug(HotplugHandler *hotplug_dev,
>>>>                               DeviceState *dev, Error **errp)
>>>>  {
>>>>      PCMachineState *pcms = PC_MACHINE(hotplug_dev);
>>>> -    HotplugHandlerClass *hhc;
>>>>      Error *local_err = NULL;
>>>>  
>>>> -    hhc = HOTPLUG_HANDLER_GET_CLASS(pcms->acpi_dev);
>>>> -    hhc->unplug(HOTPLUG_HANDLER(pcms->acpi_dev), dev, &local_err);
>>>> -
>>>> +    hotplug_handler_unplug(HOTPLUG_HANDLER(pcms->acpi_dev), dev, &local_err);
>>>>      if (local_err) {
>>>>          goto out;
>>>>      }
>>>> @@ -1813,14 +1806,12 @@ static void pc_cpu_plug(HotplugHandler *hotplug_dev,
>>>>                          DeviceState *dev, Error **errp)
>>>>  {
>>>>      CPUArchId *found_cpu;
>>>> -    HotplugHandlerClass *hhc;
>>>>      Error *local_err = NULL;
>>>>      X86CPU *cpu = X86_CPU(dev);
>>>>      PCMachineState *pcms = PC_MACHINE(hotplug_dev);
>>>>  
>>>>      if (pcms->acpi_dev) {
>>>> -        hhc = HOTPLUG_HANDLER_GET_CLASS(pcms->acpi_dev);
>>>> -        hhc->plug(HOTPLUG_HANDLER(pcms->acpi_dev), dev, &local_err);
>>>> +        hotplug_handler_plug(HOTPLUG_HANDLER(pcms->acpi_dev), dev, &local_err);
>>>>          if (local_err) {
>>>>              goto out;
>>>>          }
>>>> @@ -1844,7 +1835,6 @@ static void pc_cpu_unplug_request_cb(HotplugHandler *hotplug_dev,
>>>>                                       DeviceState *dev, Error **errp)
>>>>  {
>>>>      int idx = -1;
>>>> -    HotplugHandlerClass *hhc;
>>>>      Error *local_err = NULL;
>>>>      X86CPU *cpu = X86_CPU(dev);
>>>>      PCMachineState *pcms = PC_MACHINE(hotplug_dev);
>>>> @@ -1861,9 +1851,8 @@ static void pc_cpu_unplug_request_cb(HotplugHandler *hotplug_dev,
>>>>          goto out;
>>>>      }
>>>>  
>>>> -    hhc = HOTPLUG_HANDLER_GET_CLASS(pcms->acpi_dev);
>>>> -    hhc->unplug_request(HOTPLUG_HANDLER(pcms->acpi_dev), dev, &local_err);
>>>> -
>>>> +    hotplug_handler_unplug_request(HOTPLUG_HANDLER(pcms->acpi_dev), dev,
>>>> +                                   &local_err);
>>>>      if (local_err) {
>>>>          goto out;
>>>>      }
>>>> @@ -1877,14 +1866,11 @@ static void pc_cpu_unplug_cb(HotplugHandler *hotplug_dev,
>>>>                               DeviceState *dev, Error **errp)
>>>>  {
>>>>      CPUArchId *found_cpu;
>>>> -    HotplugHandlerClass *hhc;
>>>>      Error *local_err = NULL;
>>>>      X86CPU *cpu = X86_CPU(dev);
>>>>      PCMachineState *pcms = PC_MACHINE(hotplug_dev);
>>>>  
>>>> -    hhc = HOTPLUG_HANDLER_GET_CLASS(pcms->acpi_dev);
>>>> -    hhc->unplug(HOTPLUG_HANDLER(pcms->acpi_dev), dev, &local_err);
>>>> -
>>>> +    hotplug_handler_unplug(HOTPLUG_HANDLER(pcms->acpi_dev), dev, &local_err);
>>>>      if (local_err) {
>>>>          goto out;
>>>>      }
>>>>
>>>
>>> Queued, thanks.
>>
>> Paolo, just wondering, is this still on your queue or fell of the wagon?
> 
> I had some issues with the previous pull request and also have to really
> spend some time on KVM.  But it's still queued.
> 

No worries, I have some qdev patches based on this, but will simply send
this patch along with that series. Whatever hits upstream first :)

> Paolo
> 


-- 

Thanks,

David / dhildenb

Re: [Qemu-devel] [PATCH v1] pc: Use hotplug_handler_(plug|unplug|unplug_request)
Posted by Michael S. Tsirkin 5 years, 1 month ago
On Wed, Jan 30, 2019 at 04:07:06PM +0100, David Hildenbrand wrote:
> On 30.01.19 14:09, Paolo Bonzini wrote:
> > On 30/01/19 13:35, David Hildenbrand wrote:
> >> On 14.12.18 10:58, Paolo Bonzini wrote:
> >>> On 12/12/18 10:57, David Hildenbrand wrote:
> >>>> Let's avoid manually looking up the hotplug handler class. Use the
> >>>> existing wrappers instead.
> >>>>
> >>>> Signed-off-by: David Hildenbrand <david@redhat.com>
> >>>> ---
> >>>>  hw/i386/pc.c | 30 ++++++++----------------------
> >>>>  1 file changed, 8 insertions(+), 22 deletions(-)
> >>>>
> >>>> diff --git a/hw/i386/pc.c b/hw/i386/pc.c
> >>>> index 4cd2fbca4d..c8857138f9 100644
> >>>> --- a/hw/i386/pc.c
> >>>> +++ b/hw/i386/pc.c
> >>>> @@ -1711,7 +1711,6 @@ static void pc_memory_pre_plug(HotplugHandler *hotplug_dev, DeviceState *dev,
> >>>>  static void pc_memory_plug(HotplugHandler *hotplug_dev,
> >>>>                             DeviceState *dev, Error **errp)
> >>>>  {
> >>>> -    HotplugHandlerClass *hhc;
> >>>>      Error *local_err = NULL;
> >>>>      PCMachineState *pcms = PC_MACHINE(hotplug_dev);
> >>>>      bool is_nvdimm = object_dynamic_cast(OBJECT(dev), TYPE_NVDIMM);
> >>>> @@ -1725,8 +1724,7 @@ static void pc_memory_plug(HotplugHandler *hotplug_dev,
> >>>>          nvdimm_plug(&pcms->acpi_nvdimm_state);
> >>>>      }
> >>>>  
> >>>> -    hhc = HOTPLUG_HANDLER_GET_CLASS(pcms->acpi_dev);
> >>>> -    hhc->plug(HOTPLUG_HANDLER(pcms->acpi_dev), dev, &error_abort);
> >>>> +    hotplug_handler_plug(HOTPLUG_HANDLER(pcms->acpi_dev), dev, &error_abort);
> >>>>  out:
> >>>>      error_propagate(errp, local_err);
> >>>>  }
> >>>> @@ -1734,7 +1732,6 @@ out:
> >>>>  static void pc_memory_unplug_request(HotplugHandler *hotplug_dev,
> >>>>                                       DeviceState *dev, Error **errp)
> >>>>  {
> >>>> -    HotplugHandlerClass *hhc;
> >>>>      Error *local_err = NULL;
> >>>>      PCMachineState *pcms = PC_MACHINE(hotplug_dev);
> >>>>  
> >>>> @@ -1755,9 +1752,8 @@ static void pc_memory_unplug_request(HotplugHandler *hotplug_dev,
> >>>>          goto out;
> >>>>      }
> >>>>  
> >>>> -    hhc = HOTPLUG_HANDLER_GET_CLASS(pcms->acpi_dev);
> >>>> -    hhc->unplug_request(HOTPLUG_HANDLER(pcms->acpi_dev), dev, &local_err);
> >>>> -
> >>>> +    hotplug_handler_unplug_request(HOTPLUG_HANDLER(pcms->acpi_dev), dev,
> >>>> +                                   &local_err);
> >>>>  out:
> >>>>      error_propagate(errp, local_err);
> >>>>  }
> >>>> @@ -1766,12 +1762,9 @@ static void pc_memory_unplug(HotplugHandler *hotplug_dev,
> >>>>                               DeviceState *dev, Error **errp)
> >>>>  {
> >>>>      PCMachineState *pcms = PC_MACHINE(hotplug_dev);
> >>>> -    HotplugHandlerClass *hhc;
> >>>>      Error *local_err = NULL;
> >>>>  
> >>>> -    hhc = HOTPLUG_HANDLER_GET_CLASS(pcms->acpi_dev);
> >>>> -    hhc->unplug(HOTPLUG_HANDLER(pcms->acpi_dev), dev, &local_err);
> >>>> -
> >>>> +    hotplug_handler_unplug(HOTPLUG_HANDLER(pcms->acpi_dev), dev, &local_err);
> >>>>      if (local_err) {
> >>>>          goto out;
> >>>>      }
> >>>> @@ -1813,14 +1806,12 @@ static void pc_cpu_plug(HotplugHandler *hotplug_dev,
> >>>>                          DeviceState *dev, Error **errp)
> >>>>  {
> >>>>      CPUArchId *found_cpu;
> >>>> -    HotplugHandlerClass *hhc;
> >>>>      Error *local_err = NULL;
> >>>>      X86CPU *cpu = X86_CPU(dev);
> >>>>      PCMachineState *pcms = PC_MACHINE(hotplug_dev);
> >>>>  
> >>>>      if (pcms->acpi_dev) {
> >>>> -        hhc = HOTPLUG_HANDLER_GET_CLASS(pcms->acpi_dev);
> >>>> -        hhc->plug(HOTPLUG_HANDLER(pcms->acpi_dev), dev, &local_err);
> >>>> +        hotplug_handler_plug(HOTPLUG_HANDLER(pcms->acpi_dev), dev, &local_err);
> >>>>          if (local_err) {
> >>>>              goto out;
> >>>>          }
> >>>> @@ -1844,7 +1835,6 @@ static void pc_cpu_unplug_request_cb(HotplugHandler *hotplug_dev,
> >>>>                                       DeviceState *dev, Error **errp)
> >>>>  {
> >>>>      int idx = -1;
> >>>> -    HotplugHandlerClass *hhc;
> >>>>      Error *local_err = NULL;
> >>>>      X86CPU *cpu = X86_CPU(dev);
> >>>>      PCMachineState *pcms = PC_MACHINE(hotplug_dev);
> >>>> @@ -1861,9 +1851,8 @@ static void pc_cpu_unplug_request_cb(HotplugHandler *hotplug_dev,
> >>>>          goto out;
> >>>>      }
> >>>>  
> >>>> -    hhc = HOTPLUG_HANDLER_GET_CLASS(pcms->acpi_dev);
> >>>> -    hhc->unplug_request(HOTPLUG_HANDLER(pcms->acpi_dev), dev, &local_err);
> >>>> -
> >>>> +    hotplug_handler_unplug_request(HOTPLUG_HANDLER(pcms->acpi_dev), dev,
> >>>> +                                   &local_err);
> >>>>      if (local_err) {
> >>>>          goto out;
> >>>>      }
> >>>> @@ -1877,14 +1866,11 @@ static void pc_cpu_unplug_cb(HotplugHandler *hotplug_dev,
> >>>>                               DeviceState *dev, Error **errp)
> >>>>  {
> >>>>      CPUArchId *found_cpu;
> >>>> -    HotplugHandlerClass *hhc;
> >>>>      Error *local_err = NULL;
> >>>>      X86CPU *cpu = X86_CPU(dev);
> >>>>      PCMachineState *pcms = PC_MACHINE(hotplug_dev);
> >>>>  
> >>>> -    hhc = HOTPLUG_HANDLER_GET_CLASS(pcms->acpi_dev);
> >>>> -    hhc->unplug(HOTPLUG_HANDLER(pcms->acpi_dev), dev, &local_err);
> >>>> -
> >>>> +    hotplug_handler_unplug(HOTPLUG_HANDLER(pcms->acpi_dev), dev, &local_err);
> >>>>      if (local_err) {
> >>>>          goto out;
> >>>>      }
> >>>>
> >>>
> >>> Queued, thanks.
> >>
> >> Paolo, just wondering, is this still on your queue or fell of the wagon?
> > 
> > I had some issues with the previous pull request and also have to really
> > spend some time on KVM.  But it's still queued.
> > 
> 
> No worries, I have some qdev patches based on this, but will simply send
> this patch along with that series. Whatever hits upstream first :)

Yes I was going to offer to put it on my queue but if there
are dependencies for another queue that's fine too.
You can also add

Reviewed-by: Michael S. Tsirkin <mst@redhat.com>

if you like.

> > Paolo
> > 
> 
> 
> -- 
> 
> Thanks,
> 
> David / dhildenb

Re: [Qemu-devel] [PATCH v1] pc: Use hotplug_handler_(plug|unplug|unplug_request)
Posted by David Hildenbrand 5 years, 1 month ago
On 30.01.19 23:10, Michael S. Tsirkin wrote:
> On Wed, Jan 30, 2019 at 04:07:06PM +0100, David Hildenbrand wrote:
>> On 30.01.19 14:09, Paolo Bonzini wrote:
>>> On 30/01/19 13:35, David Hildenbrand wrote:
>>>> On 14.12.18 10:58, Paolo Bonzini wrote:
>>>>> On 12/12/18 10:57, David Hildenbrand wrote:
>>>>>> Let's avoid manually looking up the hotplug handler class. Use the
>>>>>> existing wrappers instead.
>>>>>>
>>>>>> Signed-off-by: David Hildenbrand <david@redhat.com>
>>>>>> ---
>>>>>>  hw/i386/pc.c | 30 ++++++++----------------------
>>>>>>  1 file changed, 8 insertions(+), 22 deletions(-)
>>>>>>
>>>>>> diff --git a/hw/i386/pc.c b/hw/i386/pc.c
>>>>>> index 4cd2fbca4d..c8857138f9 100644
>>>>>> --- a/hw/i386/pc.c
>>>>>> +++ b/hw/i386/pc.c
>>>>>> @@ -1711,7 +1711,6 @@ static void pc_memory_pre_plug(HotplugHandler *hotplug_dev, DeviceState *dev,
>>>>>>  static void pc_memory_plug(HotplugHandler *hotplug_dev,
>>>>>>                             DeviceState *dev, Error **errp)
>>>>>>  {
>>>>>> -    HotplugHandlerClass *hhc;
>>>>>>      Error *local_err = NULL;
>>>>>>      PCMachineState *pcms = PC_MACHINE(hotplug_dev);
>>>>>>      bool is_nvdimm = object_dynamic_cast(OBJECT(dev), TYPE_NVDIMM);
>>>>>> @@ -1725,8 +1724,7 @@ static void pc_memory_plug(HotplugHandler *hotplug_dev,
>>>>>>          nvdimm_plug(&pcms->acpi_nvdimm_state);
>>>>>>      }
>>>>>>  
>>>>>> -    hhc = HOTPLUG_HANDLER_GET_CLASS(pcms->acpi_dev);
>>>>>> -    hhc->plug(HOTPLUG_HANDLER(pcms->acpi_dev), dev, &error_abort);
>>>>>> +    hotplug_handler_plug(HOTPLUG_HANDLER(pcms->acpi_dev), dev, &error_abort);
>>>>>>  out:
>>>>>>      error_propagate(errp, local_err);
>>>>>>  }
>>>>>> @@ -1734,7 +1732,6 @@ out:
>>>>>>  static void pc_memory_unplug_request(HotplugHandler *hotplug_dev,
>>>>>>                                       DeviceState *dev, Error **errp)
>>>>>>  {
>>>>>> -    HotplugHandlerClass *hhc;
>>>>>>      Error *local_err = NULL;
>>>>>>      PCMachineState *pcms = PC_MACHINE(hotplug_dev);
>>>>>>  
>>>>>> @@ -1755,9 +1752,8 @@ static void pc_memory_unplug_request(HotplugHandler *hotplug_dev,
>>>>>>          goto out;
>>>>>>      }
>>>>>>  
>>>>>> -    hhc = HOTPLUG_HANDLER_GET_CLASS(pcms->acpi_dev);
>>>>>> -    hhc->unplug_request(HOTPLUG_HANDLER(pcms->acpi_dev), dev, &local_err);
>>>>>> -
>>>>>> +    hotplug_handler_unplug_request(HOTPLUG_HANDLER(pcms->acpi_dev), dev,
>>>>>> +                                   &local_err);
>>>>>>  out:
>>>>>>      error_propagate(errp, local_err);
>>>>>>  }
>>>>>> @@ -1766,12 +1762,9 @@ static void pc_memory_unplug(HotplugHandler *hotplug_dev,
>>>>>>                               DeviceState *dev, Error **errp)
>>>>>>  {
>>>>>>      PCMachineState *pcms = PC_MACHINE(hotplug_dev);
>>>>>> -    HotplugHandlerClass *hhc;
>>>>>>      Error *local_err = NULL;
>>>>>>  
>>>>>> -    hhc = HOTPLUG_HANDLER_GET_CLASS(pcms->acpi_dev);
>>>>>> -    hhc->unplug(HOTPLUG_HANDLER(pcms->acpi_dev), dev, &local_err);
>>>>>> -
>>>>>> +    hotplug_handler_unplug(HOTPLUG_HANDLER(pcms->acpi_dev), dev, &local_err);
>>>>>>      if (local_err) {
>>>>>>          goto out;
>>>>>>      }
>>>>>> @@ -1813,14 +1806,12 @@ static void pc_cpu_plug(HotplugHandler *hotplug_dev,
>>>>>>                          DeviceState *dev, Error **errp)
>>>>>>  {
>>>>>>      CPUArchId *found_cpu;
>>>>>> -    HotplugHandlerClass *hhc;
>>>>>>      Error *local_err = NULL;
>>>>>>      X86CPU *cpu = X86_CPU(dev);
>>>>>>      PCMachineState *pcms = PC_MACHINE(hotplug_dev);
>>>>>>  
>>>>>>      if (pcms->acpi_dev) {
>>>>>> -        hhc = HOTPLUG_HANDLER_GET_CLASS(pcms->acpi_dev);
>>>>>> -        hhc->plug(HOTPLUG_HANDLER(pcms->acpi_dev), dev, &local_err);
>>>>>> +        hotplug_handler_plug(HOTPLUG_HANDLER(pcms->acpi_dev), dev, &local_err);
>>>>>>          if (local_err) {
>>>>>>              goto out;
>>>>>>          }
>>>>>> @@ -1844,7 +1835,6 @@ static void pc_cpu_unplug_request_cb(HotplugHandler *hotplug_dev,
>>>>>>                                       DeviceState *dev, Error **errp)
>>>>>>  {
>>>>>>      int idx = -1;
>>>>>> -    HotplugHandlerClass *hhc;
>>>>>>      Error *local_err = NULL;
>>>>>>      X86CPU *cpu = X86_CPU(dev);
>>>>>>      PCMachineState *pcms = PC_MACHINE(hotplug_dev);
>>>>>> @@ -1861,9 +1851,8 @@ static void pc_cpu_unplug_request_cb(HotplugHandler *hotplug_dev,
>>>>>>          goto out;
>>>>>>      }
>>>>>>  
>>>>>> -    hhc = HOTPLUG_HANDLER_GET_CLASS(pcms->acpi_dev);
>>>>>> -    hhc->unplug_request(HOTPLUG_HANDLER(pcms->acpi_dev), dev, &local_err);
>>>>>> -
>>>>>> +    hotplug_handler_unplug_request(HOTPLUG_HANDLER(pcms->acpi_dev), dev,
>>>>>> +                                   &local_err);
>>>>>>      if (local_err) {
>>>>>>          goto out;
>>>>>>      }
>>>>>> @@ -1877,14 +1866,11 @@ static void pc_cpu_unplug_cb(HotplugHandler *hotplug_dev,
>>>>>>                               DeviceState *dev, Error **errp)
>>>>>>  {
>>>>>>      CPUArchId *found_cpu;
>>>>>> -    HotplugHandlerClass *hhc;
>>>>>>      Error *local_err = NULL;
>>>>>>      X86CPU *cpu = X86_CPU(dev);
>>>>>>      PCMachineState *pcms = PC_MACHINE(hotplug_dev);
>>>>>>  
>>>>>> -    hhc = HOTPLUG_HANDLER_GET_CLASS(pcms->acpi_dev);
>>>>>> -    hhc->unplug(HOTPLUG_HANDLER(pcms->acpi_dev), dev, &local_err);
>>>>>> -
>>>>>> +    hotplug_handler_unplug(HOTPLUG_HANDLER(pcms->acpi_dev), dev, &local_err);
>>>>>>      if (local_err) {
>>>>>>          goto out;
>>>>>>      }
>>>>>>
>>>>>
>>>>> Queued, thanks.
>>>>
>>>> Paolo, just wondering, is this still on your queue or fell of the wagon?
>>>
>>> I had some issues with the previous pull request and also have to really
>>> spend some time on KVM.  But it's still queued.
>>>
>>
>> No worries, I have some qdev patches based on this, but will simply send
>> this patch along with that series. Whatever hits upstream first :)
> 
> Yes I was going to offer to put it on my queue but if there
> are dependencies for another queue that's fine too.
> You can also add
> 
> Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
> 

Added, thanks!

> if you like.
> 
>>> Paolo
>>>
>>
>>
>> -- 
>>
>> Thanks,
>>
>> David / dhildenb


-- 

Thanks,

David / dhildenb