qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Thomas Huth <thuth@redhat.com>
To: qemu-devel@nongnu.org
Cc: "Richard Henderson" <richard.henderson@linaro.org>,
	"Philippe Mathieu-Daudé" <philmd@linaro.org>
Subject: [PULL 5/6] hw/core/machine: Remove MachineClass::fixup_ram_size callback
Date: Tue, 21 Oct 2025 15:57:34 +0200	[thread overview]
Message-ID: <20251021135735.96145-6-thuth@redhat.com> (raw)
In-Reply-To: <20251021135735.96145-1-thuth@redhat.com>

From: Philippe Mathieu-Daudé <philmd@linaro.org>

The MachineClass::fixup_ram_size callback, which was added
in commit 5c30ef937f5 ("vl/s390x: fixup ram sizes for compat
machines"), was only used by the s390-ccw-virtio-4.2 machine,
which got removed. Remove it as now unused.

Reported-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Message-ID: <20251020094903.72182-4-philmd@linaro.org>
Signed-off-by: Thomas Huth <thuth@redhat.com>
---
 include/hw/boards.h | 7 -------
 hw/core/machine.c   | 3 ---
 2 files changed, 10 deletions(-)

diff --git a/include/hw/boards.h b/include/hw/boards.h
index 665b6201214..d0a69cd490b 100644
--- a/include/hw/boards.h
+++ b/include/hw/boards.h
@@ -250,12 +250,6 @@ typedef struct {
  *    It also will be used as a way to option into "-m" option support.
  *    If it's not set by board, '-m' will be ignored and generic code will
  *    not create default RAM MemoryRegion.
- * @fixup_ram_size:
- *    Amends user provided ram size (with -m option) using machine
- *    specific algorithm. To be used by old machine types for compat
- *    purposes only.
- *    Applies only to default memory backend, i.e., explicit memory backend
- *    wasn't used.
  * @smbios_memory_device_size:
  *    Default size of memory device,
  *    SMBIOS 3.1.0 "7.18 Memory Device (Type 17)"
@@ -325,7 +319,6 @@ struct MachineClass {
                                                          unsigned cpu_index);
     const CPUArchIdList *(*possible_cpu_arch_ids)(MachineState *machine);
     int64_t (*get_default_cpu_node_id)(const MachineState *ms, int idx);
-    ram_addr_t (*fixup_ram_size)(ram_addr_t size);
     uint64_t smbios_memory_device_size;
     bool (*create_default_memdev)(MachineState *ms, const char *path,
                                   Error **errp);
diff --git a/hw/core/machine.c b/hw/core/machine.c
index 681adbb7ac5..7aec3916e80 100644
--- a/hw/core/machine.c
+++ b/hw/core/machine.c
@@ -648,9 +648,6 @@ static void machine_set_mem(Object *obj, Visitor *v, const char *name,
         mem->size = mc->default_ram_size;
     }
     mem->size = QEMU_ALIGN_UP(mem->size, 8192);
-    if (mc->fixup_ram_size) {
-        mem->size = mc->fixup_ram_size(mem->size);
-    }
     if ((ram_addr_t)mem->size != mem->size) {
         error_setg(errp, "ram size %llu exceeds permitted maximum %llu",
                    (unsigned long long)mem->size,
-- 
2.51.0



  parent reply	other threads:[~2025-10-21 13:59 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-21 13:57 [PULL 0/6] s390x patches + gitlab-CI fix Thomas Huth
2025-10-21 13:57 ` [PULL 1/6] qapi/machine-s390x: add QAPI event SCLP_CPI_INFO_AVAILABLE Thomas Huth
2025-10-21 13:57 ` [PULL 2/6] tests/functional: add tests for SCLP event CPI Thomas Huth
2025-10-21 13:57 ` [PULL 3/6] hw/s390x/ccw: Remove deprecated s390-ccw-virtio-4.2 machine Thomas Huth
2025-10-21 13:57 ` [PULL 4/6] hw/s390x/ccw: Remove SCLPDevice::increment_size field Thomas Huth
2025-10-21 13:57 ` Thomas Huth [this message]
2025-10-21 13:57 ` [PULL 6/6] gitlab-ci: Decrease the size of the compiler cache Thomas Huth
2025-10-21 16:52 ` [PULL 0/6] s390x patches + gitlab-CI fix Richard Henderson

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=20251021135735.96145-6-thuth@redhat.com \
    --to=thuth@redhat.com \
    --cc=philmd@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=richard.henderson@linaro.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).