From patchwork Thu Apr 3 15:18:21 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 877931 Delivered-To: patch@linaro.org Received: by 2002:a5d:6dae:0:b0:38f:210b:807b with SMTP id u14csp3321808wrs; Thu, 3 Apr 2025 08:22:42 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUyTAcAB0wbRTiAXYJAx+8lDrQyqZYx2/q9W7GfEZG/k5HKShyZE4NMbp3JCGzsPBkuTCGoBw==@linaro.org X-Google-Smtp-Source: AGHT+IFuASF3gRE+D3Nn37cweV5q11Of1+81JDWIkYStJeL/IY9cDUZhmNcSM4PYTz5ZvSSVt4b/ X-Received: by 2002:a05:620a:d93:b0:7c5:4b6a:d862 with SMTP id af79cd13be357-7c76f2b15admr240179185a.33.1743693762107; Thu, 03 Apr 2025 08:22:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1743693762; cv=none; d=google.com; s=arc-20240605; b=hgV4jPnFluSX2WYVUmm7mOhT0c1j0jPSFa1R8owOTWJa7hhNhf3l/ttwvJGY4H9kt0 wyfHAN+/VWDb9/xUHpuxJDPFKum1PaDfYvJ6b8GwvmXLLFPUBWjCtnlfTjU/Wg0piyes wT8KKkXwSWWsEi0v1CIibDCHVfbUUzMrQPKx8clXflnNh8USjy/IMKKTwEbxizyidyV7 7ZrGpy/p1KTtS5Ol9Ql6VqC606GxK1nrXDvyItPk76utG5FiTWpr/qYtThq6PFDDRNZz dWL4B0EP/HSrJYCh4YnDLRAyuCxwLS0racBkkoFa3yvxGaBVqSajfKSzyKvv84ap1Phw xhvg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=CGlb1wEFZdltIP7kYy/1AJxZQ0OAvinfht2Hxi3HH+0=; fh=uZabDrQmZm0L+6w9TkaKSHx4mVelHvsyKGr5umV4YlI=; b=ZnlvhTH2Zm9KAt+kxTIU9q5vi7YHNiOK9OrD7/b6L+TQZHGxKn7AwsYGHGg7dPx8kc 4Zgo1HzWhfqR8TZmazIs1u/z/kSL2jX0q9o/o4pkrHskfj+7ZuMpwdQLAfWOql15NfGJ evX6KPJ0VQYMimlcHq2RrpONgLfHNZg49hB55OIWX2rNcaufMqW3hXVeO9fBC0SLIvTE NwhYwF4fDjq0+bNfbFls+TCFDL1eOlFkgsAHGmgLCTJqrTrEdofshifzYh7Tpdgbyjrr oWZKG1vqrRZgjKEC0Fta6DGxh6VeyTk+nVMdkS6sDDzVVukKSngEeKaZ3gGDpRnIjdwu Uh4g==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=JkAeApmb; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id af79cd13be357-7c76ea8b8b5si131560585a.354.2025.04.03.08.22.41 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 03 Apr 2025 08:22:42 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=JkAeApmb; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1u0MMT-00009u-84; Thu, 03 Apr 2025 11:20:09 -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 1u0MLd-0007kb-24 for qemu-devel@nongnu.org; Thu, 03 Apr 2025 11:19:17 -0400 Received: from mail-wm1-x331.google.com ([2a00:1450:4864:20::331]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1u0MLb-0000V4-09 for qemu-devel@nongnu.org; Thu, 03 Apr 2025 11:19:16 -0400 Received: by mail-wm1-x331.google.com with SMTP id 5b1f17b1804b1-43cfebc343dso7239405e9.2 for ; Thu, 03 Apr 2025 08:19:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1743693552; x=1744298352; 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=CGlb1wEFZdltIP7kYy/1AJxZQ0OAvinfht2Hxi3HH+0=; b=JkAeApmbCeG3wXCjnuNjwMcmFlwDPCpwCvviPjfbzLH/y7aF34wHjgkRdQ9UwuAnS/ 41oQeItOTRfIDXiToj2CY32ycurcXa6YCPjjG08vmgF4OsPP93PTf89XWtsbY7GVH6Q3 tML6aVHP4o64lkmb1gps2P9Pk5zX5k2EGLGrKLKiQsou1lKGnTqdcK7cCJqQriYRDfPt gNyoUGe82pg2hC5Cio1vJDmB7LlYrPNWCtZmurop0OczQHMAn6QTh8mdRr9TlgwaB5iW +EGKXnnzSOLSKAAqVYt3ZjPA+O8mRgbMHIzo5avw2Mk3712ss4f0DpZgU5azn0io4ZsW ViqQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1743693552; x=1744298352; 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=CGlb1wEFZdltIP7kYy/1AJxZQ0OAvinfht2Hxi3HH+0=; b=tdYIt8w1WvYE7LrWDqeTgDCnYpjlaF9L4fXfdba0IyLTmk/vYumblD3S6T1WMvRwk7 O/SIj383P7PagsU//vPwlg4TFvroQ88lylWoUEqJr2mhaMhnEFI2rPBh3Xgjl0OS+oHM Q+3oXxxrs0PcCnxS6O+ZRZVQo202IIZtx1Mkg0rUYvLjIQiEm5D2D/zSn4fHZW2YrnGO 5oLxa3OaGTkpMYYEbp4UKg+yIKxZofJR1l5OQOovhtcupyfvdMjyQW6r7AqUjwb0pcjm d8yjM8ijFpkHyNgaRRWI3y5NpFkkfdST/+3df5qb45A07J1WWDt7yQf9LSz/yA+aRIaX y9yA== X-Gm-Message-State: AOJu0YzC6oyrhFn5adpf3lZ3C5DvpPM4MJK2wUWFWiA6xCIGYkVFNlT7 2HQayNZ2NWceil5W2wXFjhaiBzkrpS2fA/vMfGvPHShuhb94C2O8thEt27kjpmeG+MaofsDqZlF 5 X-Gm-Gg: ASbGncuqZCMr7LVmQ9CrrwsAOL20kl0Ggl79RAaYK7dPiOagSgwRyzBm0Y2Cj62zgnW Wnd8gEtb8CFRDi/ByzfYD6BCJXzrQdK/6ONyp7zLDi6lHEVftnjgyXFYA/unrvMSnR/28dn7SoE dSnc7LhNOp7tE9b3Q3n9nhXI7+voEa1Pr0LfK7nzMhhxVImlBrUBkezsij+YzdplHmQTtEnhcwq THlO0CDTCH9EH/tAriWZRNCE/c7639E4ZugSEL6IvRrDNZiFrPDd6sejJJpoiJW31a13yB668MG ILe7vnBAkgap0r1hDOkvCJMv2ziM2PnX13U614sBylkKPcMHdV9RwlfOXJFmFiJylfOqNX/lSpH sGxdIF4HcxIVLMVXwkAw= X-Received: by 2002:a05:600c:1f96:b0:43c:e8ba:e166 with SMTP id 5b1f17b1804b1-43ec44368bamr23023775e9.22.1743693552453; Thu, 03 Apr 2025 08:19:12 -0700 (PDT) Received: from localhost.localdomain (145.171.88.92.rev.sfr.net. [92.88.171.145]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-39c30226e9asm2092670f8f.94.2025.04.03.08.19.10 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 03 Apr 2025 08:19:11 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Thomas Huth , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Gustavo Romero , Peter Maydell , Laurent Vivier , Ani Sinha , Udo Steinberg , "Michael S. Tsirkin" , qemu-arm@nongnu.org, Paolo Bonzini , Igor Mammedov , Andrew Jones , =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= , Fabiano Rosas , =?utf-8?q?Alex_Benn=C3=A9e?= , Shannon Zhao Subject: [PATCH-for-10.0? v2 06/14] hw/arm/virt: Remove pointless VirtMachineState::tcg_its field Date: Thu, 3 Apr 2025 17:18:21 +0200 Message-ID: <20250403151829.44858-7-philmd@linaro.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20250403151829.44858-1-philmd@linaro.org> References: <20250403151829.44858-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::331; envelope-from=philmd@linaro.org; helo=mail-wm1-x331.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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org VirtMachineState::tcg_its has the same value of VirtMachineClass::no_tcg_its. Directly use the latter, removing the former. Signed-off-by: Philippe Mathieu-Daudé --- include/hw/arm/virt.h | 1 - hw/arm/virt.c | 13 +++++-------- 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/include/hw/arm/virt.h b/include/hw/arm/virt.h index c8e94e6aedc..17c160429ea 100644 --- a/include/hw/arm/virt.h +++ b/include/hw/arm/virt.h @@ -150,7 +150,6 @@ struct VirtMachineState { bool highmem_mmio; bool highmem_redists; bool its; - bool tcg_its; bool virt; bool ras; bool mte; diff --git a/hw/arm/virt.c b/hw/arm/virt.c index a96452f17a4..c0748cbb95a 100644 --- a/hw/arm/virt.c +++ b/hw/arm/virt.c @@ -710,11 +710,12 @@ static inline DeviceState *create_acpi_ged(VirtMachineState *vms) static void create_its(VirtMachineState *vms) { + VirtMachineClass *vmc = VIRT_MACHINE_GET_CLASS(vms); const char *itsclass = its_class_name(); DeviceState *dev; if (!strcmp(itsclass, "arm-gicv3-its")) { - if (!vms->tcg_its) { + if (!vmc->no_tcg_its) { itsclass = NULL; } } @@ -831,7 +832,9 @@ static void create_gic(VirtMachineState *vms, MemoryRegion *mem) redist_region_count); if (!kvm_irqchip_in_kernel()) { - if (vms->tcg_its) { + VirtMachineClass *vmc = VIRT_MACHINE_GET_CLASS(vms); + + if (vmc->no_tcg_its) { object_property_set_link(OBJECT(vms->gic), "sysmem", OBJECT(mem), &error_fatal); qdev_prop_set_bit(vms->gic, "has-lpi", true); @@ -3357,12 +3360,6 @@ static void virt_instance_init(Object *obj) } else { /* Default allows ITS instantiation */ vms->its = true; - - if (vmc->no_tcg_its) { - vms->tcg_its = false; - } else { - vms->tcg_its = true; - } } /* Default disallows iommu instantiation */