From: Peter Xu <peterx@redhat.com>
To: BALATON Zoltan <balaton@eik.bme.hu>
Cc: qemu-devel@nongnu.org,
"Akihiko Odaki" <odaki@rsg.ci.i.u-tokyo.ac.jp>,
"Paolo Bonzini" <pbonzini@redhat.com>,
"Mark Cave-Ayland" <mark.cave-ayland@ilande.co.uk>,
"Gerd Hoffmann" <kraxel@redhat.com>,
"Max Filippov" <jcmvbkbc@gmail.com>,
"Peter Maydell" <peter.maydell@linaro.org>,
"Philippe Mathieu-Daudé" <philmd@linaro.org>
Subject: Re: [PATCH v4 0/8] memory: Remove most _nomigrate variants
Date: Tue, 24 Feb 2026 10:22:43 -0500 [thread overview]
Message-ID: <aZ3CQw2ad5cVc-Mm@x1.local> (raw)
In-Reply-To: <cover.1770253186.git.balaton@eik.bme.hu>
On Thu, Feb 05, 2026 at 02:13:18AM +0100, BALATON Zoltan wrote:
> v4:
> - separate patch converting Sun machines from memory_region_init_ram_nomigrate
> - split helper to init ram into two functions: setup and error_propagate
> - also use memory_region_init_io in memory_region_init_ram_device_ptr
>
> v3:
> - rebased on master after some patches were merged
> - drop some more line from memory-region-housekeeping.cocci
> - added comment to explain what factored out helper does
> - some more clean ups included
>
> BALATON Zoltan (8):
> hw/display/{cg3,tcx}: Do not use memory_region_init_rom_nomigrate()
> memory: Remove memory_region_init_rom_nomigrate()
> sun4m,sun4u,tcx: Do not use memory_region_init_ram_nomigrate()
> memory: Remove memory_region_init_ram_nomigrate()
Could you help explain why we need to remove the above two small helpers?
Not saying that we can't remove them, but I don't yet see the point of
open-code those readonly=true setup either, or any problem with having the
smaller helpers when ram_flags=0. Small helpers sometimes help readability.
Some of them are going backwards againist what the cocci scripts were
suggesting previously, like:
- memory_region_init_ram_nomigrate(E1, E2, E3, E4, E5);
+ memory_region_init_rom_nomigrate(E1, E2, E3, E4, E5);
... WHEN != E1
- memory_region_set_readonly(E1, true);
So you suggest open-code instead. Why?
Is it required for your follow up cleanups?
Thanks,
> memory: Factor out common ram region initialization
> memory: Add internal memory_region_register_ram function
> memory: Shorten memory_region_init_ram_device_ptr and
> memory_region_init_rom_device
> memory: Factor out more common ram region initialization
>
> docs/devel/memory.rst | 9 +-
> hw/display/cg3.c | 6 +-
> hw/display/tcx.c | 11 +-
> hw/display/vga.c | 4 +-
> hw/sparc/sun4m.c | 15 +-
> hw/sparc64/sun4u.c | 9 +-
> hw/xtensa/xtfpga.c | 4 +-
> include/system/memory.h | 49 ----
> .../memory-region-housekeeping.cocci | 47 ---
> system/memory.c | 269 ++++++------------
> 10 files changed, 120 insertions(+), 303 deletions(-)
>
> --
> 2.41.3
>
--
Peter Xu
next prev parent reply other threads:[~2026-02-24 15:23 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-05 1:13 [PATCH v4 0/8] memory: Remove most _nomigrate variants BALATON Zoltan
2026-02-05 1:13 ` [PATCH v4 1/8] hw/display/{cg3,tcx}: Do not use memory_region_init_rom_nomigrate() BALATON Zoltan
2026-02-05 1:13 ` [PATCH v4 2/8] memory: Remove memory_region_init_rom_nomigrate() BALATON Zoltan
2026-02-05 1:13 ` [PATCH v4 3/8] sun4m,sun4u,tcx: Do not use memory_region_init_ram_nomigrate() BALATON Zoltan
2026-02-05 1:13 ` [PATCH v4 4/8] memory: Remove memory_region_init_ram_nomigrate() BALATON Zoltan
2026-02-05 1:13 ` [PATCH v4 5/8] memory: Factor out common ram region initialization BALATON Zoltan
2026-02-05 1:13 ` [PATCH v4 6/8] memory: Add internal memory_region_register_ram function BALATON Zoltan
2026-02-05 1:13 ` [PATCH v4 7/8] memory: Shorten memory_region_init_ram_device_ptr and memory_region_init_rom_device BALATON Zoltan
2026-02-05 1:13 ` [PATCH v4 8/8] memory: Factor out more common ram region initialization BALATON Zoltan
2026-02-19 23:29 ` [PATCH v4 0/8] memory: Remove most _nomigrate variants BALATON Zoltan
2026-02-24 15:22 ` Peter Xu [this message]
2026-02-24 17:44 ` BALATON Zoltan
2026-02-24 18:04 ` Peter Maydell
2026-02-25 16:50 ` BALATON Zoltan
2026-02-25 16:30 ` Peter Xu
2026-03-02 6:46 ` Akihiko Odaki
2026-03-02 12:26 ` BALATON Zoltan
2026-03-02 12:42 ` Akihiko Odaki
2026-03-02 15:20 ` BALATON Zoltan
2026-03-02 20:21 ` Peter Xu
2026-03-02 21:06 ` BALATON Zoltan
2026-03-03 8:09 ` Akihiko Odaki
2026-03-03 13:16 ` BALATON Zoltan
2026-03-03 13:21 ` BALATON Zoltan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=aZ3CQw2ad5cVc-Mm@x1.local \
--to=peterx@redhat.com \
--cc=balaton@eik.bme.hu \
--cc=jcmvbkbc@gmail.com \
--cc=kraxel@redhat.com \
--cc=mark.cave-ayland@ilande.co.uk \
--cc=odaki@rsg.ci.i.u-tokyo.ac.jp \
--cc=pbonzini@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=philmd@linaro.org \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.