From nobody Sun May 5 11:48:38 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linux.ibm.com ARC-Seal: i=1; a=rsa-sha256; t=1576773630; cv=none; d=zohomail.com; s=zohoarc; b=ixGEwAEKbtJXz/0YsI6EiY/tNkHo8jCeAjjIA6CGzX8tDZkzcYbkhIAw5negwplcgjxXrOUGDffLgBQmTNlVJoLEspd7wdZehCZwv1gP3UKLYDfkQFvSkY03dR3kXuiuzXG2E4jK2dZElN3sWelD3mKzUXbCVa0Tyx0cYKKxOUg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1576773630; h=Content-Transfer-Encoding:Cc:Date:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To; bh=d9Py2fVhr0vd1yiORDKZBGjXRq+IMfi2o4fUzIgKM58=; b=k81E1iwQufUrUaPfUQcfdK3+Sg9stvN89QED29EQ/fjll582/X5jnAV3aOml3iJn0diEwrP4fxqdX3nvgVeBl9vVyn3aK/LppotUfXlltj1abWoPHaiZ1XYLbstxSsWtv8lxm5IohwSGKDaYDU3e9Qgw12atAaTtlj5t6IiCh7E= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1576773630319990.1586768353476; Thu, 19 Dec 2019 08:40:30 -0800 (PST) Received: from localhost ([::1]:44378 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ihyqi-0000VF-EV for importer@patchew.org; Thu, 19 Dec 2019 11:40:28 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:56374) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ihypt-0008P8-RU for qemu-devel@nongnu.org; Thu, 19 Dec 2019 11:39:38 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ihyps-0007Ms-Pg for qemu-devel@nongnu.org; Thu, 19 Dec 2019 11:39:37 -0500 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:40766 helo=mx0a-001b2d01.pphosted.com) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ihypq-00073D-34; Thu, 19 Dec 2019 11:39:34 -0500 Received: from pps.filterd (m0098413.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id xBJGD9YD041624; Thu, 19 Dec 2019 11:39:27 -0500 Received: from ppma02dal.us.ibm.com (a.bd.3ea9.ip4.static.sl-reverse.com [169.62.189.10]) by mx0b-001b2d01.pphosted.com with ESMTP id 2x07fqf0j7-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 19 Dec 2019 11:39:27 -0500 Received: from pps.filterd (ppma02dal.us.ibm.com [127.0.0.1]) by ppma02dal.us.ibm.com (8.16.0.27/8.16.0.27) with SMTP id xBJGUdmK015678; Thu, 19 Dec 2019 16:39:26 GMT Received: from b03cxnp08026.gho.boulder.ibm.com (b03cxnp08026.gho.boulder.ibm.com [9.17.130.18]) by ppma02dal.us.ibm.com with ESMTP id 2wvqc7bvvf-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 19 Dec 2019 16:39:26 +0000 Received: from b03ledav004.gho.boulder.ibm.com (b03ledav004.gho.boulder.ibm.com [9.17.130.235]) by b03cxnp08026.gho.boulder.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id xBJGdOtS60686754 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 19 Dec 2019 16:39:25 GMT Received: from b03ledav004.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id D490D7805E; Thu, 19 Dec 2019 16:39:24 +0000 (GMT) Received: from b03ledav004.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 8C2807805C; Thu, 19 Dec 2019 16:39:23 +0000 (GMT) Received: from maxibm.br.ibm.com (unknown [9.13.215.215]) by b03ledav004.gho.boulder.ibm.com (Postfix) with ESMTP; Thu, 19 Dec 2019 16:39:23 +0000 (GMT) From: "Maxiwell S. Garcia" To: qemu-ppc@nongnu.org Subject: [PATCH] target/ppc: fix memory dump endianness in QEMU monitor Date: Thu, 19 Dec 2019 13:38:54 -0300 Message-Id: <20191219163854.8945-1-maxiwell@linux.ibm.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-TM-AS-GCONF: 00 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.95,18.0.572 definitions=2019-12-19_04:2019-12-17,2019-12-19 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 malwarescore=0 spamscore=0 lowpriorityscore=0 bulkscore=0 mlxscore=0 adultscore=0 mlxlogscore=999 phishscore=0 priorityscore=1501 impostorscore=0 suspectscore=1 clxscore=1011 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-1910280000 definitions=main-1912190135 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [generic] [fuzzy] X-Received-From: 148.163.158.5 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: farosas@linux.ibm.com, qemu-devel@nongnu.org, "Maxiwell S. Garcia" , david@gibson.dropbear.id.au Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" The env->hflags is computed in ppc_cpu_reset(), using the MSR register as input. But at the point ppc_disas_set_info() is called the MSR_LE bit in env->hflags doesn't contain the same information that env->msr. Signed-off-by: Maxiwell S. Garcia Signed-off-by: Fabiano Rosas --- target/ppc/translate_init.inc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/ppc/translate_init.inc.c b/target/ppc/translate_init.in= c.c index d33d65dff7..a0b384da9e 100644 --- a/target/ppc/translate_init.inc.c +++ b/target/ppc/translate_init.inc.c @@ -10830,7 +10830,7 @@ static void ppc_disas_set_info(CPUState *cs, disass= emble_info *info) PowerPCCPU *cpu =3D POWERPC_CPU(cs); CPUPPCState *env =3D &cpu->env; =20 - if ((env->hflags >> MSR_LE) & 1) { + if (msr_le) { info->endian =3D BFD_ENDIAN_LITTLE; } info->mach =3D env->bfd_mach; --=20 2.20.1