From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Cs6op-0005q7-Q0 for qemu-devel@nongnu.org; Fri, 21 Jan 2005 16:59:52 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Cs6oc-0005hf-KB for qemu-devel@nongnu.org; Fri, 21 Jan 2005 16:59:38 -0500 Received: from [129.104.30.34] (helo=mx1.polytechnique.org) by monty-python.gnu.org with esmtp (Exim 4.34) id 1Cs6ZX-00033L-6P for qemu-devel@nongnu.org; Fri, 21 Jan 2005 16:44:03 -0500 Received: from localhost (localhost [127.0.0.1]) by djali.polytechnique.org (Postfix) with ESMTP id 916D3331AC for ; Fri, 21 Jan 2005 22:44:01 +0100 (CET) Received: from djali.polytechnique.org ([127.0.0.1]) by localhost (localhost [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 21626-02 for ; Fri, 21 Jan 2005 22:44:01 +0100 (CET) Received: from [84.99.204.178] (unknown [84.99.204.178]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by ssl.polytechnique.org (Postfix) with ESMTP id 5D15A33198 for ; Fri, 21 Jan 2005 22:44:01 +0100 (CET) Message-ID: <41F177D2.6040809@bellard.org> Date: Fri, 21 Jan 2005 22:44:50 +0100 From: Fabrice Bellard MIME-Version: 1.0 Subject: Re: [Qemu-devel] [PATCH] minor x86-64 corrections References: <41F1670C.2060805@volny.cz> In-Reply-To: <41F1670C.2060805@volny.cz> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: quoted-printable Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Filip Navara wrote: > Changelog: >=20 > 2005-01-21 Filip Navara >=20 > * Add support for CR8 register. > * Don't throw exception when assigning zero to SS register > in 64-bit mode. >=20 > BTW, the callgate support for x86-64 in long mode is broken. See "AMD64= =20 > Architecture Programmer=92s Manual Volume 3: General-Purpose and System= =20 > Instructions", page 90. Anybody cares to fix it? No time yet. It would be interesting to find the problem for the Linux=20 user code too. > --- target-i386/helper.c 16 Jan 2005 23:35:43 -0000 1.40 > +++ target-i386/helper.c 21 Jan 2005 20:13:30 -0000 > @@ -1454,8 +1454,13 @@ > selector &=3D 0xffff; > if ((selector & 0xfffc) =3D=3D 0) { > /* null selector case */ > - if (seg_reg =3D=3D R_SS) > + if (seg_reg =3D=3D R_SS) { > +#ifdef TARGET_X86_64 > + if (env->hflags & HF_CS64_MASK) > + return; > +#endif > raise_exception_err(EXCP0D_GPF, 0); > + } > cpu_x86_load_seg_cache(env, seg_reg, selector, 0, 0, 0); Maybe the SS segment cache should be set to zero ? > +void OPPROTO op_movtl_T0_cr7(void) > +{ > + T0 =3D (cpu_get_apic_tpr(env) & 0xf) >> 4; > +} Why do you call it cr7 ? Fabrice.