From patchwork Thu Jan 16 14:59:36 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: 857878 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:cc8:b0:385:e875:8a9e with SMTP id dq8csp241564wrb; Thu, 16 Jan 2025 07:01:19 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCWsSI90gg87PYcs12fZZjF83XpRpmgaRBWlyhXVzTyoFwMjRRDoFjMKCwXPejzA5MF6aq1imQ==@linaro.org X-Google-Smtp-Source: AGHT+IECAewvCyEUINxctYgCgVx+t9rhOVTnm28aKmlRs+96Td3CjPy07rsseHPxJvnikoEG/TV7 X-Received: by 2002:a05:6102:509f:b0:4b2:bc6b:c845 with SMTP id ada2fe7eead31-4b3d0d763b1mr26455394137.6.1737039679097; Thu, 16 Jan 2025 07:01:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1737039679; cv=none; d=google.com; s=arc-20240605; b=jR3yZKBjHAPdQxc+HFvhl1lwb2C9sSa0jGqY5L6/q4SkhviiAOBFnfX/puzWqrz1gR ykJgiHoEgPzfDYMSh5iMEdURWX7twsYG0EjSN0SxJDOo6FLpCqC/FrlWOG4jkAmBdnVq 8JQlIeq2afqQJraY/jAnIJTRzJy74T6E5l0AYrxefx5UESKX5ap/LagmMm94QpNidxLQ adA0lca+6k8AsN6hfaG/hK4OGi3Mh4oVR3FdP6CrsNc8INXhZo3WAoKDMKHgsmeO3LLm hIhHnahLI+KHYI0Gs3VOoormKs4R4JKGdOUfcPkxE8cKbJeJlGuT916R9X6yOVz8dZiz 0qFQ== 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=VLP6MHIeVotcuU3w8Dkkpq3gJTXXHTzTWILY4ffGEXM=; fh=Q5GNgeG4hwvXK8nWDxwLySQTPXZUr9FLVptSZ1H/5p4=; b=XRl2DIUeC1Aq56QwKZJwj7ludVjh4OtpfgCbNGtBk64+15TlzeFTZGQJ+QxfyfE0ON h3Y0eGh8mZHgUinxamDF5coNVdhpxK1GhKtfMnqCr/SvtPuUH61riEEo21vv+rm92zM4 dT0d73nrqE5m7+JYPHAyyO/5pbRaaD+iWebquADab6R20rMz0ofqNydirRhgoLNDW4LE PWcO2DqDiOyRS6EUSY5RIUvzWtBm5PGQuS3QV83wlFMQMzaB01k9IYWfye+3yroot9Gc LJR0FCYYBw86xEkYxxccPKOhTkr5yLg9a6VsOQ+Hsx4xOtaZyKRuIZMkrc9wPb29tx7N f8xA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=RXZEbZEJ; 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 ada2fe7eead31-4b68a2fa904si128750137.339.2025.01.16.07.01.18 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 16 Jan 2025 07:01:19 -0800 (PST) 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=RXZEbZEJ; 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 1tYRM7-00029q-Pi; Thu, 16 Jan 2025 10:00:24 -0500 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 1tYRLy-000253-Bv for qemu-devel@nongnu.org; Thu, 16 Jan 2025 10:00:15 -0500 Received: from mail-wm1-x329.google.com ([2a00:1450:4864:20::329]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tYRLw-00005l-QA for qemu-devel@nongnu.org; Thu, 16 Jan 2025 10:00:14 -0500 Received: by mail-wm1-x329.google.com with SMTP id 5b1f17b1804b1-43690d4605dso6798625e9.0 for ; Thu, 16 Jan 2025 07:00:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1737039611; x=1737644411; 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=VLP6MHIeVotcuU3w8Dkkpq3gJTXXHTzTWILY4ffGEXM=; b=RXZEbZEJ0bF1uCZh1deNL0hT2F/KcKZeMQlcOqvuppFaKMusP84z9q0FBBkx/9SQo+ b/7I77yY7JBNsFd4V6aC2bqU4bI7Dh46t40OdGVcPs0TnyB7uVWuw7BtzHNsZtw8vKuV vF8PwcTwhsQJuGRMTxJ21l0zHAhgWmUPwUzkavr2r7rk60cXzvhNWqmAN0MhZ6icYC8N uIae8ZjxF0xyWR9zTIJrzEGvXkXdGGjAFpisPR3bpd9Jtnk+MWoZFgcCB8QqPyKnSnVm Atkzq8XtH2AXZdk0sUqpf2JznSzQ9o4J58CSIDNPHXTC4rIvGYVSTDJwOJ/MICjSiAgq w8/A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1737039611; x=1737644411; 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=VLP6MHIeVotcuU3w8Dkkpq3gJTXXHTzTWILY4ffGEXM=; b=RXp0Use/WfhL+d0r/pq+r0tEX71dti6oTcv129A1hMbxNoOdAF20V2FKHC55Bsjac/ zFXb1EOioUudzc726YPwxpxx0TCiS6n+A9vbC1j6r+DFfiwxnXQ0NM9Xq8yndls3D5bW SVyMyHwNA+dQab88BHCBGg18kJdkwS4iMtGZYZu8MsW7M2srkQj50nRB2MbI/RkhOuJq +hbIiuRo1ZyA1gh5St2jDclm4K1NGhQL4ULuRv4luy5cvCLqdTLOPDro/GK+uA4fBF9/ aIIlz6WY7qtSbpZsxvH58co1UCxxbvoPCKzYQ42IqBbqAEHckE79v86feAto3Un2XeM9 yMMw== X-Gm-Message-State: AOJu0YzA1UoteRZUzt4HdxWhFYAQAZ0UUyOpYLU4BpNZUA0HmJU0abwD enj0B5mgE3K3bx3qNKhCs/fISEonvJWoIvmDgtgdwrF/fOtV/uP3sCAKFc/UuDCsA+bA+BlaEIK zAg0= X-Gm-Gg: ASbGncsNeEurWoSDWkLPhVgGe2oUUWTOHDII8US/ROKVqUjH4INkVt5uQgSRMLCkxmH FN84j4/rugTNnyomAtZhNsrObcAUco/w71Wyj6J8tE0e45zQ7PBGlLd3+BNFwU2hv4IUbMsQos3 PEl6KW7/ce1orBj99mBAIGOs3rZ+8A8qvP4PWyt2AGYNS7WoxQTszIpaYsm2OAG50/flGhOamUu XI/GLtwzuvgQ6SJ8bzCdQDJKV34WS1dFXTmnCVJKEr9qGu72QPODJ+kHQZsLt9MHDmaKVP4GmE2 89pPlE9RjAzbt8lweqvdijTSCYHcoQU= X-Received: by 2002:a05:600c:5115:b0:434:feb1:adae with SMTP id 5b1f17b1804b1-436e266e823mr293591825e9.3.1737039610951; Thu, 16 Jan 2025 07:00:10 -0800 (PST) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-38bf3282a63sm64775f8f.96.2025.01.16.07.00.10 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 16 Jan 2025 07:00:10 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Igor Mammedov , Andrew Jones , Thomas Huth , Shannon Zhao , "Michael S. Tsirkin" , Ani Sinha , qemu-arm@nongnu.org, Peter Maydell , =?utf-8?q?Ph?= =?utf-8?q?ilippe_Mathieu-Daud=C3=A9?= Subject: [PATCH-for-10.1 v2 05/13] hw/arm/virt: Remove VirtMachineClass::no_its field Date: Thu, 16 Jan 2025 15:59:36 +0100 Message-ID: <20250116145944.38028-6-philmd@linaro.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20250116145944.38028-1-philmd@linaro.org> References: <20250116145944.38028-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::329; envelope-from=philmd@linaro.org; helo=mail-wm1-x329.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 The VirtMachineClass::no_its field was only used by virt-2.7 machine, which got removed. Remove it and simplify virt_instance_init() and virt_acpi_build(). Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Thomas Huth Reviewed-by: Richard Henderson --- include/hw/arm/virt.h | 1 - hw/arm/virt-acpi-build.c | 5 ++--- hw/arm/virt.c | 16 ++++++---------- 3 files changed, 8 insertions(+), 14 deletions(-) diff --git a/include/hw/arm/virt.h b/include/hw/arm/virt.h index 5d3b25509ff..463ac09615e 100644 --- a/include/hw/arm/virt.h +++ b/include/hw/arm/virt.h @@ -117,7 +117,6 @@ typedef enum VirtGICType { struct VirtMachineClass { MachineClass parent; - bool no_its; bool no_tcg_its; bool claim_edge_triggered_timers; bool smbios_old_sys_ver; diff --git a/hw/arm/virt-acpi-build.c b/hw/arm/virt-acpi-build.c index c9b13057a34..ccecea9e09b 100644 --- a/hw/arm/virt-acpi-build.c +++ b/hw/arm/virt-acpi-build.c @@ -670,7 +670,6 @@ static void build_madt(GArray *table_data, BIOSLinker *linker, VirtMachineState *vms) { int i; - VirtMachineClass *vmc = VIRT_MACHINE_GET_CLASS(vms); const MemMapEntry *memmap = vms->memmap; AcpiTable table = { .sig = "APIC", .rev = 4, .oem_id = vms->oem_id, .oem_table_id = vms->oem_table_id }; @@ -741,7 +740,7 @@ build_madt(GArray *table_data, BIOSLinker *linker, VirtMachineState *vms) memmap[VIRT_HIGH_GIC_REDIST2].size); } - if (its_class_name() && !vmc->no_its) { + if (its_class_name()) { /* * ACPI spec, Revision 6.0 Errata A * (original 6.0 definition has invalid Length) @@ -974,7 +973,7 @@ void virt_acpi_build(VirtMachineState *vms, AcpiBuildTables *tables) vms->oem_table_id); } - if (its_class_name() && !vmc->no_its) { + if (its_class_name()) { acpi_add_table(table_offsets, tables_blob); build_iort(tables_blob, tables->linker, vms); } diff --git a/hw/arm/virt.c b/hw/arm/virt.c index eb27305dcd3..06530a5dbf8 100644 --- a/hw/arm/virt.c +++ b/hw/arm/virt.c @@ -3294,17 +3294,13 @@ static void virt_instance_init(Object *obj) vms->highmem_mmio = true; vms->highmem_redists = true; - if (vmc->no_its) { - vms->its = false; - } else { - /* Default allows ITS instantiation */ - vms->its = true; + /* Default allows ITS instantiation */ + vms->its = true; - if (vmc->no_tcg_its) { - vms->tcg_its = false; - } else { - vms->tcg_its = true; - } + if (vmc->no_tcg_its) { + vms->tcg_its = false; + } else { + vms->tcg_its = true; } /* Default disallows iommu instantiation */