From patchwork Mon Jun 23 13:57:41 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Gustavo Romero X-Patchwork-Id: 899233 Delivered-To: patch@linaro.org Received: by 2002:adf:e506:0:b0:3a6:d909:26ce with SMTP id j6csp876725wrm; Mon, 23 Jun 2025 06:59:29 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXcCRPtdX05ut437LuKjcmrX5AS5RC5Pzu1wlZwo6hUwBweliM/fM20ohoTPgUgd3b8UdJKuQ==@linaro.org X-Google-Smtp-Source: AGHT+IHk8yLbcgmQbuJ0QhgDNiLaiw+Yx3ffv6MRvDIpXsMD/QlLrK15t/GGnopvLHr/2vPhyc6I X-Received: by 2002:a05:6214:2463:b0:6fb:1fc:788e with SMTP id 6a1803df08f44-6fd0a466343mr204972226d6.2.1750687169288; Mon, 23 Jun 2025 06:59:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1750687169; cv=none; d=google.com; s=arc-20240605; b=ZkNnPW5sUsLcc67jOnC1BQrW2M3YiGJOwaiei/+ZA0qvJV+9VHqODQYllorvBSNIwo D2q12+4MbqDI+wgmwntWjpXQZemxsXnzCMpY0iHusE7x9WlAmuKyFkRsGyvm+5romubL S0VvsxJqFfYcpZ9VEBhkrczHF5N9VUIcIKI+T0953N6BhTO3HBlxneH+4B0BtgnC3rud 4bAklLe8hnOJRMwPq9vOJXftvbJZIgk6t+1yWYC8mwxSccsWFaIhPObWsJmCbac5BqlM 9b4RapxiCyTD+IXtvkzmkylOyN1I1E13RqPnNsbQ+u/Ne3Q+9uOx4rqfvu0k/y3GpK66 CK2w== 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=uTp8cYLG6UEglvnDlfAVLBZ5UreW7WM/U27Ywrb2bxw=; fh=gBA6fEXtdb3XVPjRZi+eS/Skhuw1723rp+P4Dm3nyzw=; b=Sy71pNZucB2OrV4naiq9M7BnTLH46iC46VOangKAiqtAvXYdt/BFObi+bS/tht14eM vhaktXs8VM/kLD6EJZbzVZTAJruENP0cnrozBbzH6KJ6p/dWEOWK2pd4LgaQ40E7eLTk PKfATxZISYg9NwkNWlTtJnRu26QyQ1YEpY+e6T3TOAlSZ3VtL8XVuNke37l81Y2ncKeV l5UlMiDywvowt2EwV/cVoWPYy+e826k5FcaSazSA7S7a9324xMjZ3sFBv/Su+Tz4Pn14 EzduCL9f7tD1WwsIPQQnUFHBefzeslZvwMhiu1NaNOdrqtW2rj3lJ6aydEH9h4IfUIgi QlOg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=T4rJAkXW; 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-7d3f99a022dsi798581685a.7.2025.06.23.06.59.29 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 23 Jun 2025 06:59:29 -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=T4rJAkXW; 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 1uThgt-0008D7-JA; Mon, 23 Jun 2025 09:58:31 -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 1uThgs-0008CE-Cg for qemu-devel@nongnu.org; Mon, 23 Jun 2025 09:58:30 -0400 Received: from mail-pf1-x431.google.com ([2607:f8b0:4864:20::431]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1uThgq-0007G2-A3 for qemu-devel@nongnu.org; Mon, 23 Jun 2025 09:58:30 -0400 Received: by mail-pf1-x431.google.com with SMTP id d2e1a72fcca58-748f54dfa5fso2896069b3a.2 for ; Mon, 23 Jun 2025 06:58:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1750687106; x=1751291906; 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=uTp8cYLG6UEglvnDlfAVLBZ5UreW7WM/U27Ywrb2bxw=; b=T4rJAkXWaERde7dS1Nge27V2+ssLediK5CJ+cljANpmCC12vRoQCnYe29OEIRuzZRR 8lo5Sd92bmGugiWEGnypCsBW/w0iu6kd766srsKstGGLX1pjNLcrVa1s5tygqoQdCARZ u9M1J3DYorM4ktA1PPQqyPjSeafCh2OQViOJ3fQcwYrFZMxPXeJLJhTA2tWZv72EVDWd fsIxUuM2l/k/3+swIarOEXqqEqWvqj0Ov+gxM120i0NX9Cw2br18Ln9LhyLXVkAZUC/y lMRbw60rpvFlQ9NkL9LNuEMX+ePAHljQwFs07dFB0SYtC7/HSv5LkomV+E8G8ji/ts28 6TZg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1750687106; x=1751291906; 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=uTp8cYLG6UEglvnDlfAVLBZ5UreW7WM/U27Ywrb2bxw=; b=AbitbULWfaLrH012lkThIZFxHATpFWoUf1WAM4aifAqaJudqjADsmE6jSBl3VTkdbg 04OQI/H9abLbXQ8VM1ueUmHkDRxr+kgAKjjq1jzyHCYE6jmT7Rdqd058GILFvt6b6xOe EekNkaLCUTrcyUyl47kfRsmTSEiGKvlsifom7tTD0jGgW3Orl0VKfYuWtXj+GSs3+MZu xfTQpMzPnwkuBBw2Pha2M0x9SaWUG9zPrP3sGwat4amDIMmZ7M9UGPoyr0kEx8fnJ6H+ sr7i0UEcTPPV3xhp+GUKnUtFSQfZ5PpIIxZ+R9/Qz9dKPzoflSgxwP/rfhSk0boGYBQj E/7w== X-Gm-Message-State: AOJu0YwhsOpI3aNcJJaDqFPDTfLfuqXKvaI+TuSk7OBYD12ie0hDfVR3 2Oysvv/4iiDMgEompNfYpZ+ZPm4GiQ/NFiyZtJCSUraeCR6owG6kalwedleXoE2ANU4r3tg4/R3 hOVuq X-Gm-Gg: ASbGncuS298SIa5lasUYRDK/pR1ddFyuI9NiVtWDvcLzDU6fnlzHRjLEadbrLVosIXr Ny3XoJsl8ukIVWFWAPzUwKqq8GV2v6LEVfBV9ELA8zhr5SwBDkFMYGWmxuk5SOVmztV2bW4rcfI 8x0ZkNJ3wEupdL3aSPEMdUmErS6wIbgWA0MK12lwkubAUVPu2O4b7KvGUvBSoMq9hfwf818+FUu 85iHE6TE1MLMNHx4jAYPDJ/apJLOt3+W1sv+4r2giwmzyW19qh1mzorp3bQhmnb4KO8Rfu00jHK 3zezqJPare4AzkzAQ7t/qb6RRhyYvlLJzEeyURSJy8dNcNXAwUJgtCAzVYrkLxoz59Q= X-Received: by 2002:a05:6a20:7d9f:b0:220:1215:fea7 with SMTP id adf61e73a8af0-22026c19994mr19958025637.9.1750687106268; Mon, 23 Jun 2025 06:58:26 -0700 (PDT) Received: from gromero0.. ([186.215.58.88]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-b31f119eb64sm8063490a12.31.2025.06.23.06.58.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 23 Jun 2025 06:58:25 -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, Richard Henderson Subject: [PATCH v5 1/9] hw/intc/gicv3_its: Do not check its_class_name() Date: Mon, 23 Jun 2025 13:57:41 +0000 Message-Id: <20250623135749.691137-2-gustavo.romero@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20250623135749.691137-1-gustavo.romero@linaro.org> References: <20250623135749.691137-1-gustavo.romero@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::431; envelope-from=gustavo.romero@linaro.org; helo=mail-pf1-x431.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 From: Philippe Mathieu-Daudé Since commit cc5e719e2c8 ("kvm: require KVM_CAP_SIGNAL_MSI"), the single implementation of its_class_name() no longer returns NULL (it now always returns a valid char pointer). Hence, update the prototype docstring and remove the tautological checks that use the its_class_name() returned value. Signed-off-by: Philippe Mathieu-Daudé Signed-off-by: Gustavo Romero Reviewed-by: Richard Henderson Reviewed-by: Eric Auger --- hw/arm/virt-acpi-build.c | 32 +++++++++++--------------- include/hw/intc/arm_gicv3_its_common.h | 2 +- 2 files changed, 15 insertions(+), 19 deletions(-) diff --git a/hw/arm/virt-acpi-build.c b/hw/arm/virt-acpi-build.c index 7e8e0f0298..9eee284c80 100644 --- a/hw/arm/virt-acpi-build.c +++ b/hw/arm/virt-acpi-build.c @@ -737,20 +737,18 @@ build_madt(GArray *table_data, BIOSLinker *linker, VirtMachineState *vms) memmap[VIRT_HIGH_GIC_REDIST2].size); } - if (its_class_name()) { - /* - * ACPI spec, Revision 6.0 Errata A - * (original 6.0 definition has invalid Length) - * 5.2.12.18 GIC ITS Structure - */ - build_append_int_noprefix(table_data, 0xF, 1); /* Type */ - build_append_int_noprefix(table_data, 20, 1); /* Length */ - build_append_int_noprefix(table_data, 0, 2); /* Reserved */ - build_append_int_noprefix(table_data, 0, 4); /* GIC ITS ID */ - /* Physical Base Address */ - build_append_int_noprefix(table_data, memmap[VIRT_GIC_ITS].base, 8); - build_append_int_noprefix(table_data, 0, 4); /* Reserved */ - } + /* + * ACPI spec, Revision 6.0 Errata A + * (original 6.0 definition has invalid Length) + * 5.2.12.18 GIC ITS Structure + */ + build_append_int_noprefix(table_data, 0xF, 1); /* Type */ + build_append_int_noprefix(table_data, 20, 1); /* Length */ + build_append_int_noprefix(table_data, 0, 2); /* Reserved */ + build_append_int_noprefix(table_data, 0, 4); /* GIC ITS ID */ + /* Physical Base Address */ + build_append_int_noprefix(table_data, memmap[VIRT_GIC_ITS].base, 8); + build_append_int_noprefix(table_data, 0, 4); /* Reserved */ } else { const uint16_t spi_base = vms->irqmap[VIRT_GIC_V2M] + ARM_SPI_BASE; @@ -969,10 +967,8 @@ void virt_acpi_build(VirtMachineState *vms, AcpiBuildTables *tables) vms->oem_table_id); } - if (its_class_name()) { - acpi_add_table(table_offsets, tables_blob); - build_iort(tables_blob, tables->linker, vms); - } + acpi_add_table(table_offsets, tables_blob); + build_iort(tables_blob, tables->linker, vms); #ifdef CONFIG_TPM if (tpm_get_version(tpm_find()) == TPM_VERSION_2_0) { diff --git a/include/hw/intc/arm_gicv3_its_common.h b/include/hw/intc/arm_gicv3_its_common.h index 7dc712b38d..3c7b543b01 100644 --- a/include/hw/intc/arm_gicv3_its_common.h +++ b/include/hw/intc/arm_gicv3_its_common.h @@ -128,7 +128,7 @@ struct GICv3ITSCommonClass { * Return the ITS class name to use depending on whether KVM acceleration * and KVM CAP_SIGNAL_MSI are supported * - * Returns: class name to use or NULL + * Returns: class name to use */ const char *its_class_name(void);