From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.3 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7CFC3C433E0 for ; Tue, 16 Mar 2021 08:20:34 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id CE2B364FEA for ; Tue, 16 Mar 2021 08:20:33 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org CE2B364FEA Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=kaod.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:38944 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lM4wK-00066L-Sz for qemu-devel@archiver.kernel.org; Tue, 16 Mar 2021 04:20:32 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:40488) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lM4tA-0000bE-IG for qemu-devel@nongnu.org; Tue, 16 Mar 2021 04:17:16 -0400 Received: from 9.mo51.mail-out.ovh.net ([46.105.48.137]:46162) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lM4t8-0001lC-Cg for qemu-devel@nongnu.org; Tue, 16 Mar 2021 04:17:16 -0400 Received: from mxplan5.mail.ovh.net (unknown [10.108.20.243]) by mo51.mail-out.ovh.net (Postfix) with ESMTPS id 7EF04273880; Tue, 16 Mar 2021 09:17:12 +0100 (CET) Received: from kaod.org (37.59.142.103) by DAG4EX1.mxp5.local (172.16.2.31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2106.2; Tue, 16 Mar 2021 09:17:11 +0100 Authentication-Results: garm.ovh; auth=pass (GARM-103G0057a2b3262-2089-425f-85ca-c50f8100f625, F4745E3E32A08DF6AE8813652EB4480BB0CFD8A0) smtp.auth=clg@kaod.org X-OVh-ClientIp: 82.64.250.170 Subject: Re: [PATCH v4 08/17] target/ppc: Reduce env->hflags to uint32_t To: Richard Henderson , References: <20210315184615.1985590-1-richard.henderson@linaro.org> <20210315184615.1985590-9-richard.henderson@linaro.org> From: =?UTF-8?Q?C=c3=a9dric_Le_Goater?= Message-ID: Date: Tue, 16 Mar 2021 09:17:11 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.6.0 MIME-Version: 1.0 In-Reply-To: <20210315184615.1985590-9-richard.henderson@linaro.org> Content-Type: text/plain; charset="utf-8" Content-Language: en-US Content-Transfer-Encoding: 8bit X-Originating-IP: [37.59.142.103] X-ClientProxiedBy: DAG7EX2.mxp5.local (172.16.2.62) To DAG4EX1.mxp5.local (172.16.2.31) X-Ovh-Tracer-GUID: ca819412-3e65-4f91-983f-c6b0488331ce X-Ovh-Tracer-Id: 7604327970820754400 X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: -100 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgeduledrudefuddguddukecutefuodetggdotefrodftvfcurfhrohhfihhlvgemucfqggfjpdevjffgvefmvefgnecuuegrihhlohhuthemucehtddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefuvfhfhffkffgfgggjtgfgihesthekredttdefjeenucfhrhhomhepveorughrihgtpgfnvggpifhorghtvghruceotghlgheskhgrohgurdhorhhgqeenucggtffrrghtthgvrhhnpeejkeduueduveelgeduueegkeelffevledujeetffeivdelvdfgkeeufeduheehfeenucfkpheptddrtddrtddrtddpfeejrdehledrudegvddruddtfeenucevlhhushhtvghrufhiiigvpedunecurfgrrhgrmhepmhhouggvpehsmhhtphdqohhuthdphhgvlhhopehmgihplhgrnhehrdhmrghilhdrohhvhhdrnhgvthdpihhnvghtpedtrddtrddtrddtpdhmrghilhhfrhhomheptghlgheskhgrohgurdhorhhgpdhrtghpthhtoheprhhitghhrghrugdrhhgvnhguvghrshhonheslhhinhgrrhhordhorhhg Received-SPF: pass client-ip=46.105.48.137; envelope-from=clg@kaod.org; helo=9.mo51.mail-out.ovh.net X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, NICE_REPLY_A=-0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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: qemu-ppc@nongnu.org, david@gibson.dropbear.id.au Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" On 3/15/21 7:46 PM, Richard Henderson wrote: > It will be stored in tb->flags, which is also uint32_t, > so let's use the correct size. > > Signed-off-by: Richard Henderson Reviewed-by: Cédric Le Goater Thanks, C. > --- > target/ppc/cpu.h | 4 ++-- > target/ppc/misc_helper.c | 2 +- > target/ppc/translate.c | 2 +- > 3 files changed, 4 insertions(+), 4 deletions(-) > > diff --git a/target/ppc/cpu.h b/target/ppc/cpu.h > index 39f35b570c..2abaf56869 100644 > --- a/target/ppc/cpu.h > +++ b/target/ppc/cpu.h > @@ -1128,8 +1128,8 @@ struct CPUPPCState { > bool resume_as_sreset; > #endif > > - /* These resources are used only in QEMU core */ > - target_ulong hflags; > + /* These resources are used only in TCG */ > + uint32_t hflags; > target_ulong hflags_compat_nmsr; /* for migration compatibility */ > int immu_idx; /* precomputed MMU index to speed up insn accesses */ > int dmmu_idx; /* precomputed MMU index to speed up data accesses */ > diff --git a/target/ppc/misc_helper.c b/target/ppc/misc_helper.c > index 63e3147eb4..b04b4d7c6e 100644 > --- a/target/ppc/misc_helper.c > +++ b/target/ppc/misc_helper.c > @@ -199,7 +199,7 @@ void helper_store_hid0_601(CPUPPCState *env, target_ulong val) > if ((val ^ hid0) & 0x00000008) { > /* Change current endianness */ > hreg_compute_hflags(env); > - qemu_log("%s: set endianness to %c => " TARGET_FMT_lx "\n", __func__, > + qemu_log("%s: set endianness to %c => %08x\n", __func__, > val & 0x8 ? 'l' : 'b', env->hflags); > } > } > diff --git a/target/ppc/translate.c b/target/ppc/translate.c > index a9325a12e5..a85b890bb0 100644 > --- a/target/ppc/translate.c > +++ b/target/ppc/translate.c > @@ -7657,7 +7657,7 @@ void ppc_cpu_dump_state(CPUState *cs, FILE *f, int flags) > env->nip, env->lr, env->ctr, cpu_read_xer(env), > cs->cpu_index); > qemu_fprintf(f, "MSR " TARGET_FMT_lx " HID0 " TARGET_FMT_lx " HF " > - TARGET_FMT_lx " iidx %d didx %d\n", > + "%08x iidx %d didx %d\n", > env->msr, env->spr[SPR_HID0], > env->hflags, env->immu_idx, env->dmmu_idx); > #if !defined(NO_TIMER_DUMP) >