[PATCH 00/10] memory-device: Some cleanups

David Hildenbrand posted 10 patches 1 year, 5 months ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20230530113838.257755-1-david@redhat.com
Maintainers: Peter Maydell <peter.maydell@linaro.org>, "Michael S. Tsirkin" <mst@redhat.com>, Igor Mammedov <imammedo@redhat.com>, Ani Sinha <anisinha@redhat.com>, Marcel Apfelbaum <marcel.apfelbaum@gmail.com>, Paolo Bonzini <pbonzini@redhat.com>, Richard Henderson <richard.henderson@linaro.org>, Eduardo Habkost <eduardo@habkost.net>, Xiaojuan Yang <yangxiaojuan@loongson.cn>, Song Gao <gaosong@loongson.cn>, David Hildenbrand <david@redhat.com>, Xiao Guangrong <xiaoguangrong.eric@gmail.com>, Daniel Henrique Barboza <danielhb413@gmail.com>, "Cédric Le Goater" <clg@kaod.org>, David Gibson <david@gibson.dropbear.id.au>, Greg Kurz <groug@kaod.org>, Harsh Prateek Bora <harshpb@linux.ibm.com>, "Philippe Mathieu-Daudé" <philmd@linaro.org>, Yanan Wang <wangyanan55@huawei.com>
There is a newer version of this series
hw/arm/virt.c                  |  9 +----
hw/i386/acpi-build.c           |  9 ++---
hw/i386/pc.c                   | 36 +++---------------
hw/loongarch/virt.c            | 14 ++-----
hw/mem/memory-device.c         | 69 +++++++++++++++-------------------
hw/ppc/spapr.c                 | 37 +++++++++---------
hw/ppc/spapr_hcall.c           |  2 +-
include/hw/boards.h            |  2 +
include/hw/i386/pc.h           |  1 -
include/hw/mem/memory-device.h |  2 +
10 files changed, 68 insertions(+), 113 deletions(-)
[PATCH 00/10] memory-device: Some cleanups
Posted by David Hildenbrand 1 year, 5 months ago
Working on adding multi-memslot support for virtio-mem (teaching memory
device code about memory devices that can consume multiple memslots), I
have some preparatory cleanups in my queue that make sense independent of
the actual memory-device/virtio-mem extensions.

v1 -> v2:
- Allocate ms->device_memory only if the size > 0.
- Split it up and include more cleanups

David Hildenbrand (10):
  memory-device: Unify enabled vs. supported error messages
  memory-device: Introduce memory_devices_init()
  hw/arm/virt: Use memory_devices_init()
  hw/ppc/spapr: Use memory_devices_init()
  hw/loongarch/virt: Use memory_devices_init()
  hw/i386/pc: Use memory_devices_init()
  hw/i386/acpi-build: Rely on machine->device_memory when building SRAT
  hw/i386/pc: Remove PC_MACHINE_DEVMEM_REGION_SIZE
  memory-device: Refactor memory_device_pre_plug()
  memory-device: Track used region size in DeviceMemoryState

 hw/arm/virt.c                  |  9 +----
 hw/i386/acpi-build.c           |  9 ++---
 hw/i386/pc.c                   | 36 +++---------------
 hw/loongarch/virt.c            | 14 ++-----
 hw/mem/memory-device.c         | 69 +++++++++++++++-------------------
 hw/ppc/spapr.c                 | 37 +++++++++---------
 hw/ppc/spapr_hcall.c           |  2 +-
 include/hw/boards.h            |  2 +
 include/hw/i386/pc.h           |  1 -
 include/hw/mem/memory-device.h |  2 +
 10 files changed, 68 insertions(+), 113 deletions(-)

-- 
2.40.1
Re: [PATCH 00/10] memory-device: Some cleanups
Posted by David Hildenbrand 1 year, 5 months ago
This was supposed to carry the "v2" indicator ;)


