Received: from eggs.gnu.org ([2001:4830:134:3::10]:45798) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VKU3a-00020B-Ac for qemu-devel@nongnu.org; Fri, 13 Sep 2013 10:09:15 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VKU3V-0001oc-GR for qemu-devel@nongnu.org; Fri, 13 Sep 2013 10:09:10 -0400 Message-ID: <52331BA9.4000906@markus-regensburg.de> Date: Fri, 13 Sep 2013 16:05:29 +0200 From: Tobias Markus MIME-Version: 1.0 References: <5219DA56.4090702@markus-regensburg.de> In-Reply-To: <5219DA56.4090702@markus-regensburg.de> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] PING Re: [PATCH v3] target-i386: Fix segment cache dump List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: qemu-trivial , =?ISO-8859-1?Q?Andreas_F=E4rbe?= =?ISO-8859-1?Q?r?= , Richard Henderson -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 08/25/2013 12:20 PM, Tobias Markus wrote: > When in Long Mode, cpu_x86_seg_cache() logs "DS16" because the > Default operation size bit (D/B bit) is not set for Long Mode Data > Segments since there are only Data Segments in Long Mode and no > explicit 16/32/64-bit Descriptors. This patch fixes this by > checking the Long Mode Active bit of the hidden flags variable and > logging "DS" if it is set. (I.e. in Long Mode all Data Segments are > logged as "DS") > > Signed-off-by: Tobias Markus --- v3: > * Manually Break Lines * Again change line wrapping as suggested by > Eric Blake v2: * Fix line wrapping as suggested in IRC * Break the > line Note that alternatively, Data Segments in Long Mode could be > logged as "DS64" to avoid confusion about the missing 64 postfix. > (But that would be, strictly speaking, wrong because there are only > DSs and no DS16/32/64 in Long Mode.) PS: This is my first > contribution to an Open Source Project and I would be very happy > about constructive feedback, especially about possible wrong line > wrapping. target-i386/helper.c | 4 +++- 1 file changed, 3 > insertions(+), 1 deletion(-) > > diff --git a/target-i386/helper.c b/target-i386/helper.c index > bf3e2ac..0edb93b 100644 --- a/target-i386/helper.c +++ > b/target-i386/helper.c @@ -147,7 +147,9 @@ > cpu_x86_dump_seg_cache(CPUX86State *env, FILE *f, fprintf_function > cpu_fprintf, cpu_fprintf(f, " [%c%c", (sc->flags & DESC_C_MASK) ? > 'C' : '-', (sc->flags & DESC_R_MASK) ? 'R' : '-'); } else { - > cpu_fprintf(f, (sc->flags & DESC_B_MASK) ? "DS " : "DS16"); + > cpu_fprintf(f, + (sc->flags & DESC_B_MASK || > env->hflags & HF_LMA_MASK) + ? "DS " : > "DS16"); cpu_fprintf(f, " [%c%c", (sc->flags & DESC_E_MASK) ? 'E' : > '-', (sc->flags & DESC_W_MASK) ? 'W' : '-'); } > -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.21 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iEYEARECAAYFAlIzG6kACgkQAO6N0EYmC9ZTGQCfXUfs8zrnlwOAtLqqbKW1F8Z/ PjEAoJGDaLQGzQ/qYEOEo0KpO4ZhE7kE =Lfdr -----END PGP SIGNATURE-----