From nobody Tue Feb 10 23:00:58 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1507564444505634.7540346338677; Mon, 9 Oct 2017 08:54:04 -0700 (PDT) Received: from localhost ([::1]:58489 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e1aNQ-00073Y-MR for importer@patchew.org; Mon, 09 Oct 2017 11:53:56 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49008) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e1aJU-0004A7-Bf for qemu-devel@nongnu.org; Mon, 09 Oct 2017 11:49:55 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e1aJQ-00036O-DU for qemu-devel@nongnu.org; Mon, 09 Oct 2017 11:49:52 -0400 Received: from 10.mo4.mail-out.ovh.net ([188.165.33.109]:35337) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1e1aJQ-00035n-7Q for qemu-devel@nongnu.org; Mon, 09 Oct 2017 11:49:48 -0400 Received: from player746.ha.ovh.net (b6.ovh.net [213.186.33.56]) by mo4.mail-out.ovh.net (Postfix) with ESMTP id AE443D93D6 for ; Mon, 9 Oct 2017 17:49:46 +0200 (CEST) Received: from zorba.kaod.org.com (LFbn-1-2231-173.w90-76.abo.wanadoo.fr [90.76.52.173]) (Authenticated sender: clg@kaod.org) by player746.ha.ovh.net (Postfix) with ESMTPSA id 78CB2500087; Mon, 9 Oct 2017 17:49:40 +0200 (CEST) From: =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= To: qemu-ppc@nongnu.org, qemu-devel@nongnu.org, David Gibson , Nikunj A Dadhania , Benjamin Herrenschmidt Date: Mon, 9 Oct 2017 17:49:27 +0200 Message-Id: <20171009154930.29095-2-clg@kaod.org> X-Mailer: git-send-email 2.13.6 In-Reply-To: <20171009154930.29095-1-clg@kaod.org> References: <20171009154930.29095-1-clg@kaod.org> MIME-Version: 1.0 X-Ovh-Tracer-Id: 11140216630008974163 X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: -100 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrfeelledrleelgdejkecutefuodetggdotefrodftvfcurfhrohhfihhlvgemucfqggfjpdevjffgvefmvefgnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 188.165.33.109 Subject: [Qemu-devel] [PATCH v2 1/4] target/ppc: export ppc_cpu_pvr_match() helper X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" It will be used to test the family of a CPU. Signed-off-by: C=C3=A9dric Le Goater --- 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); =20 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 =3D POWERPC_CPU_GET_CLASS(cpu); =20 @@ -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; } } --=20 2.13.6