From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:50919) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SYzmJ-0005pE-VE for qemu-devel@nongnu.org; Mon, 28 May 2012 09:14:33 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SYzmC-0001gB-Rg for qemu-devel@nongnu.org; Mon, 28 May 2012 09:14:31 -0400 Received: from cantor2.suse.de ([195.135.220.15]:48263 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SYzmC-0001fZ-Iw for qemu-devel@nongnu.org; Mon, 28 May 2012 09:14:24 -0400 Message-ID: <4FC37A25.5090406@suse.de> Date: Mon, 28 May 2012 15:14:13 +0200 From: =?UTF-8?B?QW5kcmVhcyBGw6RyYmVy?= MIME-Version: 1.0 References: <4FBF7043.1030503@suse.de> <52985.162.105.80.111.1338198222.squirrel@mprc.pku.edu.cn> In-Reply-To: <52985.162.105.80.111.1338198222.squirrel@mprc.pku.edu.cn> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH 5/9] unicore32-softmmu: initialize ucv2 cpu List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: guanxuetao@mprc.pku.edu.cn Cc: blauwirbel@gmail.com, Guan Xuetao , qemu-devel@nongnu.org Am 28.05.2012 11:43, schrieb guanxuetao@mprc.pku.edu.cn: >> Am 25.05.2012 13:29, schrieb Guan Xuetao: >>> Signed-off-by: Guan Xuetao >>> --- >>> target-unicore32/cpu.c | 17 +++++++++++++---- >>> target-unicore32/cpu.h | 2 +- >>> 2 files changed, 14 insertions(+), 5 deletions(-) >>> >>> diff --git a/target-unicore32/cpu.c b/target-unicore32/cpu.c >>> index de63f58..62c0a22 100644 >>> --- a/target-unicore32/cpu.c >>> +++ b/target-unicore32/cpu.c >>> @@ -32,13 +32,16 @@ static void unicore_ii_cpu_initfn(Object *obj) >>> UniCore32CPU *cpu =3D UNICORE32_CPU(obj); >>> CPUUniCore32State *env =3D &cpu->env; >>> >>> - env->cp0.c0_cpuid =3D 0x40010863; >>> + env->cp0.c0_cpuid =3D UC32_CPUID_UCV2; >> >> Please don't revert this change. I'll send you the patch to drop the >> CPUID #defines instead. >=20 > But, the kernel need this CPUID to check whether it is a unicore32 > processor, and if check fail, the kernel will halt. I'm not discussing about a guest kernel but about your source change above: The UC32_CPUID_UC32 #define should go away, i.e. please ack (today, if we want it in 1.1) and prepend my patch, and if the value is wrong here it should be changed *here* and not in UC32_CPUID_UCV2. If you're introducing new uses of UC32_CPUID_UCV2 elsewhere (e.g., for register behavior) then that is a design fault and needs to be fixed. Compare the copro series for target-arm, which gets rid of the CPUID-based switches there. Andreas --=20 SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 N=C3=BCrnberg, Germany GF: Jeff Hawn, Jennifer Guild, Felix Imend=C3=B6rffer; HRB 16746 AG N=C3=BC= rnberg