From nobody Sat Nov 15 16:37:11 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; 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=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1750080081; cv=none; d=zohomail.com; s=zohoarc; b=bJZhZqwea9MoX0zZ+PhkO8S51EJ7jy/Ffmac2zrf+aiPFjSp4M71cEzT3CTpNk00TRV2K5MNx2tTEU9iobDUTSMaAVzJdOvy1nIvtwodw2NtwzHLpWrGBmsRvomOsU82AW6bLCUNbQg4Q6AjgsJKMWR0D561dfFyTWsyCli0fbA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1750080081; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=MYXF1EngE0eNzxoehIltsTJwDvypLa/shlFclH9Sekw=; b=P8MERzz76vk+gXPb5TMIbtPtdIpWkBZuL6TgJapjYEn+M/KTeTRcByyFFbAltuS7fHqC0rb4hGOcU8IA2u4+rtqNKtsdNzkT7vXru8TM01MJ9JRQ0s3Ael42dDRrwBl5AOXKL7hvKfxWdB72bnqcqA7CCbNDl5JuC3/ddsMaAq0= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; 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=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1750080080978466.06433129497566; Mon, 16 Jun 2025 06:21:20 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1uR9lW-00023k-9B; Mon, 16 Jun 2025 09:20:46 -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 1uR9l6-0001tU-Jo for qemu-devel@nongnu.org; Mon, 16 Jun 2025 09:20:24 -0400 Received: from mail-pl1-x631.google.com ([2607:f8b0:4864:20::631]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1uR9l3-0005Qa-QH for qemu-devel@nongnu.org; Mon, 16 Jun 2025 09:20:20 -0400 Received: by mail-pl1-x631.google.com with SMTP id d9443c01a7336-235d6de331fso53064815ad.3 for ; Mon, 16 Jun 2025 06:20:17 -0700 (PDT) Received: from gromero0.. ([186.215.60.20]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-2365de781dfsm60848405ad.131.2025.06.16.06.20.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 Jun 2025 06:20:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1750080016; x=1750684816; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=MYXF1EngE0eNzxoehIltsTJwDvypLa/shlFclH9Sekw=; b=m9Ob4OrGNIKMDruAP+s3GFoygnh78J77zcC7qsNNRd4sPlhZBX2zkOxOp16wKAivpe FnxKLbY1UVWFW/22BwL1LIt/LmMoIhBEt3ift2C03RMBBilhuabNyxFJdkDhWvX4+TC3 qvCnSRorTadx1EeTk3VSPNdFduUAjMarTRrJCufvSQKgrr0n9jGVDr1Xls54qO/oPUOk Iao1Rg1/JTHDer2OSurdWXI1RbA4cUQCt5w0t8Xpe5gTK7C40p7PiTTXwWfsBrQtbz+N bKaZj/MZs4dJr2gZly2IgLB5j/9IkgdYUG/IWpDoFq06Pb5izptf4L75Ik/7rqJjbgpX jGTw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1750080016; x=1750684816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=MYXF1EngE0eNzxoehIltsTJwDvypLa/shlFclH9Sekw=; b=aUB7OvRvqRB8sA0SOqe9CbDCU8I/mth90UyOh+Ncmgmu/j8F7W+zJTzwVe7oP2l51+ dGIdUf9nhxw1/Wi8G8wYbfuyYqohXo/FfZxEttOCyCnVRK2J2FjhwFxEtskfk1N+gvPG UcYAU3/vPhDISOs6vACEgZR6RklzFPhUESlGM1RxzbO2keIw+h1YVfZdY/uzpIhLWauO M6DO0gwojFMqc4ua1HLpQZzYAfci+EVcS4WPavCIid9x2t83k3QmaFeVxsmYBF7miYXv jYbC9UBOy8SBrdCrA8pu/Gnh3BAVXoxYK0XE990JDleOKuQfxcSof7fx9mRVCswQX+Ow 86WA== X-Gm-Message-State: AOJu0YwV9JSLOoFe3hHkNWEBKmkzOHZZTTs3lN6bDM8ZykwkaESg1zdF WAbUbOKvxdyL9045yPlJJTisi3GJv/r12m7q5QazvTvu7oiy+e9NCrV9B0tFKVFzsqLF+yHEVXM zFEJA X-Gm-Gg: ASbGnctxiI3EbZ3ouPNPnAzMZZrjg6lUDDbkICC84NtG7fY655waiJZFjB7CGOqG/k8 +/RKx7+Hxc9i6aO7anz+VpJG2te5F2gFxmirX867gYwnVKB/dUSCiwoG/BaRIS4+zi0vdyJZB2a jWZb4DHbDOFqaWsZHeefLt97MoTbS/WmxJASRc7eCExd7tyN6nybUguoOiNKZgbf//pFUuOGI6t OzpmNo4bgigDZgcokoAaOV09YZjn7107Bvwg5g0dsNMrDqu6dAZbb7wbiBPv9PoX5eJfU2wbQ+G dWlZ8NnjWYlwWKaUT0S6y6H16LhOmsvEVZxaHurT3nWqaqTgxdGDq1LilpJ7Jw+Z0nfFIIZC7w0 pvA== X-Google-Smtp-Source: AGHT+IHxKzenoPSwH0Xt0YtaqfffxhcuZ3fOVL2vu5Zs+h8MKNPgLXUU7QtEaOjNgbN1i299iWyNJQ== X-Received: by 2002:a17:903:320b:b0:234:f580:9ed with SMTP id d9443c01a7336-2366affb323mr146617775ad.21.1750080016002; Mon, 16 Jun 2025 06:20:16 -0700 (PDT) From: Gustavo Romero To: qemu-devel@nongnu.org, eric.auger@redhat.com, philmd@linaro.org, mst@redhat.com Cc: qemu-arm@nongnu.org, alex.bennee@linaro.org, gustavo.romero@linaro.org, udo@hypervisor.org, ajones@ventanamicro.com, peter.maydell@linaro.org, imammedo@redhat.com, anisinha@redhat.com Subject: [PATCH v4 2/8] hw/arm/virt: Simplify logic for setting instance's 'tcg_its' variable Date: Mon, 16 Jun 2025 13:18:18 +0000 Message-Id: <20250616131824.425315-3-gustavo.romero@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20250616131824.425315-1-gustavo.romero@linaro.org> References: <20250616131824.425315-1-gustavo.romero@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable 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; Received-SPF: pass client-ip=2607:f8b0:4864:20::631; envelope-from=gustavo.romero@linaro.org; helo=mail-pl1-x631.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=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@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-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1750080083633116600 Because 'tcg_its' in the machine instance is set based on the machine class=E2=80=99s negated variable 'no_tcg_its', 'tcg_its' is the opposite of 'no_tcg_its' and hence the code in question can be simplified as: tcg_its =3D !no_tcg_its. Signed-off-by: Gustavo Romero Reviewed-by: Eric Auger --- hw/arm/virt.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/hw/arm/virt.c b/hw/arm/virt.c index 9a6cd085a3..42a63a523e 100644 --- a/hw/arm/virt.c +++ b/hw/arm/virt.c @@ -3337,12 +3337,8 @@ static void virt_instance_init(Object *obj) =20 /* Default allows ITS instantiation */ vms->its =3D true; - - if (vmc->no_tcg_its) { - vms->tcg_its =3D false; - } else { - vms->tcg_its =3D true; - } + /* Allow ITS emulation if the machine version supports it. */ + vms->tcg_its =3D !vmc->no_tcg_its; =20 /* Default disallows iommu instantiation */ vms->iommu =3D VIRT_IOMMU_NONE; --=20 2.34.1