Received: from eggs.gnu.org ([140.186.70.92]:38868) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rt9QD-0000Ib-PD for qemu-devel@nongnu.org; Thu, 02 Feb 2012 22:02:46 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Rt9Q2-00064r-FH for qemu-devel@nongnu.org; Thu, 02 Feb 2012 22:02:42 -0500 Received: from cantor2.suse.de ([195.135.220.15]:55655 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rt9Q1-00064W-KB for qemu-devel@nongnu.org; Thu, 02 Feb 2012 22:02:33 -0500 From: =?UTF-8?q?Andreas=20F=C3=A4rber?= Date: Fri, 3 Feb 2012 03:59:51 +0100 Message-Id: <1328237992-14953-21-git-send-email-afaerber@suse.de> In-Reply-To: <1328237992-14953-1-git-send-email-afaerber@suse.de> References: <1328237992-14953-1-git-send-email-afaerber@suse.de> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: [Qemu-devel] [PATCH RFC v3 20/21] target-arm: Prepare halted property for CPU List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Peter Maydell , =?UTF-8?q?Andreas=20F=C3=A4rber?= Read-only and ARM-specific for now. Signed-off-by: Andreas F=C3=A4rber Cc: Peter Maydell Cc: Anthony Liguori --- target-arm/cpu.c | 12 ++++++++++++ 1 files changed, 12 insertions(+), 0 deletions(-) diff --git a/target-arm/cpu.c b/target-arm/cpu.c index 74f4e9b..4dfec15 100644 --- a/target-arm/cpu.c +++ b/target-arm/cpu.c @@ -20,6 +20,7 @@ =20 #include "cpu-core.h" #include "qemu-common.h" +#include "qapi/qapi-visit-core.h" #if !defined(CONFIG_USER_ONLY) #include "hw/loader.h" #endif @@ -538,6 +539,14 @@ static const ARMCPUInfo arm_cpus[] =3D { }, }; =20 +static void arm_cpu_get_halted(Object *obj, Visitor *v, void *opaque, + const char *name, Error **errp) +{ + ARMCPU *cpu =3D ARM_CPU(obj); + bool halted =3D cpu->env.halted !=3D 0; + visit_type_bool(v, &halted, name, errp); +} + static void arm_cpu_initfn(Object *obj) { ARMCPU *cpu =3D ARM_CPU(obj); @@ -552,6 +561,9 @@ static void arm_cpu_initfn(Object *obj) cpu->env.cp15.c0_cpuid =3D cpu_class->cp15.c0_cpuid; =20 cpu_do_reset(CPU(cpu)); + + object_property_add(obj, "halted", "boolean", + arm_cpu_get_halted, NULL, NULL, NULL, NULL); } =20 static void arm_cpu_class_init(ObjectClass *klass, void *data) --=20 1.7.7