On 30.05.23 13:38, David Hildenbrand wrote:
> Working on adding multi-memslot support for virtio-mem (teaching memory
> device code about memory devices that can consume multiple memslots), I
> have some preparatory cleanups in my queue that make sense independent of
> the actual memory-device/virtio-mem extensions.
> 
> v1 -> v2:
> - Allocate ms->device_memory only if the size > 0.
> - Split it up and include more cleanups
> 
> David Hildenbrand (10):
>    memory-device: Unify enabled vs. supported error messages
>    memory-device: Introduce memory_devices_init()
>    hw/arm/virt: Use memory_devices_init()
>    hw/ppc/spapr: Use memory_devices_init()
>    hw/loongarch/virt: Use memory_devices_init()
>    hw/i386/pc: Use memory_devices_init()
>    hw/i386/acpi-build: Rely on machine->device_memory when building SRAT
>    hw/i386/pc: Remove PC_MACHINE_DEVMEM_REGION_SIZE
>    memory-device: Refactor memory_device_pre_plug()
>    memory-device: Track used region size in DeviceMemoryState
> 
>   hw/arm/virt.c                  |  9 +----
>   hw/i386/acpi-build.c           |  9 ++---
>   hw/i386/pc.c                   | 36 +++---------------
>   hw/loongarch/virt.c            | 14 ++-----
>   hw/mem/memory-device.c         | 69 +++++++++++++++-------------------
>   hw/ppc/spapr.c                 | 37 +++++++++---------
>   hw/ppc/spapr_hcall.c           |  2 +-
>   include/hw/boards.h            |  2 +
>   include/hw/i386/pc.h           |  1 -
>   include/hw/mem/memory-device.h |  2 +
>   10 files changed, 68 insertions(+), 113 deletions(-)
> 

-- 
Thanks,

David / dhildenb
Re: [PATCH 00/10] memory-device: Some cleanups
Posted by Michael S. Tsirkin 1 year, 4 months ago
On Tue, May 30, 2023 at 01:38:28PM +0200, David Hildenbrand wrote:
> Working on adding multi-memslot support for virtio-mem (teaching memory
> device code about memory devices that can consume multiple memslots), I
> have some preparatory cleanups in my queue that make sense independent of
> the actual memory-device/virtio-mem extensions.

pc/acpi things:

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


> v1 -> v2:
> - Allocate ms->device_memory only if the size > 0.
> - Split it up and include more cleanups
> 
> David Hildenbrand (10):
>   memory-device: Unify enabled vs. supported error messages
>   memory-device: Introduce memory_devices_init()
>   hw/arm/virt: Use memory_devices_init()
>   hw/ppc/spapr: Use memory_devices_init()
>   hw/loongarch/virt: Use memory_devices_init()
>   hw/i386/pc: Use memory_devices_init()
>   hw/i386/acpi-build: Rely on machine->device_memory when building SRAT
>   hw/i386/pc: Remove PC_MACHINE_DEVMEM_REGION_SIZE
>   memory-device: Refactor memory_device_pre_plug()
>   memory-device: Track used region size in DeviceMemoryState
> 
>  hw/arm/virt.c                  |  9 +----
>  hw/i386/acpi-build.c           |  9 ++---
>  hw/i386/pc.c                   | 36 +++---------------
>  hw/loongarch/virt.c            | 14 ++-----
>  hw/mem/memory-device.c         | 69 +++++++++++++++-------------------
>  hw/ppc/spapr.c                 | 37 +++++++++---------
>  hw/ppc/spapr_hcall.c           |  2 +-
>  include/hw/boards.h            |  2 +
>  include/hw/i386/pc.h           |  1 -
>  include/hw/mem/memory-device.h |  2 +
>  10 files changed, 68 insertions(+), 113 deletions(-)
> 
> -- 
> 2.40.1
Re: [PATCH 00/10] memory-device: Some cleanups
Posted by David Hildenbrand 1 year, 4 months ago
On 22.06.23 22:13, Michael S. Tsirkin wrote:
> On Tue, May 30, 2023 at 01:38:28PM +0200, David Hildenbrand wrote:
>> Working on adding multi-memslot support for virtio-mem (teaching memory
>> device code about memory devices that can consume multiple memslots), I
>> have some preparatory cleanups in my queue that make sense independent of
>> the actual memory-device/virtio-mem extensions.
> 
> pc/acpi things:
> 
> Acked-by: Michael S. Tsirkin <mst@redhat.com>

Thanks, I added that to patch 6/7/8.

-- 
Cheers,

David / dhildenb