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=-8.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS 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 05A06C4338F for ; Mon, 23 Aug 2021 19:09:21 +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 8B3F26103C for ; Mon, 23 Aug 2021 19:09:20 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 8B3F26103C Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=nongnu.org Received: from localhost ([::1]:45212 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mIFJv-00039k-MK for qemu-devel@archiver.kernel.org; Mon, 23 Aug 2021 15:09:19 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:50532) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mIFJJ-0002Hv-5v for qemu-devel@nongnu.org; Mon, 23 Aug 2021 15:08:41 -0400 Received: from mail-ed1-x52c.google.com ([2a00:1450:4864:20::52c]:35665) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mIFJH-0004xp-MQ for qemu-devel@nongnu.org; Mon, 23 Aug 2021 15:08:40 -0400 Received: by mail-ed1-x52c.google.com with SMTP id q17so5888333edv.2 for ; Mon, 23 Aug 2021 12:08:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=J1TME3EzdCtiUqCg9EdHYhY8loGQM5BWIi5JacZCBBk=; b=OfbLWr4bujh7IDarkoqg0CUUpIBeyr1ECgxbfJMAWPKTOnvLNex9tfG8ZWNQWkOP3h lU571eIbk0i8uczIQwcvJ4+IVX4/FAlh8/s7k5+qK3LSzZMkkXAZnWneerqd+fR14/bw rv8yYO9eFnK/gxdZRY1ruXqbG2p9KeFaUyXDl5uVdbeJhkuCMv0fbmDdZKUHC8FbyWTh 29ak8/357AXkv37ybj+3gi199EaDdfB5s4jo+RlqilSwgA1CyZ7EORMBkAGbFGMeQK6s FchJjlUm07+/Psl7MNTqLEkB3qoWZD/w1c9f2aLIMOGOWsfPJySbsGoBZzEeCaeQt9cz kSHg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=J1TME3EzdCtiUqCg9EdHYhY8loGQM5BWIi5JacZCBBk=; b=CUU1mAsLxknO4J+SZ+XxRbHUiW1aLEdTcnT3kitB4/RxBJ9I1By03Pk7B490K2Qcz/ XUeUz1t6dyq54n92qh5wDEOUcvnnlba35y0ubDxjT+h/ZWGHtSslUxiNY/QXfMpKrrQR Iw8M+7NgnTC4SdKrLX0CU5LsKOR+hVniDFrxpvR/j5/T5bHgJE052V2mEjA1gXEBOadR nR40U6f8L3qAtJHxlud26KNNd/g2b2psEaFfJKSjnvJ8DYZvGykTigQZHiR8lG1wwqxc XFlTxljSO+h1psW7dzz6MZpoJxzemXFVbAoyGXk5CEuCAMF2TK+EB1ytRn6rta1ym5Oj FJsQ== X-Gm-Message-State: AOAM533g3Vrp/YvyX8EDQxuTX7CFhCytSKMRkQ72TnQDJGflwCfFjLJd TBJNd/lPM/r33HVqzR4+ilqyAFNfBVqEco/15ANghQ== X-Google-Smtp-Source: ABdhPJy38TjwH4YGTmPlP69LNaP0SP5jRgvgSZeZuYkygjjRS9shuv2MiaPYy7PtGtp/utTvMCdKsU2zgKYrk/UWRxs= X-Received: by 2002:a50:ff03:: with SMTP id a3mr38370162edu.100.1629745717818; Mon, 23 Aug 2021 12:08:37 -0700 (PDT) MIME-Version: 1.0 References: <20210823164157.751807-1-philmd@redhat.com> <20210823164157.751807-3-philmd@redhat.com> In-Reply-To: <20210823164157.751807-3-philmd@redhat.com> From: Peter Maydell Date: Mon, 23 Aug 2021 20:07:51 +0100 Message-ID: Subject: Re: [RFC PATCH v2 2/5] hw/intc/arm_gicv3: Check for !MEMTX_OK instead of MEMTX_ERROR To: =?UTF-8?Q?Philippe_Mathieu=2DDaud=C3=A9?= Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=2a00:1450:4864:20::52c; envelope-from=peter.maydell@linaro.org; helo=mail-ed1-x52c.google.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, 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: David Hildenbrand , Jason Wang , Li Qiang , QEMU Developers , Peter Xu , Qiuhao Li , Alexander Bulekov , qemu-arm , Gerd Hoffmann , Stefan Hajnoczi , Paolo Bonzini , "Edgar E . Iglesias" Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" On Mon, 23 Aug 2021 at 17:42, Philippe Mathieu-Daud=C3=A9 wrote: > > We are going to introduce more MemTxResult bits, so it is > safer to check for !MEMTX_OK rather than MEMTX_ERROR. > > Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Peter Maydell but note that these MEMTX_* aren't from the memory transaction API functions; they're just being used by gicd_readl() and friends as a way to indicate a success/failure so that the actual MemoryRegionOps read/write fns like gicv3_dist_read() can log a guest error. Arguably this is a bit of a misuse of the MEMTX_* constants and perhaps we should have gicd_readl etc return a bool instead. thanks -- PMM