[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 03/33] spapr: tune rtas-size
From: |
David Gibson |
Subject: |
[PULL 03/33] spapr: tune rtas-size |
Date: |
Fri, 9 Jul 2021 15:16:58 +1000 |
From: Alexey Kardashevskiy <aik@ozlabs.ru>
QEMU reserves space for RTAS via /rtas/rtas-size which tells the client
how much space the RTAS requires to work which includes the RTAS binary
blob implementing RTAS runtime. Because pseries supports FWNMI which
requires plenty of space, QEMU reserves more than 2KB which is
enough for the RTAS blob as it is just 20 bytes (under QEMU).
Since FWNMI reset delivery was added, RTAS_SIZE macro is not used anymore.
This replaces RTAS_SIZE with RTAS_MIN_SIZE and uses it in
the /rtas/rtas-size calculation to account for the RTAS blob.
Fixes: 0e236d347790 ("ppc/spapr: Implement FWNMI System Reset delivery")
Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
Message-Id: <20210622070336.1463250-1-aik@ozlabs.ru>
Reviewed-by: Greg Kurz <groug@kaod.org>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
---
hw/ppc/spapr.c | 8 ++++++--
include/hw/ppc/spapr.h | 2 +-
2 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c
index 4dd90b75cc..9e19c57032 100644
--- a/hw/ppc/spapr.c
+++ b/hw/ppc/spapr.c
@@ -919,9 +919,13 @@ static void spapr_dt_rtas(SpaprMachineState *spapr, void
*fdt)
*
* The extra 8 bytes is required because Linux's FWNMI error log check
* is off-by-one.
+ *
+ * RTAS_MIN_SIZE is required for the RTAS blob itself.
*/
- _FDT(fdt_setprop_cell(fdt, rtas, "rtas-size", RTAS_ERROR_LOG_MAX +
- ms->smp.max_cpus * sizeof(uint64_t)*2 +
sizeof(uint64_t)));
+ _FDT(fdt_setprop_cell(fdt, rtas, "rtas-size", RTAS_MIN_SIZE +
+ RTAS_ERROR_LOG_MAX +
+ ms->smp.max_cpus * sizeof(uint64_t) * 2 +
+ sizeof(uint64_t)));
_FDT(fdt_setprop_cell(fdt, rtas, "rtas-error-log-max",
RTAS_ERROR_LOG_MAX));
_FDT(fdt_setprop_cell(fdt, rtas, "rtas-event-scan-rate",
diff --git a/include/hw/ppc/spapr.h b/include/hw/ppc/spapr.h
index f05219f75e..5697327e4c 100644
--- a/include/hw/ppc/spapr.h
+++ b/include/hw/ppc/spapr.h
@@ -770,7 +770,7 @@ void spapr_load_rtas(SpaprMachineState *spapr, void *fdt,
hwaddr addr);
#define SPAPR_IS_PCI_LIOBN(liobn) (!!((liobn) & 0x80000000))
#define SPAPR_PCI_DMA_WINDOW_NUM(liobn) ((liobn) & 0xff)
-#define RTAS_SIZE 2048
+#define RTAS_MIN_SIZE 20 /* hv_rtas_size in SLOF */
#define RTAS_ERROR_LOG_MAX 2048
/* Offset from rtas-base where error log is placed */
--
2.31.1
- [PULL 00/33] ppc-for-6.1 queue 20210709, David Gibson, 2021/07/09
- [PULL 04/33] target/ppc: Remove PowerPCCPUClass.handle_mmu_fault, David Gibson, 2021/07/09
- [PULL 02/33] target/ppc: Drop PowerPCCPUClass::interrupts_big_endian(), David Gibson, 2021/07/09
- [PULL 01/33] target/ppc: Introduce ppc_interrupts_little_endian(), David Gibson, 2021/07/09
- [PULL 05/33] target/ppc: Use MMUAccessType with *_handle_mmu_fault, David Gibson, 2021/07/09
- [PULL 07/33] target/ppc: Use bool success for ppc_radix64_xlate, David Gibson, 2021/07/09
- [PULL 03/33] spapr: tune rtas-size,
David Gibson <=
- [PULL 06/33] target/ppc: Push real-mode handling into ppc_radix64_xlate, David Gibson, 2021/07/09
- [PULL 10/33] target/ppc: Split out ppc_jumbo_xlate, David Gibson, 2021/07/09
- [PULL 15/33] target/ppc: Fix compilation with DEBUG_BATS debug option, David Gibson, 2021/07/09
- [PULL 08/33] target/ppc: Split out ppc_hash64_xlate, David Gibson, 2021/07/09
- [PULL 11/33] target/ppc: Introduce ppc_xlate, David Gibson, 2021/07/09
- [PULL 23/33] target/ppc: mtmsrd is an illegal instruction on BookE, David Gibson, 2021/07/09
- [PULL 09/33] target/ppc: Split out ppc_hash32_xlate, David Gibson, 2021/07/09
- [PULL 12/33] target/ppc: Restrict ppc_cpu_tlb_fill to TCG, David Gibson, 2021/07/09
- [PULL 13/33] target/ppc: Fix compilation with DUMP_PAGE_TABLES debug option, David Gibson, 2021/07/09
- [PULL 14/33] target/ppc: Fix compilation with FLUSH_ALL_TLBS debug option, David Gibson, 2021/07/09