mbox series

[v7,0/7] Hyper-V Dynamic Memory Protocol driver (hv-balloon

Message ID cover.1693240836.git.maciej.szmigiero@oracle.com (mailing list archive)
Headers show
Series Hyper-V Dynamic Memory Protocol driver (hv-balloon | expand

Message

Maciej S. Szmigiero Aug. 28, 2023, 4:48 p.m. UTC
From: "Maciej S. Szmigiero" <maciej.szmigiero@oracle.com>

This is a continuation of the v6 of the patch series located here:
https://lore.kernel.org/qemu-devel/cover.1689786474.git.maciej.szmigiero@oracle.com/


Changes from v6:
* Split the hv-balloon driver implementation into multiple files holding
particular data structures and their methods in order to make the driver
easier to understand.

* Split out the PC machine necessary plumbing for the driver and its final
activation into a separate patch.

* Make sure that patches that bring QAPI-related changes also implement these
in the driver in the same patch.

* Add a "query-hv-balloon-status-report" QMP command to query the data from
the last received HV_BALLOON_STATUS_REPORT event.

* Rate limit the HV_BALLOON_STATUS_REPORT QMP event.

* Replace "TBD" in QAPI changes with the actual targeted QEMU version.

* Spelling and formatting fixes in QAPI changes.

* Rebase onto the latest David's patch series.


Based-on: <20230825132149.366064-1-david@redhat.com>
Based-on-Repo-Commit: https://github.com/davidhildenbrand/qemu/tree/virtio-mem-memslots b65df116f8a8


David Hildenbrand (2):
  memory-device: Support empty memory devices
  memory-device: Drop size alignment check

Maciej S. Szmigiero (5):
  Add Hyper-V Dynamic Memory Protocol definitions
  Add a Hyper-V Dynamic Memory Protocol driver (hv-balloon)
  qapi: Add query-memory-devices support to hv-balloon
  qapi: Add HV_BALLOON_STATUS_REPORT event and its QMP query command
  hw/i386/pc: Support hv-balloon

 Kconfig.host                              |    3 +
 hw/core/machine-hmp-cmds.c                |   15 +
 hw/hyperv/Kconfig                         |   10 +
 hw/hyperv/hv-balloon-internal.h           |   33 +
 hw/hyperv/hv-balloon-our_range_memslots.c |  201 +++
 hw/hyperv/hv-balloon-our_range_memslots.h |  110 ++
 hw/hyperv/hv-balloon-page_range_tree.c    |  228 +++
 hw/hyperv/hv-balloon-page_range_tree.h    |  118 ++
 hw/hyperv/hv-balloon.c                    | 1767 +++++++++++++++++++++
 hw/hyperv/meson.build                     |    1 +
 hw/hyperv/trace-events                    |   18 +
 hw/i386/Kconfig                           |    1 +
 hw/i386/pc.c                              |   22 +
 hw/mem/memory-device.c                    |   49 +-
 include/hw/hyperv/dynmem-proto.h          |  423 +++++
 include/hw/hyperv/hv-balloon.h            |   18 +
 include/hw/mem/memory-device.h            |    7 +-
 meson.build                               |   28 +-
 meson_options.txt                         |    2 +
 monitor/monitor.c                         |    1 +
 qapi/machine.json                         |  103 +-
 scripts/meson-buildoptions.sh             |    3 +
 22 files changed, 3148 insertions(+), 13 deletions(-)
 create mode 100644 hw/hyperv/hv-balloon-internal.h
 create mode 100644 hw/hyperv/hv-balloon-our_range_memslots.c
 create mode 100644 hw/hyperv/hv-balloon-our_range_memslots.h
 create mode 100644 hw/hyperv/hv-balloon-page_range_tree.c
 create mode 100644 hw/hyperv/hv-balloon-page_range_tree.h
 create mode 100644 hw/hyperv/hv-balloon.c
 create mode 100644 include/hw/hyperv/dynmem-proto.h
 create mode 100644 include/hw/hyperv/hv-balloon.h

Comments

David Hildenbrand Oct. 18, 2023, 8 a.m. UTC | #1
On 28.08.23 18:48, Maciej S. Szmigiero wrote:
> From: "Maciej S. Szmigiero" <maciej.szmigiero@oracle.com>
> 
> This is a continuation of the v6 of the patch series located here:
> https://lore.kernel.org/qemu-devel/cover.1689786474.git.maciej.szmigiero@oracle.com/
> 
> 
> Changes from v6:
> * Split the hv-balloon driver implementation into multiple files holding
> particular data structures and their methods in order to make the driver
> easier to understand.
> 
> * Split out the PC machine necessary plumbing for the driver and its final
> activation into a separate patch.
> 
> * Make sure that patches that bring QAPI-related changes also implement these
> in the driver in the same patch.
> 
> * Add a "query-hv-balloon-status-report" QMP command to query the data from
> the last received HV_BALLOON_STATUS_REPORT event.
> 
> * Rate limit the HV_BALLOON_STATUS_REPORT QMP event.
> 
> * Replace "TBD" in QAPI changes with the actual targeted QEMU version.
> 
> * Spelling and formatting fixes in QAPI changes.
> 
> * Rebase onto the latest David's patch series.
> 
> 
> Based-on: <20230825132149.366064-1-david@redhat.com>
> Based-on-Repo-Commit: https://github.com/davidhildenbrand/qemu/tree/virtio-mem-memslots b65df116f8a8

That is upstream now. Do you have a new version in the works that 
further splits up #4? I recall we discussed somewhere separating the 
hotplug changes from the pure memory ballonning changes if possible.
Maciej S. Szmigiero Oct. 18, 2023, 8:45 a.m. UTC | #2
On 18.10.2023 10:00, David Hildenbrand wrote:
> On 28.08.23 18:48, Maciej S. Szmigiero wrote:
>> From: "Maciej S. Szmigiero" <maciej.szmigiero@oracle.com>
>>
>> This is a continuation of the v6 of the patch series located here:
>> https://lore.kernel.org/qemu-devel/cover.1689786474.git.maciej.szmigiero@oracle.com/
>>
>>
>> Changes from v6:
>> * Split the hv-balloon driver implementation into multiple files holding
>> particular data structures and their methods in order to make the driver
>> easier to understand.
>>
>> * Split out the PC machine necessary plumbing for the driver and its final
>> activation into a separate patch.
>>
>> * Make sure that patches that bring QAPI-related changes also implement these
>> in the driver in the same patch.
>>
>> * Add a "query-hv-balloon-status-report" QMP command to query the data from
>> the last received HV_BALLOON_STATUS_REPORT event.
>>
>> * Rate limit the HV_BALLOON_STATUS_REPORT QMP event.
>>
>> * Replace "TBD" in QAPI changes with the actual targeted QEMU version.
>>
>> * Spelling and formatting fixes in QAPI changes.
>>
>> * Rebase onto the latest David's patch series.
>>
>>
>> Based-on: <20230825132149.366064-1-david@redhat.com>
>> Based-on-Repo-Commit: https://github.com/davidhildenbrand/qemu/tree/virtio-mem-memslots b65df116f8a8
> 
> That is upstream now.

That's great - I see it was pulled into QEMU git on Monday.

> Do you have a new version in the works that further splits up #4?
> I recall we discussed somewhere separating the hotplug changes from the pure memory ballonning changes if possible.

I will try to prepare an updated patch set next week,
since unfortunately I am like 120% busy right now.

Thanks,
Maciej
David Hildenbrand Oct. 18, 2023, 9:28 a.m. UTC | #3
On 18.10.23 10:45, Maciej S. Szmigiero wrote:
> On 18.10.2023 10:00, David Hildenbrand wrote:
>> On 28.08.23 18:48, Maciej S. Szmigiero wrote:
>>> From: "Maciej S. Szmigiero" <maciej.szmigiero@oracle.com>
>>>
>>> This is a continuation of the v6 of the patch series located here:
>>> https://lore.kernel.org/qemu-devel/cover.1689786474.git.maciej.szmigiero@oracle.com/
>>>
>>>
>>> Changes from v6:
>>> * Split the hv-balloon driver implementation into multiple files holding
>>> particular data structures and their methods in order to make the driver
>>> easier to understand.
>>>
>>> * Split out the PC machine necessary plumbing for the driver and its final
>>> activation into a separate patch.
>>>
>>> * Make sure that patches that bring QAPI-related changes also implement these
>>> in the driver in the same patch.
>>>
>>> * Add a "query-hv-balloon-status-report" QMP command to query the data from
>>> the last received HV_BALLOON_STATUS_REPORT event.
>>>
>>> * Rate limit the HV_BALLOON_STATUS_REPORT QMP event.
>>>
>>> * Replace "TBD" in QAPI changes with the actual targeted QEMU version.
>>>
>>> * Spelling and formatting fixes in QAPI changes.
>>>
>>> * Rebase onto the latest David's patch series.
>>>
>>>
>>> Based-on: <20230825132149.366064-1-david@redhat.com>
>>> Based-on-Repo-Commit: https://github.com/davidhildenbrand/qemu/tree/virtio-mem-memslots b65df116f8a8
>>
>> That is upstream now.
> 
> That's great - I see it was pulled into QEMU git on Monday.
> 
>> Do you have a new version in the works that further splits up #4?
>> I recall we discussed somewhere separating the hotplug changes from the pure memory ballonning changes if possible.
> 
> I will try to prepare an updated patch set next week,
> since unfortunately I am like 120% busy right now.

I feel you. Soft-freeze starts on 2023-11-07, so there is still some 
time. In the worst case, 9.0 development should open around 2023-12-19.