[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v2 1/4] target/ppc: export ppc_cpu_pvr_match() helpe
From: |
Cédric Le Goater |
Subject: |
[Qemu-devel] [PATCH v2 1/4] target/ppc: export ppc_cpu_pvr_match() helper |
Date: |
Mon, 9 Oct 2017 17:49:27 +0200 |
It will be used to test the family of a CPU.
Signed-off-by: Cédric Le Goater <address@hidden>
---
include/hw/ppc/ppc.h | 1 +
target/ppc/machine.c | 5 +++--
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/include/hw/ppc/ppc.h b/include/hw/ppc/ppc.h
index 4e7fe110d67b..01e32fa03d2e 100644
--- a/include/hw/ppc/ppc.h
+++ b/include/hw/ppc/ppc.h
@@ -107,4 +107,5 @@ enum {
void ppc_booke_timers_init(PowerPCCPU *cpu, uint32_t freq, uint32_t flags);
void ppc_cpu_parse_features(const char *cpu_model);
+bool ppc_cpu_pvr_match(PowerPCCPU *cpu, uint32_t pvr);
#endif
diff --git a/target/ppc/machine.c b/target/ppc/machine.c
index 384caee800e6..6085a8c25fd3 100644
--- a/target/ppc/machine.c
+++ b/target/ppc/machine.c
@@ -4,6 +4,7 @@
#include "exec/exec-all.h"
#include "hw/hw.h"
#include "hw/boards.h"
+#include "hw/ppc/ppc.h"
#include "sysemu/kvm.h"
#include "helper_regs.h"
#include "mmu-hash64.h"
@@ -210,7 +211,7 @@ static int cpu_pre_save(void *opaque)
* between sufficiently similar PVRs, as determined by the CPU class's
* pvr_match() hook.
*/
-static bool pvr_match(PowerPCCPU *cpu, uint32_t pvr)
+bool ppc_cpu_pvr_match(PowerPCCPU *cpu, uint32_t pvr)
{
PowerPCCPUClass *pcc = POWERPC_CPU_GET_CLASS(cpu);
@@ -247,7 +248,7 @@ static int cpu_post_load(void *opaque, int version_id)
} else
#endif
{
- if (!pvr_match(cpu, env->spr[SPR_PVR])) {
+ if (!ppc_cpu_pvr_match(cpu, env->spr[SPR_PVR])) {
return -1;
}
}
--
2.13.6
[Qemu-devel] [PATCH v2 3/4] spapr/rtas: fix reboot of a SMP TCG guest, Cédric Le Goater, 2017/10/09