[PATCH v5 0/7] Implement memory_region_new_* functions

BALATON Zoltan posted 7 patches 5 days, 1 hour ago
Failed in applying to current master (apply log)
docs/devel/memory.rst   |  21 ++---
hw/ide/sii3112.c        |  30 +++----
hw/pci-host/articia.c   |  22 +++--
hw/ppc/amigaone.c       |  28 ++----
hw/ppc/pegasos.c        |  13 ---
hw/xtensa/xtfpga.c      |   5 +-
include/system/memory.h | 192 ++++++++++++++++++++++++++++++++++++++++
system/memory.c         | 186 +++++++++++++++++++++++++++++++++++++-
8 files changed, 421 insertions(+), 76 deletions(-)
[PATCH v5 0/7] Implement memory_region_new_* functions
Posted by BALATON Zoltan 5 days, 1 hour ago
Allow creating memory regions that are managed by QOM and freed with
their owner as it is already documented and implemented but there was
no way to use it.

v5:
- rebase on master
- add patch to export memory_region_set_ops (needed for ati-vga endian
switch)

v4:
- rebase on latest version of clean up series:
Based-on: cover.1772924151.git.balaton@eik.bme.hu

v3:
- based on split off clean up series
- convert xtfpga from nomigrate as this has no migration compatibility
issue

v2:
- rebase on master
- update documentation
- use these function to fix some leaks (there may be more, e.g. in
hw/pci-host/bonito but I leave that for later and/or others)

BALATON Zoltan (7):
  memory: Export memory_region_set_ops()
  memory: Add memory_region_new* functions
  memory: Update documentation for memory_region_new*()
  hw/ide/sii3112: Use memory_region_new to avoid leaking regions
  hw/pci-host/articia: Map PCI memory windows in realize
  hw/pci-host/articia: Add variable for common type cast
  hw/xtensa/xtfpga: Fix leaking memory region

 docs/devel/memory.rst   |  21 ++---
 hw/ide/sii3112.c        |  30 +++----
 hw/pci-host/articia.c   |  22 +++--
 hw/ppc/amigaone.c       |  28 ++----
 hw/ppc/pegasos.c        |  13 ---
 hw/xtensa/xtfpga.c      |   5 +-
 include/system/memory.h | 192 ++++++++++++++++++++++++++++++++++++++++
 system/memory.c         | 186 +++++++++++++++++++++++++++++++++++++-
 8 files changed, 421 insertions(+), 76 deletions(-)

-- 
2.41.3
Re: [PATCH v5 0/7] Implement memory_region_new_* functions
Posted by Paolo Bonzini 5 days ago
On 5/25/26 17:47, BALATON Zoltan wrote:
> Allow creating memory regions that are managed by QOM and freed with
> their owner as it is already documented and implemented but there was
> no way to use it.

It was already explained that this will not be merged.

Paolo

> v5:
> - rebase on master
> - add patch to export memory_region_set_ops (needed for ati-vga endian
> switch)
> 
> v4:
> - rebase on latest version of clean up series:
> Based-on: cover.1772924151.git.balaton@eik.bme.hu
> 
> v3:
> - based on split off clean up series
> - convert xtfpga from nomigrate as this has no migration compatibility
> issue
> 
> v2:
> - rebase on master
> - update documentation
> - use these function to fix some leaks (there may be more, e.g. in
> hw/pci-host/bonito but I leave that for later and/or others)
> 
> BALATON Zoltan (7):
>    memory: Export memory_region_set_ops()
>    memory: Add memory_region_new* functions
>    memory: Update documentation for memory_region_new*()
>    hw/ide/sii3112: Use memory_region_new to avoid leaking regions
>    hw/pci-host/articia: Map PCI memory windows in realize
>    hw/pci-host/articia: Add variable for common type cast
>    hw/xtensa/xtfpga: Fix leaking memory region
> 
>   docs/devel/memory.rst   |  21 ++---
>   hw/ide/sii3112.c        |  30 +++----
>   hw/pci-host/articia.c   |  22 +++--
>   hw/ppc/amigaone.c       |  28 ++----
>   hw/ppc/pegasos.c        |  13 ---
>   hw/xtensa/xtfpga.c      |   5 +-
>   include/system/memory.h | 192 ++++++++++++++++++++++++++++++++++++++++
>   system/memory.c         | 186 +++++++++++++++++++++++++++++++++++++-
>   8 files changed, 421 insertions(+), 76 deletions(-)
>
Re: [PATCH v5 0/7] Implement memory_region_new_* functions
Posted by BALATON Zoltan 4 days, 23 hours ago
On Mon, 25 May 2026, Paolo Bonzini wrote:
> On 5/25/26 17:47, BALATON Zoltan wrote:
>> Allow creating memory regions that are managed by QOM and freed with
>> their owner as it is already documented and implemented but there was
>> no way to use it.
>
> It was already explained that this will not be merged.

Please explain again why because I did not get a reason for refusing it. 
If this won't be merged how should the issues handled here be fixed and 
why is that better than this way? (The patches seem to have been mangled 
on sending so I'd resend but I at least need the first patch for further 
ati-vga patches.)

Regards,
BALATON Zoltan

> Paolo
>
>> v5:
>> - rebase on master
>> - add patch to export memory_region_set_ops (needed for ati-vga endian
>> switch)
>> 
>> v4:
>> - rebase on latest version of clean up series:
>> Based-on: cover.1772924151.git.balaton@eik.bme.hu
>> 
>> v3:
>> - based on split off clean up series
>> - convert xtfpga from nomigrate as this has no migration compatibility
>> issue
>> 
>> v2:
>> - rebase on master
>> - update documentation
>> - use these function to fix some leaks (there may be more, e.g. in
>> hw/pci-host/bonito but I leave that for later and/or others)
>> 
>> BALATON Zoltan (7):
>>    memory: Export memory_region_set_ops()
>>    memory: Add memory_region_new* functions
>>    memory: Update documentation for memory_region_new*()
>>    hw/ide/sii3112: Use memory_region_new to avoid leaking regions
>>    hw/pci-host/articia: Map PCI memory windows in realize
>>    hw/pci-host/articia: Add variable for common type cast
>>    hw/xtensa/xtfpga: Fix leaking memory region
>>
>>   docs/devel/memory.rst   |  21 ++---
>>   hw/ide/sii3112.c        |  30 +++----
>>   hw/pci-host/articia.c   |  22 +++--
>>   hw/ppc/amigaone.c       |  28 ++----
>>   hw/ppc/pegasos.c        |  13 ---
>>   hw/xtensa/xtfpga.c      |   5 +-
>>   include/system/memory.h | 192 ++++++++++++++++++++++++++++++++++++++++
>>   system/memory.c         | 186 +++++++++++++++++++++++++++++++++++++-
>>   8 files changed, 421 insertions(+), 76 deletions(-)
>> 
>
>