From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:49849) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TOT5W-0006D7-20 for qemu-devel@nongnu.org; Wed, 17 Oct 2012 08:51:12 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TOT5U-0004F8-Jo for qemu-devel@nongnu.org; Wed, 17 Oct 2012 08:51:06 -0400 Received: from mout.web.de ([212.227.17.12]:58328) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TOT5U-0004Es-AO for qemu-devel@nongnu.org; Wed, 17 Oct 2012 08:51:04 -0400 Message-ID: <507EA9B0.8000707@web.de> Date: Wed, 17 Oct 2012 14:50:56 +0200 From: Jan Kiszka MIME-Version: 1.0 References: <1350005203-15405-1-git-send-email-afaerber@suse.de> <1350005203-15405-2-git-send-email-afaerber@suse.de> <507D84FC.8000306@suse.de> In-Reply-To: <507D84FC.8000306@suse.de> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enigCA6151DC19CDE279453645A2" Subject: Re: [Qemu-devel] [PATCH qom-cpu v2 1/7] target-i386: Inline APIC cpu_env property setting List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: =?UTF-8?B?QW5kcmVhcyBGw6RyYmVy?= Cc: Paolo Bonzini , qemu-devel@nongnu.org, Igor Mammedov This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enigCA6151DC19CDE279453645A2 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 2012-10-16 18:02, Andreas F=C3=A4rber wrote: > Am 12.10.2012 03:26, schrieb Andreas F=C3=A4rber: >> This prepares for changing the variable type from void*. >> >> Signed-off-by: Andreas F=C3=A4rber >> Cc: Igor Mammedov >=20 > Paolo, are you happy with getting rid of the pointer property this way?= >=20 > Jan, are you okay with accessing APICCommonState in target-i386/cpu.c a= s > an interim solution? Yes, I don't see it as a problem. Jan >=20 > Andreas >=20 >> --- >> hw/apic_common.c | 1 - >> target-i386/cpu.c | 5 ++++- >> 2 Dateien ge=C3=A4ndert, 4 Zeilen hinzugef=C3=BCgt(+), 2 Zeilen entfe= rnt(-) >> >> diff --git a/hw/apic_common.c b/hw/apic_common.c >> index 371f95d..a26a631 100644 >> --- a/hw/apic_common.c >> +++ b/hw/apic_common.c >> @@ -368,7 +368,6 @@ static const VMStateDescription vmstate_apic_commo= n =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_EN= ABLE_BIT, >> true), >> DEFINE_PROP_END_OF_LIST(), >> diff --git a/target-i386/cpu.c b/target-i386/cpu.c >> index e307b4e..0cce910 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 C= PUID >> @@ -1884,6 +1885,7 @@ static void x86_cpu_apic_init(X86CPU *cpu, Error= **errp) >> #ifndef CONFIG_USER_ONLY >> static int apic_mapped; >> CPUX86State *env =3D &cpu->env; >> + APICCommonState *apic; >> const char *apic_type =3D "apic"; >> =20 >> if (kvm_irqchip_in_kernel()) { >> @@ -1902,7 +1904,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 --------------enigCA6151DC19CDE279453645A2 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.16 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://www.enigmail.net/ iEYEARECAAYFAlB+qbMACgkQitSsb3rl5xSA8wCfaiSoxbKckD8GDdy0bKLR2Z3E 91YAoJytrJ0wnqyIJOIagw96PEWd+kwP =1QzT -----END PGP SIGNATURE----- --------------enigCA6151DC19CDE279453645A2--