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 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 304B2F30271 for ; Sun, 15 Mar 2026 15:14:53 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1w1nB2-0003SY-Ba; Sun, 15 Mar 2026 11:14:48 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1w1nAz-0003S9-DR for qemu-arm@nongnu.org; Sun, 15 Mar 2026 11:14:45 -0400 Received: from out-179.mta0.migadu.com ([2001:41d0:1004:224b::b3]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1w1nAw-0002b3-P9 for qemu-arm@nongnu.org; Sun, 15 Mar 2026 11:14:45 -0400 Message-ID: DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1773587670; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=H/k0GPNFOX4+5q78bq+x3cMF5fIp0tLc6Mz6a3IPfJE=; b=ZgRmwAnIruydIJCQMlqEWT8chSA9LWp4+gX8GNClJQzoG+N7dYTO4T/GM+a+0EXfiNqyPW NRtjH5x8GJW/cjjxC0enRpUvSiOiPyIZL+fRv46ehx8h8kmywr9Go6AirYhTSKb0B7k1tZ fVji9i03PfLkDMsVRMci/PUrvpEqKAk= Date: Sun, 15 Mar 2026 23:14:22 +0800 MIME-Version: 1.0 Subject: Re: [PATCH v4 08/84] target/arm: Skip AF and DB updates for AccessType_AT To: Richard Henderson Cc: qemu-devel@nongnu.org, qemu-arm@nongnu.org, Pierrick Bouvier References: <20250830054128.448363-1-richard.henderson@linaro.org> <20250830054128.448363-9-richard.henderson@linaro.org> Content-Language: en-US X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Zenghui Yu In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Migadu-Flow: FLOW_OUT Received-SPF: pass client-ip=2001:41d0:1004:224b::b3; envelope-from=zenghui.yu@linux.dev; helo=out-179.mta0.migadu.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-arm@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-arm-bounces+qemu-arm=archiver.kernel.org@nongnu.org Sender: qemu-arm-bounces+qemu-arm=archiver.kernel.org@nongnu.org Hi Richard, On 2/27/26 11:01 AM, Richard Henderson wrote: > On 2/27/26 04:12, Zenghui Yu wrote: > > > + /* > > > + * For AccessType_AT, DB is not updated (AArch64.SetDirtyFlag), > > > + * and it is IMPLEMENTATION DEFINED whether AF is updated > > > + * (AArch64.SetAccessFlag; qemu chooses to not update). > > > + */ > > > + if (likely(!ptw->in_at)) { > > > /* > > > * Access flag. > > > * If HA is enabled, prepare to update the descriptor below. > > > > | * Otherwise, pass the access fault on to software. > > | */ > > | if (!(descriptor & (1 << 10))) { > > | if (param.ha) { > > | new_descriptor |= 1 << 10; /* AF */ > > | } else { > > | fi->type = ARMFault_AccessFlag; > > | goto do_fault; > > > > This also skips the access flag fault which could be generated by an AT > > instruction. Is this an expected change? > > Yes. As mentioned right there in the comment, the access flag fault is > IMPLEMENTATION DEFINED. The comment says that "it is IMPLEMENTATION DEFINED whether AF is updated" which matches R_XQSMX. I'm fine with it. I was concerning about whether an access flag fault should be generated by the AT instruction, if !param.ha. Could you please point out the description in the specification regarding "the access flag fault is IMPLEMENTATION DEFINED"? Thanks, Zenghui