[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v5 13/18] spapr: Don't use weird units for MIN_RMA_SLOF
From: |
David Gibson |
Subject: |
[PATCH v5 13/18] spapr: Don't use weird units for MIN_RMA_SLOF |
Date: |
Thu, 20 Feb 2020 14:23:11 +1100 |
MIN_RMA_SLOF records the minimum about of RMA that the SLOF firmware
requires. It lets us give a meaningful error if the RMA ends up too small,
rather than just letting SLOF crash.
It's currently stored as a number of megabytes, which is strange for global
constants. Move that megabyte scaling into the definition of the constant
like most other things use.
Change from M to MiB in the associated message while we're at it.
Signed-off-by: David Gibson <address@hidden>
---
hw/ppc/spapr.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c
index 828e2cc135..272a270b7a 100644
--- a/hw/ppc/spapr.c
+++ b/hw/ppc/spapr.c
@@ -103,7 +103,7 @@
#define FW_OVERHEAD 0x2800000
#define KERNEL_LOAD_ADDR FW_MAX_SIZE
-#define MIN_RMA_SLOF 128UL
+#define MIN_RMA_SLOF (128 * MiB)
#define PHANDLE_INTC 0x00001111
@@ -2959,10 +2959,10 @@ static void spapr_machine_init(MachineState *machine)
}
}
- if (spapr->rma_size < (MIN_RMA_SLOF * MiB)) {
+ if (spapr->rma_size < MIN_RMA_SLOF) {
error_report(
- "pSeries SLOF firmware requires >= %ldM guest RMA (Real Mode Area
memory)",
- MIN_RMA_SLOF);
+ "pSeries SLOF firmware requires >= %ldMiB guest RMA (Real Mode
Area memory)",
+ MIN_RMA_SLOF / MiB);
exit(1);
}
--
2.24.1
- [PATCH v5 04/18] target/ppc: Introduce ppc_hash64_use_vrma() helper, (continued)
- [PATCH v5 04/18] target/ppc: Introduce ppc_hash64_use_vrma() helper, David Gibson, 2020/02/19
- [PATCH v5 07/18] target/ppc: Use class fields to simplify LPCR masking, David Gibson, 2020/02/19
- [PATCH v5 10/18] target/ppc: Only calculate RMLS derived RMA limit on demand, David Gibson, 2020/02/19
- [PATCH v5 08/18] target/ppc: Streamline calculation of RMA limit from LPCR[RMLS], David Gibson, 2020/02/19
- [PATCH v5 12/18] target/ppc: Don't store VRMA SLBE persistently, David Gibson, 2020/02/19
- [PATCH v5 09/18] target/ppc: Correct RMLS table, David Gibson, 2020/02/19
- [PATCH v5 02/18] ppc: Remove stub of PPC970 HID4 implementation, David Gibson, 2020/02/19
- [PATCH v5 14/18] spapr,ppc: Simplify signature of kvmppc_rma_size(), David Gibson, 2020/02/19
- [PATCH v5 06/18] target/ppc: Remove RMOR register from POWER9 & POWER10, David Gibson, 2020/02/19
- [PATCH v5 15/18] spapr: Don't attempt to clamp RMA to VRMA constraint, David Gibson, 2020/02/19
- [PATCH v5 13/18] spapr: Don't use weird units for MIN_RMA_SLOF,
David Gibson <=
- [PATCH v5 11/18] target/ppc: Streamline construction of VRMA SLB entry, David Gibson, 2020/02/19
- [PATCH v5 16/18] spapr: Don't clamp RMA to 16GiB on new machine types, David Gibson, 2020/02/19
- [PATCH v5 03/18] target/ppc: Correct handling of real mode accesses with vhyp on hash MMU, David Gibson, 2020/02/19
- [PATCH v5 17/18] spapr: Clean up RMA size calculation, David Gibson, 2020/02/19
- [PATCH v5 18/18] spapr: Fold spapr_node0_size() into its only caller, David Gibson, 2020/02/19