[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 17/26] target/ppc: Add migration support for BHRB
From: |
Nicholas Piggin |
Subject: |
[PATCH 17/26] target/ppc: Add migration support for BHRB |
Date: |
Fri, 19 Jan 2024 01:06:35 +1000 |
From: Glenn Miles <milesg@linux.vnet.ibm.com>
Adds migration support for Branch History Rolling
Buffer (BHRB) internal state.
Signed-off-by: Glenn Miles <milesg@linux.vnet.ibm.com>
---
target/ppc/machine.c | 21 +++++++++++++++++++++
1 file changed, 21 insertions(+)
diff --git a/target/ppc/machine.c b/target/ppc/machine.c
index 6b6c31d903..731dd8df35 100644
--- a/target/ppc/machine.c
+++ b/target/ppc/machine.c
@@ -711,6 +711,26 @@ static const VMStateDescription vmstate_reservation = {
}
};
+#ifdef TARGET_PPC64
+static bool bhrb_needed(void *opaque)
+{
+ PowerPCCPU *cpu = opaque;
+ return (cpu->env.flags & POWERPC_FLAG_BHRB) != 0;
+}
+
+static const VMStateDescription vmstate_bhrb = {
+ .name = "cpu/bhrb",
+ .version_id = 1,
+ .minimum_version_id = 1,
+ .needed = bhrb_needed,
+ .fields = (VMStateField[]) {
+ VMSTATE_UINTTL(env.bhrb_offset, PowerPCCPU),
+ VMSTATE_UINT64_ARRAY(env.bhrb, PowerPCCPU, BHRB_MAX_NUM_ENTRIES),
+ VMSTATE_END_OF_LIST()
+ }
+};
+#endif
+
const VMStateDescription vmstate_ppc_cpu = {
.name = "cpu",
.version_id = 5,
@@ -756,6 +776,7 @@ const VMStateDescription vmstate_ppc_cpu = {
#ifdef TARGET_PPC64
&vmstate_tm,
&vmstate_slb,
+ &vmstate_bhrb,
#endif /* TARGET_PPC64 */
&vmstate_tlb6xx,
&vmstate_tlbemb,
--
2.42.0
- [PATCH 06/26] target/ppc: Rename TBL to TB on 64-bit, (continued)
- [PATCH 06/26] target/ppc: Rename TBL to TB on 64-bit, Nicholas Piggin, 2024/01/18
- [PATCH 07/26] target/ppc: Improve timebase register defines naming, Nicholas Piggin, 2024/01/18
- [PATCH 08/26] target/ppc: Fix move-to timebase SPR access permissions, Nicholas Piggin, 2024/01/18
- [PATCH 09/26] pnv/chiptod: Add POWER9/10 chiptod model, Nicholas Piggin, 2024/01/18
- [PATCH 10/26] ppc/pnv: Wire ChipTOD model to powernv9 and powernv10 machines, Nicholas Piggin, 2024/01/18
- [PATCH 11/26] pnv/chiptod: Implement the ChipTOD to Core transfer, Nicholas Piggin, 2024/01/18
- [PATCH 12/26] target/ppc: Implement core timebase state machine and TFMR, Nicholas Piggin, 2024/01/18
- [PATCH 13/26] target/ppc: Add SMT support to time facilities, Nicholas Piggin, 2024/01/18
- [PATCH 14/26] target/ppc: Add new hflags to support BHRB, Nicholas Piggin, 2024/01/18
- [PATCH 15/26] target/ppc: Add recording of taken branches to BHRB, Nicholas Piggin, 2024/01/18
- [PATCH 17/26] target/ppc: Add migration support for BHRB,
Nicholas Piggin <=
- [PATCH 18/26] target/ppc: BookE DECAR SPR is 32-bit, Nicholas Piggin, 2024/01/18
- [PATCH 16/26] target/ppc: Add clrbhrb and mfbhrbe instructions, Nicholas Piggin, 2024/01/18
- [PATCH 22/26] target/ppc: Add SMT support to simple SPRs, Nicholas Piggin, 2024/01/18
- [PATCH 24/26] target/ppc: Implement LDBAR, TTR SPRs, Nicholas Piggin, 2024/01/18
- [PATCH 23/26] target/ppc: Add SMT support to PTCR SPR, Nicholas Piggin, 2024/01/18
- [PATCH 19/26] target/ppc: Wire up BookE ATB registers for e500 family, Nicholas Piggin, 2024/01/18
- [PATCH 20/26] target/ppc: Add PPR32 SPR, Nicholas Piggin, 2024/01/18
- [PATCH 21/26] target/ppc: add helper to write per-LPAR SPRs, Nicholas Piggin, 2024/01/18
- [PATCH 26/26] target/ppc: add SMT support to msgsnd broadcast, Nicholas Piggin, 2024/01/18
- [PATCH 25/26] target/ppc: Implement SPRC/SPRD SPRs, Nicholas Piggin, 2024/01/18