From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:60700) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TTMfd-0007yh-3k for qemu-devel@nongnu.org; Tue, 30 Oct 2012 21:00:41 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TTMfX-0005HK-UM for qemu-devel@nongnu.org; Tue, 30 Oct 2012 21:00:37 -0400 Received: from cantor2.suse.de ([195.135.220.15]:52348 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TTMfX-0005G9-Nb for qemu-devel@nongnu.org; Tue, 30 Oct 2012 21:00:31 -0400 From: =?UTF-8?q?Andreas=20F=C3=A4rber?= Date: Wed, 31 Oct 2012 01:59:35 +0100 Message-Id: <1351645206-3041-5-git-send-email-afaerber@suse.de> In-Reply-To: <1351645206-3041-1-git-send-email-afaerber@suse.de> References: <1351645206-3041-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 04/35] target-i386: Inline APIC cpu_env property setting List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: =?UTF-8?q?Andreas=20F=C3=A4rber?= , anthony@codemonkey.ws This prepares for changing the variable type from void*. Signed-off-by: Andreas F=C3=A4rber Reviewed-by: Igor Mammedov --- hw/apic_common.c | 1 - target-i386/cpu.c | 5 ++++- 2 Dateien ge=C3=A4ndert, 4 Zeilen hinzugef=C3=BCgt(+), 2 Zeilen entfernt= (-) diff --git a/hw/apic_common.c b/hw/apic_common.c index d68116d..b13f23c 100644 --- a/hw/apic_common.c +++ b/hw/apic_common.c @@ -368,7 +368,6 @@ static const VMStateDescription vmstate_apic_common =3D= { =20 static Property apic_properties_common[] =3D { DEFINE_PROP_UINT8("id", APICCommonState, id, -1), - DEFINE_PROP_PTR("cpu_env", APICCommonState, cpu_env), DEFINE_PROP_BIT("vapic", APICCommonState, vapic_control, VAPIC_ENABL= E_BIT, true), DEFINE_PROP_END_OF_LIST(), diff --git a/target-i386/cpu.c b/target-i386/cpu.c index 18b8549..c30cc79 100644 --- a/target-i386/cpu.c +++ b/target-i386/cpu.c @@ -41,6 +41,7 @@ #ifndef CONFIG_USER_ONLY #include "hw/xen.h" #include "hw/sysbus.h" +#include "hw/apic_internal.h" #endif =20 /* feature flags taken from "Intel Processor Identification and the CPUI= D @@ -1892,6 +1893,7 @@ static void x86_cpu_apic_init(X86CPU *cpu, Error **= errp) { static int apic_mapped; CPUX86State *env =3D &cpu->env; + APICCommonState *apic; const char *apic_type =3D "apic"; =20 if (kvm_irqchip_in_kernel()) { @@ -1910,7 +1912,8 @@ static void x86_cpu_apic_init(X86CPU *cpu, Error **= errp) OBJECT(env->apic_state), NULL); qdev_prop_set_uint8(env->apic_state, "id", env->cpuid_apic_id); /* TODO: convert to link<> */ - qdev_prop_set_ptr(env->apic_state, "cpu_env", env); + apic =3D APIC_COMMON(env->apic_state); + apic->cpu_env =3D env; =20 if (qdev_init(env->apic_state)) { error_setg(errp, "APIC device '%s' could not be initialized", --=20 1.7.10.4