Received: from eggs.gnu.org ([2001:4830:134:3::10]:52382) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VN4BS-0004bK-Fg for qemu-devel@nongnu.org; Fri, 20 Sep 2013 13:08:02 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VN4BJ-0003E7-KL for qemu-devel@nongnu.org; Fri, 20 Sep 2013 13:07:58 -0400 From: Michael Tokarev Date: Fri, 20 Sep 2013 20:58:11 +0400 Message-Id: <1379696296-32105-13-git-send-email-mjt@msgid.tls.msk.ru> In-Reply-To: <1379696296-32105-1-git-send-email-mjt@msgid.tls.msk.ru> References: <1379696296-32105-1-git-send-email-mjt@msgid.tls.msk.ru> Subject: [Qemu-devel] [PULL 12/17] target-i386: Fix segment cache dump List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: aliguori@us.ibm.com Cc: Tobias Markus , qemu-trivial@nongnu.org, Michael Tokarev , qemu-devel@nongnu.org From: Tobias Markus 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 Reviewed-by: Richard Henderson Signed-off-by: Michael Tokarev --- 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 8bf85ec..35f09d2 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' : '-'); } -- 1.7.10.4