[PATCH] ppc/spapr: remove dead logic for non-existent machine type

Harsh Prateek Bora posted 1 patch 5 months ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20250616095208.241834-1-harshpb@linux.ibm.com
Maintainers: Nicholas Piggin <npiggin@gmail.com>, Daniel Henrique Barboza <danielhb413@gmail.com>, Harsh Prateek Bora <harshpb@linux.ibm.com>
hw/ppc/spapr_caps.c | 13 -------------
1 file changed, 13 deletions(-)
[PATCH] ppc/spapr: remove dead logic for non-existent machine type
Posted by Harsh Prateek Bora 5 months ago
This logic was kept here to support pseries-2.12 and older machine type
to enable them to calculate supported page size. Since the support for
such older machine types is already removed, this becomes dead code and
hence removed.

Signed-off-by: Harsh Prateek Bora <harshpb@linux.ibm.com>
---
 hw/ppc/spapr_caps.c | 13 -------------
 1 file changed, 13 deletions(-)

diff --git a/hw/ppc/spapr_caps.c b/hw/ppc/spapr_caps.c
index d643591e25..0d62c11195 100644
--- a/hw/ppc/spapr_caps.c
+++ b/hw/ppc/spapr_caps.c
@@ -901,19 +901,6 @@ static SpaprCapabilities default_caps_with_cpu(SpaprMachineState *spapr,
         caps.caps[SPAPR_CAP_IBS] = SPAPR_CAP_BROKEN;
     }
 
-    /* This is for pseries-2.12 and older */
-    if (smc->default_caps.caps[SPAPR_CAP_HPT_MAXPAGESIZE] == 0) {
-        uint8_t mps;
-
-        if (kvmppc_hpt_needs_host_contiguous_pages()) {
-            mps = ctz64(qemu_minrampagesize());
-        } else {
-            mps = 34; /* allow everything up to 16GiB, i.e. everything */
-        }
-
-        caps.caps[SPAPR_CAP_HPT_MAXPAGESIZE] = mps;
-    }
-
     return caps;
 }
 
-- 
2.49.0