[PATCH 0/2] Improve vmstate_vmbus_dev handling

Thomas Huth posted 2 patches 2 years, 10 months ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/next-importer-push tags/patchew/20210603104139.556512-1-thuth@redhat.com
hw/hyperv/vmbus.c         | 29 +++++++++++++++--------------
include/hw/hyperv/vmbus.h |  3 ---
2 files changed, 15 insertions(+), 17 deletions(-)
[PATCH 0/2] Improve vmstate_vmbus_dev handling
Posted by Thomas Huth 2 years, 10 months ago
I accidentally came accross vmstate_vmbus_dev and noticed that
it is currently not used at all ... wire it up and make it
static, since it is only used in one file.

Thomas Huth (2):
  hw/hyperv/vmbus: Wire up vmstate_vmbus_dev
  hw/hyperv/vmbus: Make vmstate_vmbus_dev static

 hw/hyperv/vmbus.c         | 29 +++++++++++++++--------------
 include/hw/hyperv/vmbus.h |  3 ---
 2 files changed, 15 insertions(+), 17 deletions(-)

-- 
2.27.0


Re: [PATCH 0/2] Improve vmstate_vmbus_dev handling
Posted by Maciej S. Szmigiero 2 years, 10 months ago
Hi Thomas,

On 03.06.2021 12:41, Thomas Huth wrote:
> I accidentally came accross vmstate_vmbus_dev and noticed that
> it is currently not used at all ... wire it up and make it
> static, since it is only used in one file.
> 
> Thomas Huth (2):
>    hw/hyperv/vmbus: Wire up vmstate_vmbus_dev
>    hw/hyperv/vmbus: Make vmstate_vmbus_dev static
> 
>   hw/hyperv/vmbus.c         | 29 +++++++++++++++--------------
>   include/hw/hyperv/vmbus.h |  3 ---
>   2 files changed, 15 insertions(+), 17 deletions(-)
> 

I think the idea is to embed vmstate_vmbus_dev into a child device
VMStateDescription using VMSTATE_STRUCT() - since particular VMBus
devices aren't merged yet there are currently no users of it.

This is similar how USB devices VMState is organized - see
vmstate_usb_device and VMSTATE_USB_DEVICE() macro.

Thanks,
Maciej

Re: [PATCH 0/2] Improve vmstate_vmbus_dev handling
Posted by Thomas Huth 2 years, 10 months ago
On 05/06/2021 18.01, Maciej S. Szmigiero wrote:
> Hi Thomas,
> 
> On 03.06.2021 12:41, Thomas Huth wrote:
>> I accidentally came accross vmstate_vmbus_dev and noticed that
>> it is currently not used at all ... wire it up and make it
>> static, since it is only used in one file.
>>
>> Thomas Huth (2):
>>    hw/hyperv/vmbus: Wire up vmstate_vmbus_dev
>>    hw/hyperv/vmbus: Make vmstate_vmbus_dev static
>>
>>   hw/hyperv/vmbus.c         | 29 +++++++++++++++--------------
>>   include/hw/hyperv/vmbus.h |  3 ---
>>   2 files changed, 15 insertions(+), 17 deletions(-)
>>
> 
> I think the idea is to embed vmstate_vmbus_dev into a child device
> VMStateDescription using VMSTATE_STRUCT() - since particular VMBus
> devices aren't merged yet there are currently no users of it.

Ok, then never mind. But some comments in the source code would be really 
helpful - in the current shape, it simply looks like an oversight...

  Thomas