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); From patchwork Mon Jun 23 13:57:42 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Gustavo Romero X-Patchwork-Id: 899231 Delivered-To: patch@linaro.org Received: by 2002:adf:e506:0:b0:3a6:d909:26ce with SMTP id j6csp876636wrm; Mon, 23 Jun 2025 06:59:15 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWyinv6+82/xaU08OFnpx5IdPhX4143r57L/Guq6IQjCXy8QoChAaJLQR5M2tp6r0WaE6nUOA==@linaro.org X-Google-Smtp-Source: AGHT+IHyGy848MyvrQA2Z+gITv9VvlcHnoEXLJVnqzTJtPWO3Eb1bPF4lsAA+osx3wirsyTANEII X-Received: by 2002:a05:6214:6219:b0:6fd:1b0f:8b93 with SMTP id 6a1803df08f44-6fd1b0f8ec2mr77363936d6.33.1750687155623; Mon, 23 Jun 2025 06:59:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1750687155; cv=none; d=google.com; s=arc-20240605; b=igS5P/FZm4UXuhEebtuH67Oe+NxCbTPlxlULOO0m8jqOJHE2CmU6Wvu4mXuactImy6 NIXCNKqwIyn1v5WQUGkIKAiP1OwG3bilSAU036UO3sbZwQP6KK8YI9jtt8VLiYdb2wkY Y6+egAbl5ZrbSL8gGBZjmRtxwVdkf52qMoq7bF7e/EogTniC+6FjD5CwcX21/UZ5hdWm Ub07USfTYBA9UsgxA9wYmABYefvziDwaw4Fa69QFv2WNH2Foqher0YearhpYdQSH15/Z LOjdOzL2Dc9IdX7zxS7QcDoj4VdY3ouharxZO1XIWS1T1CQNfSYQdGpJAyhUzG4kxpOX EJ6g== 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=Nlo8as5e/cpldlYDplp41yosw6ZzdGOstiWraYoHkls=; fh=NM4Ghk6du0xINoQVrcLOZNFqo57se3lAmHRoGLE2PMQ=; b=NQk99aJkJ+kjeYOG2WTuyf7ftd0b0OQYOUlBusQiWJHdGFciUsqvNMkE9FXtVTu+gm wWYCv9UkT2pT0PUjfUBGq8EAndUA/tUTUmIM17LNuGMn7PfRf2lxfikJoyhOjaTur4Co KlBKUF3RHb0oXIJa9+grqkxf1Nmz8Pt0baBCn2qniAQF+/fDxCc6sTX1xOlI+kz3lKZT m40c44gCKRyM5P2QczpJ63fz4QolSGM9iHsjEg7Wt8j3sAHxgVOcCvQ9nuTTlZTmBLHs FIAkApCa/AKccC/NPgY12CZ/YqLOCAIHQhdoMO78x1DgZ+hr2KZ4C1ts96ekvqXNjfME INtg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=oHRKiiEC; 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-7d3f99e4a0csi738188685a.181.2025.06.23.06.59.14 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 23 Jun 2025 06:59:15 -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=oHRKiiEC; 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 1uThgw-0008E2-PT; Mon, 23 Jun 2025 09:58:34 -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 1uThgv-0008DF-2r for qemu-devel@nongnu.org; Mon, 23 Jun 2025 09:58:33 -0400 Received: from mail-pf1-x42a.google.com ([2607:f8b0:4864:20::42a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1uThgt-0007Gn-Ia for qemu-devel@nongnu.org; Mon, 23 Jun 2025 09:58:32 -0400 Received: by mail-pf1-x42a.google.com with SMTP id d2e1a72fcca58-74264d1832eso5342673b3a.0 for ; Mon, 23 Jun 2025 06:58:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1750687110; x=1751291910; 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=Nlo8as5e/cpldlYDplp41yosw6ZzdGOstiWraYoHkls=; b=oHRKiiECvDy/vU8G3L3PgadJZcssOkVlPB3T8PRyvtC+CYcCv2ExkaXwJmT5XBLz5y o0xMIYjy1J/P4+RyM123QGUTzxXXOZyHpq0QKz7ePus01mw0YgHhonokjENr7lbigfEZ J8DlN5L16w3lk0bsWf+aTLenSiJ2Vi7f6Xtff0DqDp6cztOEW2pumZ+M0FiyiYM/Ho9w epSB1MxH7vPv5PvrbcgXCnIAbgFLh1DdNj27nEJnE2jYGU5Ybox/coGRNF+bmYcyUa2o FtOoW4KYUcjEAzNobujdA02PQrSY0MeUI2DGQe3PQkx2eQ3VcSDkWKOq5XFRUjo2Kc0P EC0g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1750687110; x=1751291910; 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=Nlo8as5e/cpldlYDplp41yosw6ZzdGOstiWraYoHkls=; b=ifNnFAIjRk0W7lEZldkoO7R16DUbhSoQt+bHLMp8HMhHtRCup+MrXKOxaFcpqKJ3ZZ hIHHuuznjsq2lMnA1pbzcyNl29O3P1y9RVsXKVXrxKGiIhZZRDs3dqWQoVLGuKrCD62S mC1xEkGl8U7Q3JqVxFTLDwHxCQMpCpuUYmR7bwf+wPauNL82VuSqcrXWFfvepfkCcyaK mlFl7QPqvawXDdwNltypEtuQcYIrPCvukyzkRom4Oq4hnYcyoacIyJPq0FIUD6ikEkSU WH8vU+y+daohc6wMGktID9TuquT38R73x/1H5c4CqZNYracFe4Hc5idyPxbLoTGDnjAS r1vQ== X-Gm-Message-State: AOJu0YysBwPNo2j2QynvGtpjfW+Hq0IOd9TyWWaiVdjVoix6GaNAIT/l zjACgJEqJKWqDnM0Xw1VJPQzI4rVhCXRoUQCz6ph8ZrpZZKeFkkhKRp2yZV+CV0L4fl46GrHyzM QiuFB X-Gm-Gg: ASbGncss3y1KICTbsMwCJFOlyMMgzXfyhBNCERjfFxoi8tQVAqzW2gtgDK8XX0QxSec rkFjkz8Q5OF5CJQXDN0MQ7OY8f9MjA6DGIsl582fHujn210IH0xgYxlxbHknLv4poAJw3wgo2gj blK4QY6HcwciS41mCa1VKBc1PKpot38V3lBYO0bW2ifpyYf5LkCYwyP1Gftxs2pHd86Be8edaTh zwVUs7ig9Ql7mLTdZo+9xxnPv9UIScyNbBSSJFKvooqlps0+RPvhGe9MxtIF4BoTS6iNcRaMF5C k+jM8VWYmCJ3SEXoufq1GFWG1TEJXd2dKd4fsQSqHULgwI/5lsBBMyJd9/AnUR9nP4l5rLdGMAu iZg== X-Received: by 2002:a05:6300:614:20b0:220:2a67:14a5 with SMTP id adf61e73a8af0-2202a671568mr16673077637.32.1750687109875; Mon, 23 Jun 2025 06:58:29 -0700 (PDT) Received: from gromero0.. ([186.215.58.88]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-b31f119eb64sm8063490a12.31.2025.06.23.06.58.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 23 Jun 2025 06:58:29 -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 v5 2/9] hw/arm/virt: Simplify logic for setting instance's 'tcg_its' variable Date: Mon, 23 Jun 2025 13:57:42 +0000 Message-Id: <20250623135749.691137-3-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::42a; envelope-from=gustavo.romero@linaro.org; helo=mail-pf1-x42a.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 Because 'tcg_its' in the machine instance is set based on the machine class’s 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 = !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..19f85d0abf 100644 --- a/hw/arm/virt.c +++ b/hw/arm/virt.c @@ -3337,12 +3337,8 @@ static void virt_instance_init(Object *obj) /* Default allows ITS instantiation */ vms->its = true; - - if (vmc->no_tcg_its) { - vms->tcg_its = false; - } else { - vms->tcg_its = true; - } + /* Allow ITS emulation if the machine version supports it */ + vms->tcg_its = !vmc->no_tcg_its; /* Default disallows iommu instantiation */ vms->iommu = VIRT_IOMMU_NONE; From patchwork Mon Jun 23 13:57:43 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Gustavo Romero X-Patchwork-Id: 899232 Delivered-To: patch@linaro.org Received: by 2002:adf:e506:0:b0:3a6:d909:26ce with SMTP id j6csp876721wrm; Mon, 23 Jun 2025 06:59:28 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCU0oV5/TsrRFRJRldseHhXU1rfmfulpVU3d1aNMBrXlqsgFu4LrPnkMG3dYcaqiW93tGBVS/Q==@linaro.org X-Google-Smtp-Source: AGHT+IGb4NSaRpxbj4d88iEfAJs4zXQoSP9hPoQFqwCakNJwURdX4V5BQGg++N68XV02BYW9AF3d X-Received: by 2002:a05:6214:21ef:b0:6e8:fbb7:675b with SMTP id 6a1803df08f44-6fd0a5bb050mr240907936d6.32.1750687168561; Mon, 23 Jun 2025 06:59:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1750687168; cv=none; d=google.com; s=arc-20240605; b=Vw4C5+P7TE+X4IkA3lR6feNGQjsg76oA00QFVK0AwAU44IC4ejfC5E9Ffpc+oSpAG3 QpIgPoTm05oj1jbGvS/OwKFjssY67cHu4lWtd2TArpQ21g8toSJEFPmIrLkjSZ1jOU0x cBZL/Xdo774WYEWlv84U/Dhg6TjsxrGDDcnRMMMPaZ0L4iBIltrlIw3RXvdxmt9RAbb7 aweOr4u6+17aLVgDGxdd4sxsmpCg5CAScsKaf7S2VT2vTPMGj6vT25W3d2SabmwqSWMR lfmiBkxEbN9i3qOyLME8ZjuqsSL6xQGRGp6tXDyTMhOgNZJbotymSJHuz9PgbkZwdZhu NKUQ== 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=+KCO4Ulw21w48TY/8gHQVa7B2eOfuj0N7B3tO1GbSlc=; fh=gBA6fEXtdb3XVPjRZi+eS/Skhuw1723rp+P4Dm3nyzw=; b=k1sgzEteXd+vFQr6iuvuKJi3pX26G95B6M+17XltLsskGS9YSAgGodZt/P+2IA6ctd NAdtd2qx6CtKZ5u9d9oECACCBAXHMrz3pNdG4w6gfbvzZnBzx6qW3n5KvLo6uEMc5Kvb DkKm6NihCmLlt3/jrz5YDY5Marwkg9yVtsimYRAwGdduQmWl2O25Vj2CfwhSXB3Y1eMK X9yuPstlQRc460Efzl0r4eRD4+7cN7/C0MpIXAmdAbOIk0tMIUr1W7ustfQJS1veW3Vu IY9ICKpebqJ4cJfxU6vS6V3ENavIxYRTUTQGUYxvN9d2xNS6pxLRDPV0ZJwY2b5IL1Gl L3Iw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=X0IjcMN2; 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 6a1803df08f44-6fd093dfee1si86151586d6.67.2025.06.23.06.59.28 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 23 Jun 2025 06:59:28 -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=X0IjcMN2; 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 1uThh1-0008EX-BO; Mon, 23 Jun 2025 09:58:39 -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 1uThgz-0008EF-3b for qemu-devel@nongnu.org; Mon, 23 Jun 2025 09:58:37 -0400 Received: from mail-pf1-x42f.google.com ([2607:f8b0:4864:20::42f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1uThgx-0007HC-Eg for qemu-devel@nongnu.org; Mon, 23 Jun 2025 09:58:36 -0400 Received: by mail-pf1-x42f.google.com with SMTP id d2e1a72fcca58-748feca4a61so2258174b3a.3 for ; Mon, 23 Jun 2025 06:58:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1750687114; x=1751291914; 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=+KCO4Ulw21w48TY/8gHQVa7B2eOfuj0N7B3tO1GbSlc=; b=X0IjcMN2Z1ZBLqjqcodnvT9efzMOCZNs0ilPaZVSXioepVnGRciAS4BY4pUW9f2TUx gQEJ7vOZFVGLPQHlRVtcVSYc99iH90EhA4Gt62sR00egfUVEjbD33tfkjf6Fe5iTL5R5 lyukawTQCYCPbOQCEAEBFmYM8xmuKtk9payAUf/Zbu6daZ6ysNO/m5412/lanYYg3eU0 LOBhQ5YuTPHsBkjiLf5nEqAlbITS1gjukstetFqme3IgMatzva+uejs6X1mus+13mB4n oMS79VR1IAMVA9ouEhzCKGRKCYGkXBb4qfT+PvosgRAulkFx0gR14jxhaG/WeazoijE8 NuPA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1750687114; x=1751291914; 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=+KCO4Ulw21w48TY/8gHQVa7B2eOfuj0N7B3tO1GbSlc=; b=JXJXWGBvJXn4+eING+3pnrbVnINE8IsOd/j9PpeRrYT67QKUMiWGMfey/jmfhFP/G9 PM7/q59GRrq51GCuFNTs33YzB9cxc1MhjqxoKgINNzQ3hAgbQIthO38sFsgSM9C9PTIy 8oejvRhqedWgKy0fA50m+Rf3+muSHz4Qexsbme2nEXseFauDJhVPVU2SmntA0fvOLdrj cbcr8Dfsbr5WIDYG0TBer0wvXtacvsxRJo8lGz/vn9PJEYxTok3Bneh8sH+scR+rE+bz CjpoM5xmLZCf4EXr8qfuA74NRfZlR1tZHnRRNGH3vix9WfSD2pc/QAG4t32m8qSDFMJO RAaQ== X-Gm-Message-State: AOJu0YzzraV6z7dUHfqWLmRHqB04Petd+Wmku4q/zUqLDUFpMhS2rVr6 iowmEPh6FVd4Pwus5qltpK71xNdXUldK2XnpXWsQFGvZSSzoL/2+jN+PWRUMcZYgwXHAURALp4c HcpcE X-Gm-Gg: ASbGncvWTF9BJPzEqZHL8XG+9TCLy+gOjUUEMUEa0GaIeRrrOSzu1rWEWp7uyCZzJ07 fuChxQvU7jlFz+6f3hQJUy2OCiNXEnZLJ0zQ9lwjwK0cZfIZtPJmZFdeCugVRfOPGbPAv85qdX8 /EUcRrKKFbG2JDlKKv2ur7o6HCbzQDSzhpJZ10M8FawLEwncsTIP5i6j+cJW+SFRBZ4hCOUgDB8 ZQ5C1X6VC9tM8bdy4BAm3TDfMhcRHq6uMEOnoV3WriCzFe70MbLjP0XHm62HPpUN/tD7klGzEfD ZgAIF7EwbAbKahYHCEDxRHvnobf5oKoTVDnxBNwhFlEdtBdiT4uHUeBwJWKW9vI5Qb4= X-Received: by 2002:a05:6a20:a108:b0:216:1476:f71 with SMTP id adf61e73a8af0-22026f13166mr19283222637.39.1750687113626; Mon, 23 Jun 2025 06:58:33 -0700 (PDT) Received: from gromero0.. ([186.215.58.88]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-b31f119eb64sm8063490a12.31.2025.06.23.06.58.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 23 Jun 2025 06:58:33 -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 3/9] hw/arm/virt: Simplify create_its() Date: Mon, 23 Jun 2025 13:57:43 +0000 Message-Id: <20250623135749.691137-4-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::42f; envelope-from=gustavo.romero@linaro.org; helo=mail-pf1-x42f.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.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é No need to strstr() check the class name when we can use kvm_irqchip_in_kernel() to check if the ITS from the host can be used. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Reviewed-by: Eric Auger Reviewed-by: Gustavo Romero --- hw/arm/virt.c | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/hw/arm/virt.c b/hw/arm/virt.c index 19f85d0abf..96a09c3eac 100644 --- a/hw/arm/virt.c +++ b/hw/arm/virt.c @@ -705,21 +705,18 @@ static inline DeviceState *create_acpi_ged(VirtMachineState *vms) static void create_its(VirtMachineState *vms) { - const char *itsclass = its_class_name(); DeviceState *dev; - if (!strcmp(itsclass, "arm-gicv3-its")) { - if (!vms->tcg_its) { - itsclass = NULL; - } - } - - if (!itsclass) { - /* Do nothing if not supported */ + assert(vms->its); + if (!kvm_irqchip_in_kernel() && !vms->tcg_its) { + /* + * Do nothing if ITS is neither supported by the host nor emulated by + * the machine. + */ return; } - dev = qdev_new(itsclass); + dev = qdev_new(its_class_name()); object_property_set_link(OBJECT(dev), "parent-gicv3", OBJECT(vms->gic), &error_abort); From patchwork Mon Jun 23 13:57:44 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gustavo Romero X-Patchwork-Id: 899236 Delivered-To: patch@linaro.org Received: by 2002:adf:e506:0:b0:3a6:d909:26ce with SMTP id j6csp877179wrm; Mon, 23 Jun 2025 07:00:21 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVS0x6sN9LQysV6Hhom8+RZEql9HMSqjtclj9Nf3fScMfbzvHLxMDVNLed53y1JqvQ858nyTw==@linaro.org X-Google-Smtp-Source: AGHT+IGMYdF4JEo6NTcEN2yGweT9kSMJbJHY4eEzt2AEdzy9HZmZ2Yqsxnz3uwAfZBc2fAHw3EWZ X-Received: by 2002:a05:622a:1b25:b0:4a4:40a5:f789 with SMTP id d75a77b69052e-4a77a1b4263mr166635331cf.9.1750687221022; Mon, 23 Jun 2025 07:00:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1750687221; cv=none; d=google.com; s=arc-20240605; b=jINPnuQMH2bvGw032Trcb+5+29K1h+m/HNv7WPQpCPMBdxbmIxKUwz5oQzSkycb8pP taaf2Hmn0eNOYtB6zqjs87+8Yhh/ikJw/tY744mEH7LKwb5PQum+pNhGG6cq3eXQDwWm AsSXrIybDg36zOPS/0vjer9acaUfuMngGHJ0netdUT5chg4pSxOtXOJI/ztOeLyQJUyZ xYR0vIYNJLkhm3vGDs2r4RHyMDfMsssdxVSKzZzknmLwMFAmnLa3ncFjqftDes1R0Lu/ 9UNJIOH1abn1kXJmfStOdx2aa1Lb8ez2ihmkCCXT97BCZ9ZoJI+lRuiuN86/SvMbDVWh 1duQ== 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=QHmEaaRegYwFGlGoVTGRYvzmrkIrypDwOG7loJLMkas=; fh=NM4Ghk6du0xINoQVrcLOZNFqo57se3lAmHRoGLE2PMQ=; b=W7dGPSTC9HPfmkifla0FEneS0uc0qYB7Y5AQa5q3pmoZ/FmYaf78WUmzz5iVuwR2DZ CjAOJVEgbz1Y2St4DX4aerM5QM9Vm3FQSL5J7g9JcULzVeCXZ/oBS0DxL7+UnfH+BhmJ obfaZxs7J4lnjFjqvrQqLVtIVzkIka5K7oDdqnFVJl0g+rgp5/KQYy3gdHfkAU57D5AE d2GGAIa9EPoS3rhJKq3NoTbQOFLsfipv5R1OYyyn++RshJ54OznCl2nBoUu/7lMalmvX ZuCZXr2j6o61O8dKdsEtDJu4j69QBauurRTuqtOG+54+rfJHUDUu3tSp2xSqJvWhCTK5 9OXQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Tv2cBmAO; 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 d75a77b69052e-4a779d49136si85575911cf.118.2025.06.23.07.00.20 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 23 Jun 2025 07:00:21 -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=Tv2cBmAO; 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 1uThh6-0008Fv-10; Mon, 23 Jun 2025 09:58:44 -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 1uThh4-0008FS-AY for qemu-devel@nongnu.org; Mon, 23 Jun 2025 09:58:42 -0400 Received: from mail-pf1-x42e.google.com ([2607:f8b0:4864:20::42e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1uThh0-0007Hj-Qw for qemu-devel@nongnu.org; Mon, 23 Jun 2025 09:58:42 -0400 Received: by mail-pf1-x42e.google.com with SMTP id d2e1a72fcca58-7490702fc7cso2138162b3a.1 for ; Mon, 23 Jun 2025 06:58:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1750687117; x=1751291917; 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=QHmEaaRegYwFGlGoVTGRYvzmrkIrypDwOG7loJLMkas=; b=Tv2cBmAONAeOiVmp3jTu7az+lR9QWIVg4qa4HOZ2BxWaiYPgUOLSuXtWpJPvjMp1W4 JmCBvzCAb1dQocbavhLpZ1/Qh1/3wUBcrXGsU21iahi+lQ3jatDp3bbnx9v9FgT6y773 FCBiQKe6TBdgEbfmRd6vQAtjRa2TTznDZqrqxPvzc1A7LC8gv27lghtFCr87+DP2ZRZS 1e0/8CyLH9QADC9xC6ka8oegbYHL+e/MzgFM1aWsozbtq4hi+Mp9r63H19Gq28TCdiCf QhvsOqHDXXdkl+8w3Wy2Wz6Jj4uP4Owwnx/2zpJBwxkPYNEJPEMwBv9AIUSQ+IOLb/d7 7BAQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1750687117; x=1751291917; 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=QHmEaaRegYwFGlGoVTGRYvzmrkIrypDwOG7loJLMkas=; b=lR7MShJ4rQMqiPnQHPKtHV8Tw0cN/VpQ5QIja+ZPUu1UxRsntGYQsl321d5lsvOMHi M2e7h1o2wkrIg01a30zPA3VjCFdZJNYfMDyr4JHc6/wrOTyVGz1kgmLKzm7o7+Oi8vCY 5Xv2XQB9BkrWLUgD5vuvzCWNPYLdALX9Xow+Eqbm2nfF6mGZeUP/tz8KGL2aksO+x98g p60LYxnfRo+opz3QgKPaxRdpadGwypBPFj5OtCzUSEV/oXLlzIDjh0ZoQDa8tmty5Rse oykQ7QiV/KgYK0m09wWXbBP9XhBB17T8EL+YrRfygzeE3lzCQ2KzC3WOpiecvMv/OdS1 RrWg== X-Gm-Message-State: AOJu0Yw+4HyiFbZPLk8pbvohf70dpCgF8FLZ1qv5rJ9WljEg6m2AM7+W 9gZkc0h4sN6azmICPMiDr+9sWSZ7BTcwIRQEOnI6AnPL6qIu9HouOIIx0oD9ou4m9WrEB9Bi6I0 utSrV X-Gm-Gg: ASbGnctdcMt/PPOnrxuB/Zes+WQMDfibtU1MsYz21UmvIJGI0tIdGvgjgueugsc67cd R1FqiUdlG8cwO1r0oU8pNrW/gxaelJnUKFAtopmGh4OhclhzB07CvGELlgoHDlGamd+3wnYbnY5 aOB6o4mpG7aOrnLec9zjW7br0knmNhRGvlGqwEcoojzcmNGCZGi50jRF5nJ2WFVJANK+qTyr4T1 vliW/eXjz6o+yYAnmJ/MWw+ZMxS7S0N4BWqnefvy//8KEnmsQsWzNmZJn/6JdZBHakblkHg8mdr It/NeR/bhJyvcYXEYw9gstDDOMGt89PDZT7btNxxPCrAH4JQ34mqFN7t2OfiP2/GpXM= X-Received: by 2002:a05:6a21:a342:b0:21f:53a9:b72c with SMTP id adf61e73a8af0-22026e9c88cmr19082150637.38.1750687117248; Mon, 23 Jun 2025 06:58:37 -0700 (PDT) Received: from gromero0.. ([186.215.58.88]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-b31f119eb64sm8063490a12.31.2025.06.23.06.58.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 23 Jun 2025 06:58:36 -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 v5 4/9] hw/arm/virt-acpi-build: Improve comment in build_iort Date: Mon, 23 Jun 2025 13:57:44 +0000 Message-Id: <20250623135749.691137-5-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::42e; envelope-from=gustavo.romero@linaro.org; helo=mail-pf1-x42e.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 When building the Root Complex table, the comment about the code that maps the RC node to SMMU node is misleading because it reads "RC -> SMMUv3 -> ITS", but the code is only mapping the RCs IDs to the SMMUv3 node. The step of mapping from the SMMUv3 IDs to the ITS Group node is actually defined in another table (in the SMMUv3 node). So change the comment to read "RC -> SMMUv3" instead. Signed-off-by Gustavo Romero --- hw/arm/virt-acpi-build.c | 25 +++++++++++++++++++------ 1 file changed, 19 insertions(+), 6 deletions(-) diff --git a/hw/arm/virt-acpi-build.c b/hw/arm/virt-acpi-build.c index 9eee284c80..e9cd3fb351 100644 --- a/hw/arm/virt-acpi-build.c +++ b/hw/arm/virt-acpi-build.c @@ -370,7 +370,7 @@ build_iort(GArray *table_data, BIOSLinker *linker, VirtMachineState *vms) /* DeviceID mapping index (ignored since interrupts are GSIV based) */ build_append_int_noprefix(table_data, 0, 4); - /* output IORT node is the ITS group node (the first node) */ + /* Output IORT node is the ITS Group node (the first node) */ build_iort_id_mapping(table_data, 0, 0x10000, IORT_NODE_OFFSET); } @@ -407,23 +407,36 @@ build_iort(GArray *table_data, BIOSLinker *linker, VirtMachineState *vms) if (vms->iommu == VIRT_IOMMU_SMMUV3) { AcpiIortIdMapping *range; - /* translated RIDs connect to SMMUv3 node: RC -> SMMUv3 -> ITS */ + /* + * Map RIDs (input) from RC to SMMUv3 nodes: RC -> SMMUv3. + * + * N.B.: The mapping from SMMUv3 to ITS Group node (SMMUv3 -> ITS) is + * defined in the SMMUv3 table, where all SMMUv3 IDs are mapped to the + * ITS Group node. + */ for (i = 0; i < smmu_idmaps->len; i++) { range = &g_array_index(smmu_idmaps, AcpiIortIdMapping, i); - /* output IORT node is the smmuv3 node */ + /* Output IORT node is the SMMUv3 node. */ build_iort_id_mapping(table_data, range->input_base, range->id_count, smmu_offset); } - /* bypassed RIDs connect to ITS group node directly: RC -> ITS */ + /* + * Map bypassed (don't go throught the SMMU) RIDs (input) to ITS Group + * node directly: RC -> ITS. + */ for (i = 0; i < its_idmaps->len; i++) { range = &g_array_index(its_idmaps, AcpiIortIdMapping, i); - /* output IORT node is the ITS group node (the first node) */ + /* Output IORT node is the ITS Group node (the first node). */ build_iort_id_mapping(table_data, range->input_base, range->id_count, IORT_NODE_OFFSET); } } else { - /* output IORT node is the ITS group node (the first node) */ + /* + * Map all RIDs (input) to ITS Group node directly, since there is no + * SMMU: RC -> ITS. + * Output IORT node is the ITS Group node (the first node). + */ build_iort_id_mapping(table_data, 0, 0x10000, IORT_NODE_OFFSET); } From patchwork Mon Jun 23 13:57:45 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Gustavo Romero X-Patchwork-Id: 899238 Delivered-To: patch@linaro.org Received: by 2002:adf:e506:0:b0:3a6:d909:26ce with SMTP id j6csp878037wrm; Mon, 23 Jun 2025 07:01:25 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWmZkfg0MJTtWTZLaVC9hLm81SKeP4t3THQzsgBQkYXUc9YzmM6WlPnsRZxr2cH4Ij6ez5W2w==@linaro.org X-Google-Smtp-Source: AGHT+IGoT6WMrx+9Gl8ZyvdEijJoN9WXxae8j2YdtHpDU6EFB4dRmcrEzjPxJLCDlhmgx0qDkI5w X-Received: by 2002:ac8:59c6:0:b0:4a6:f3f7:4c28 with SMTP id d75a77b69052e-4a77a24bcc4mr184126111cf.17.1750687284851; Mon, 23 Jun 2025 07:01:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1750687284; cv=none; d=google.com; s=arc-20240605; b=j4XrtIn3StCBU9BqQ7s+jccPjj3cm/cDgOxTuuCC4e13ipI+9kuTRCtmrGEZnnuRR3 1zfDR2OGwKkDT34Ad2lPVg+s6yX900DX/qzQ4ZJ7FS+kBrYYJjmjkajkazyXgh9EY8vO qYwNpWyZRJ+G6+qNWVF7qarZDLsfKrdijyp261KlaWrZc7yV5PjgSohXcTrdC2VN2pZM oUzmAZuJ81CcYUYKVYKm86GYa10CZOjm8RE58fCdGMjOd/phER1qks6AD1P2FdHvhIxg mbb6Q+bp/2ea9FKBNQmmOtJDuQsYHgoRHeDxAqPU4t2VbOspuLRnrUyNo7pTpZb3jqec /Vjg== 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=tWwtJe7sGsUGEueqmsN3PVBl6pSQ948gCik+Qy6mwyc=; fh=NM4Ghk6du0xINoQVrcLOZNFqo57se3lAmHRoGLE2PMQ=; b=ic0FJtMP5Ie2Szlj54aOy2hXBBuTGsHZuHy6qfJyO4hUVxRdT96ySf1zQizpx3Aw46 gznvuoqjC2FZowz0QzRpxvylggKR1zEsNNG73KU3vvSTi0LnqsxJvrQzE4OWtRoL4VJa xQuDkcMVzfyTfUNF4vP3bSyBAETnDp4tG5kWHFFoEO0iyLTCpx5scqJEBD675HmxlVb8 2tL9SzW0jsbtqUIDeDPh5Yn7UMAD4Hqjp0A3v+qmeUYekhQjGZw3fFOlstEhi0rtEEcz K7/N9ckkLwArfmKU1Ha+GyS+O9k6ebErW+tnpYuEYO6yMkFq56VnNq3c1vnNW8nsUnEz ASSw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=F0cNz4wj; 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 d75a77b69052e-4a77a0eb43bsi81670431cf.627.2025.06.23.07.01.24 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 23 Jun 2025 07:01:24 -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=F0cNz4wj; 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 1uThhX-0008Po-CF; Mon, 23 Jun 2025 09:59:11 -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 1uThhA-0008Gt-4w for qemu-devel@nongnu.org; Mon, 23 Jun 2025 09:58:48 -0400 Received: from mail-pf1-x429.google.com ([2607:f8b0:4864:20::429]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1uThh5-0007IA-D3 for qemu-devel@nongnu.org; Mon, 23 Jun 2025 09:58:47 -0400 Received: by mail-pf1-x429.google.com with SMTP id d2e1a72fcca58-7399a2dc13fso4883941b3a.2 for ; Mon, 23 Jun 2025 06:58:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1750687121; x=1751291921; 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=tWwtJe7sGsUGEueqmsN3PVBl6pSQ948gCik+Qy6mwyc=; b=F0cNz4wjTLppFhMHQFPclwPGqV87cx3u9fuCusGtta1cbn+1TKIAaN+CeQXMLQq1K2 iwYIi0PMB3gmGQNUPXUIfx8J5GWo1hd2LjzHFXwSod3HSaDu0DQQMXt22OR38w6WBAbq jz4eHinCwE0o0f3l4Sqs7mooWKbCgrNVvRDYGKpQrDJcmARhntAwqIw3aUA+zlThdl+f Do8LbqA/uJwUZuMdZk3bjE38Zn0e5UzKg5vta1m7yJbbg1x+52pcZOw6auZla2+W7RIC Ard7wlDjT9npXzcN05MKuKpTQLnj2Gv3iHcYaD8thR0/oFeKlsIroJHUNKDK2iUtBlfn p6rg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1750687121; x=1751291921; 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=tWwtJe7sGsUGEueqmsN3PVBl6pSQ948gCik+Qy6mwyc=; b=cKyguhY6xlezafNf9rnxGPtGZS2e6IepVWOoAA7EkCrsc/Cnv5HzwITrSkUtsnwfpg 7ltJ4FG0T2VjZaimFBc26VLAPT+NjPTxVBesk4+KzfmHdM6V+gddaeQ4HsfdWyHUY+VU HFIHQ4Qerk3a5uv3o769sV/CpedN81hsxeLuYr9xDvq5jZ4Rs9apbkKXzGqiQXYuLpyx soyWxMTpKT0B0fL3hG6IsdFfK4amMAhMowrnAU0SkBsi0kxGImnrQXY+YARep8Fii/bI x9oy+v6+Az1f4uAv21kgdqkkjbn2OxLS7TW6zy0If250NJM4qgW20HYqbwg+1VoAZDb5 54sA== X-Gm-Message-State: AOJu0Yw+3oRJyHbvr8CAWMIbOm8ALlrXGR3teKg/5rdsZHnNSdee+iU7 WKTl3Ec3FB44PfUug1m/ozgtKQ69lwIEz+7zJ1wWrGH3K3ySnKlTXazs0a/NssirCJq/WtXcODj GOdrh X-Gm-Gg: ASbGncuzkhYsNfJYZ1p/OIQtvPUzbmr1FW1mgxMa5m8fHya5BF8chL1XGBRy8om5HAW hNT6FrNezNluqc7lf/cymY3oXnm+oNwyL2DK/2R7MC01rEN1kNTnRM1zleHvbp6w1pVJ9xkiZYp aiW8DXrx58pB9SSPtEWIn7I2oEaBH7DwqJu/vl42KO7LrAR3y1q/RJ+yTsO7bmKBmSsd+T1gqpJ FZV07//eSjkkeR5HodwfB5T65ntqzSolMrIzFhoRdwGvC/5GdlwRx78zLsJF+L/6pV4IA88PZae n4qP1I7ecn1zsgYNNQELOsTqVZvuyTAUHsOw4INBmH76t4lW1Yim1vE/Y+DnxQKMliY= X-Received: by 2002:a05:6a00:3c90:b0:736:2a73:6756 with SMTP id d2e1a72fcca58-7490da07100mr18027642b3a.21.1750687120824; Mon, 23 Jun 2025 06:58:40 -0700 (PDT) Received: from gromero0.. ([186.215.58.88]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-b31f119eb64sm8063490a12.31.2025.06.23.06.58.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 23 Jun 2025 06:58:40 -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 v5 5/9] hw/arm/virt-acpi-build: Factor out create_its_idmaps Date: Mon, 23 Jun 2025 13:57:45 +0000 Message-Id: <20250623135749.691137-6-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::429; envelope-from=gustavo.romero@linaro.org; helo=mail-pf1-x429.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, T_SPF_TEMPERROR=0.01 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 Factor out a new function, create_its_idmaps(), from the current build_iort code. Add proper comments to it clarifying how the ID ranges that go directly to the ITS Group node are computed based on the ones that go to the SMMU node. Suggested-by: Eric Auger Signed-off-by: Gustavo Romero --- hw/arm/virt-acpi-build.c | 64 +++++++++++++++++++++++++--------------- 1 file changed, 41 insertions(+), 23 deletions(-) diff --git a/hw/arm/virt-acpi-build.c b/hw/arm/virt-acpi-build.c index e9cd3fb351..40a782a498 100644 --- a/hw/arm/virt-acpi-build.c +++ b/hw/arm/virt-acpi-build.c @@ -266,6 +266,42 @@ static int iort_idmap_compare(gconstpointer a, gconstpointer b) return idmap_a->input_base - idmap_b->input_base; } +/* Compute ID ranges (RIDs) from RC that do directly to the ITS Group node */ +static void create_its_idmaps(GArray *its_idmaps, GArray *smmu_idmaps) +{ + AcpiIortIdMapping *idmap; + AcpiIortIdMapping next_range = {0}; + + /* + * Based on the RID ranges that go to the SMMU, determine the bypassed RID + * ranges, i.e., the ones that go directly to the ITS Group node, by + * subtracting the SMMU-bound ranges from the full RID range, 0x0000–0xFFFF. + */ + for (int i = 0; i < smmu_idmaps->len; i++) { + idmap = &g_array_index(smmu_idmaps, AcpiIortIdMapping, i); + + if (next_range.input_base < idmap->input_base) { + next_range.id_count = idmap->input_base - next_range.input_base; + g_array_append_val(its_idmaps, next_range); + } + + next_range.input_base = idmap->input_base + idmap->id_count; + } + + /* + * Append the last RC -> ITS ID mapping. + * + * RIDs are 16-bit, according to the PCI Express 2.0 Base Specification, rev + * 0.9, section 2.2.6.2, "Transaction Descriptor - Transaction ID Field", + * hence, the end of the range is 0x10000. + */ + if (next_range.input_base < 0x10000) { + next_range.id_count = 0x10000 - next_range.input_base; + g_array_append_val(its_idmaps, next_range); + } +} + + /* * Input Output Remapping Table (IORT) * Conforms to "IO Remapping Table System Software on ARM Platforms", @@ -276,7 +312,6 @@ build_iort(GArray *table_data, BIOSLinker *linker, VirtMachineState *vms) { int i, nb_nodes, rc_mapping_count; size_t node_size, smmu_offset = 0; - AcpiIortIdMapping *idmap; uint32_t id = 0; GArray *smmu_idmaps = g_array_new(false, true, sizeof(AcpiIortIdMapping)); GArray *its_idmaps = g_array_new(false, true, sizeof(AcpiIortIdMapping)); @@ -287,34 +322,17 @@ build_iort(GArray *table_data, BIOSLinker *linker, VirtMachineState *vms) acpi_table_begin(&table, table_data); if (vms->iommu == VIRT_IOMMU_SMMUV3) { - AcpiIortIdMapping next_range = {0}; - object_child_foreach_recursive(object_get_root(), iort_host_bridges, smmu_idmaps); /* Sort the smmu idmap by input_base */ g_array_sort(smmu_idmaps, iort_idmap_compare); - /* - * Split the whole RIDs by mapping from RC to SMMU, - * build the ID mapping from RC to ITS directly. - */ - for (i = 0; i < smmu_idmaps->len; i++) { - idmap = &g_array_index(smmu_idmaps, AcpiIortIdMapping, i); - - if (next_range.input_base < idmap->input_base) { - next_range.id_count = idmap->input_base - next_range.input_base; - g_array_append_val(its_idmaps, next_range); - } - - next_range.input_base = idmap->input_base + idmap->id_count; - } - - /* Append the last RC -> ITS ID mapping */ - if (next_range.input_base < 0x10000) { - next_range.id_count = 0x10000 - next_range.input_base; - g_array_append_val(its_idmaps, next_range); - } + /* + * Knowing the ID ranges from the RC to the SMMU, it's possible to + * determine the ID ranges from RC that go directly to ITS. + */ + create_its_idmaps(its_idmaps, smmu_idmaps); nb_nodes = 3; /* RC, ITS, SMMUv3 */ rc_mapping_count = smmu_idmaps->len + its_idmaps->len; From patchwork Mon Jun 23 13:57:46 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Gustavo Romero X-Patchwork-Id: 899235 Delivered-To: patch@linaro.org Received: by 2002:adf:e506:0:b0:3a6:d909:26ce with SMTP id j6csp876975wrm; Mon, 23 Jun 2025 07:00:03 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVbUEqWg48K4qKh0MLhC85saIyEAK4HUG6KFPSRlIhu4tc4hK82I6vnhajtCUozqRIIASsEyg==@linaro.org X-Google-Smtp-Source: AGHT+IEf8Pj/pm5CLslKdzSapE64SALDx6UIyl7O5pfY4C/cAIR6s3N0SgqUMXWlPRjq8EnrXr8d X-Received: by 2002:a05:622a:408d:b0:4a7:7326:71be with SMTP id d75a77b69052e-4a77c2cd477mr206064551cf.5.1750687203083; Mon, 23 Jun 2025 07:00:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1750687203; cv=none; d=google.com; s=arc-20240605; b=BqQwDS5K/n6aRuWF7LZ26ZKqOESXUpGkEtCbdqW44xfbamq5htdKanQBpOtRq6E2qe d+tizHRtRmYAR/hagu/tHAj1PHvbCYdCvDo68K/XpZFII0aMi744PX8sgYxWHFhieztN WzuQc1xfFp4OFtCqczKFe3pJhU8afhBu/rKz7LkSmTE32ONv0dxBM6fOdL+Ko1QXbRHB /P0p70CKHsYR5SjvBFV7Peb6M0gMOzvItg2K35F1BtK/ZRl6rhQkhSwdVvs2qjqJagmA UsbfBUtN9l5e2807yHdxDKKVRU01wsfUX3U5olAvsAZvI+V0edMNqTq9xJLOZSc9JYQB zvDg== 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=ad2Ktqpr9QplRBLnhaKfV79oFe1du+hxPOeNvvhDj1A=; fh=NM4Ghk6du0xINoQVrcLOZNFqo57se3lAmHRoGLE2PMQ=; b=J8u4WXNdy/79hnrRl37v2RgJJKhGyhaW6T5R9CFO16G2FaCs3VwviTagtkL8LHh0// CH8st/DOSQj7sSlJWYAvcsyz0Eo4dVDQDujOmeFV02O1onv79z/OTxCGCS29KM72VVab fbWAy+rErLZM0zfeIZBqj3jIJ3VeHusoZnO4ShY9pevGeNNJG/Dt4a0jPbHWi+BfJWI0 QEw7xfxNdarfTYOyPFfWqnEOtHtRDnIOR9rwkcQ2zX9mDqLo8mLOS47sQDaukkr/npPF Sa4F9DIP++pVfEcMWQ1ShzeQadkb5zdCpzAzCq90q9a+C1L+PCnYZfkvKE1L3EShJL4O wETg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=JS5c5B86; 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 d75a77b69052e-4a77a0e1c69si83958281cf.552.2025.06.23.07.00.02 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 23 Jun 2025 07:00:03 -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=JS5c5B86; 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 1uThhc-0008WO-1Q; Mon, 23 Jun 2025 09:59:16 -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 1uThhC-0008HD-4g for qemu-devel@nongnu.org; Mon, 23 Jun 2025 09:58:51 -0400 Received: from mail-pf1-x430.google.com ([2607:f8b0:4864:20::430]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1uThh8-0007Ia-1x for qemu-devel@nongnu.org; Mon, 23 Jun 2025 09:58:49 -0400 Received: by mail-pf1-x430.google.com with SMTP id d2e1a72fcca58-7406c6dd2b1so3233670b3a.0 for ; Mon, 23 Jun 2025 06:58:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1750687124; x=1751291924; 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=ad2Ktqpr9QplRBLnhaKfV79oFe1du+hxPOeNvvhDj1A=; b=JS5c5B86BIYZmNM6yvij/Ze8pzHgJdf22ZvxggSKMNfzlATmnadziJUcPuujNtFaVW 0QHqVeS4JWnsJYdOkXmBXsAvFR47fmVju7/Iw7A6c+vbG0kecYjUfzQwCLpFITfP19i9 19yfKqQjK+5RAKrSgkC12K5YsPIYVmtsk1fozSni9Rvw5qvFnZuuNUBcywzsAyLr3acl IBj+cPBNmKmhRU3zZqsVNNLWBALEg5l05kfC6PI6W8oRvTQlw08RU9d1KxVkVOYClDBR qSJ6ywLZmBl0RC3ds8Zs9P6gn52WPlhhQg9XxgqQvaqVVV6h2gbWzN95dmscb7ZMMSCn 34Pg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1750687124; x=1751291924; 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=ad2Ktqpr9QplRBLnhaKfV79oFe1du+hxPOeNvvhDj1A=; b=rLqqx7QCis5EGlc6FDUavtMtJZ70F1OOfEo6fAUkbQ5STRjO6W9CjKhR0RWoMV8BKB 7ukVaC7vRS9aL6UGl+eucWjVtC+ILjVw8ONWK4h9JnHVPG9t8stNv6pS6Is8y83gfMOh Y/MpU2OfV1qpL72DrsqwfXhDmsog9HSrN9/2CL3NHbzb+lg0JmeKTQMRIqX3WhxpVJAg AGfNPLo8YQ+pSIB2Dy0TjJ1r12CToEpLYuPuoDmUzUC6ErHTQlhsU/uASDhEPpPe6SH5 zq6/IlbhHLogampAcATa20jOnQVs26b0QrOrE7PpwToyQp4Cuaxz1j2CC2YX3pj9ODqV PgQg== X-Gm-Message-State: AOJu0Yylei2iBZ5z+NnhyxeCKhOjiPvjwgQb6Kr5bKoU/nlDdrEmkHBW HVbxLGrgJmerhumibFJ6dlj1vw2npby3uXOVKfjHeTjfDq4U0UzjYPZ1rmfAy9m9KSUvO6JLZ4z EyMJd X-Gm-Gg: ASbGncupi4FYDlhrOkiBuwJ2pUEVyZTt9/+DzdESo1tr2PO9bAHOoxRiMYLzW+zBCs+ AW6+fyrkIedu3Qdn4oYuqsu+hR7dCwAj+yaL9gUIYy7EuKJnrs3s23xckrcu5ofdCORjyfo1tXM 4IMeUnZ+T8PfsnhJvu8RdoX/q2a+l8552T3HGU5YL7iKJ4Kg4JLKuOy5SMQVLJP2RNTYwqwu/Dz OgStJz5/GRJU4pm9P5QStO5vZzwymbAROt9GEpAsYtyqP5Kok2evBWemipkeJz/4b/AGs39AZ1D ja9nkX3ScUxr7aGTPgFphSYHTf3pifXFaYyy2CLj1blf1h1+0VEkDlO3dbxad11t2SA= X-Received: by 2002:a05:6a20:a106:b0:21c:fa68:9da6 with SMTP id adf61e73a8af0-220291cdb15mr18609786637.8.1750687124354; Mon, 23 Jun 2025 06:58:44 -0700 (PDT) Received: from gromero0.. ([186.215.58.88]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-b31f119eb64sm8063490a12.31.2025.06.23.06.58.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 23 Jun 2025 06:58:43 -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 v5 6/9] qtest/bios-tables-test: Add test for when ITS is off on aarch64 Date: Mon, 23 Jun 2025 13:57:46 +0000 Message-Id: <20250623135749.691137-7-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::430; envelope-from=gustavo.romero@linaro.org; helo=mail-pf1-x430.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é Arm64 GIC ITS (Interrupt Translation Service) is an optional piece of hardware introduced in GICv3 and, being optional, it can be disabled in QEMU aarch64 VMs that support it using machine option "its=off", like, for instance: "-M virt,its=off". In ACPI, the ITS is advertised, if present, in the MADT (aka APIC) table, while the ID mappings from the Root Complex (RC) and from the SMMU nodes to the ITS Group nodes are described in the IORT table. This new test verifies that when the "its=off" option is passed to the machine the ITS-related data is correctly pruned from the ACPI tables. The new blobs for this test will be added in a following commit. Signed-off-by: Philippe Mathieu-Daudé Signed-off-by: Gustavo Romero --- tests/qtest/bios-tables-test-allowed-diff.h | 2 ++ tests/qtest/bios-tables-test.c | 21 +++++++++++++++++++++ 2 files changed, 23 insertions(+) diff --git a/tests/qtest/bios-tables-test-allowed-diff.h b/tests/qtest/bios-tables-test-allowed-diff.h index dfb8523c8b..a88198d5c2 100644 --- a/tests/qtest/bios-tables-test-allowed-diff.h +++ b/tests/qtest/bios-tables-test-allowed-diff.h @@ -1 +1,3 @@ /* List of comma-separated changed AML files to ignore */ +"tests/data/acpi/aarch64/virt/APIC.its_off", +"tests/data/acpi/aarch64/virt/IORT.its_off", diff --git a/tests/qtest/bios-tables-test.c b/tests/qtest/bios-tables-test.c index 0b2bdf9d0d..4dbc07ec5e 100644 --- a/tests/qtest/bios-tables-test.c +++ b/tests/qtest/bios-tables-test.c @@ -2146,6 +2146,25 @@ static void test_acpi_aarch64_virt_tcg_topology(void) free_test_data(&data); } +static void test_acpi_aarch64_virt_tcg_its_off(void) +{ + test_data data = { + .machine = "virt", + .arch = "aarch64", + .variant = ".its_off", + .tcg_only = true, + .uefi_fl1 = "pc-bios/edk2-aarch64-code.fd", + .uefi_fl2 = "pc-bios/edk2-arm-vars.fd", + .cd = "tests/data/uefi-boot-images/bios-tables-test.aarch64.iso.qcow2", + .ram_start = 0x40000000ULL, + .scan_len = 128ULL * 1024 * 1024, + }; + + test_acpi_one("-cpu cortex-a57 " + "-M gic-version=3,iommu=smmuv3,its=off", &data); + free_test_data(&data); +} + static void test_acpi_q35_viot(void) { test_data data = { @@ -2577,6 +2596,8 @@ int main(int argc, char *argv[]) test_acpi_aarch64_virt_tcg_acpi_hmat); qtest_add_func("acpi/virt/topology", test_acpi_aarch64_virt_tcg_topology); + qtest_add_func("acpi/virt/its_off", + test_acpi_aarch64_virt_tcg_its_off); qtest_add_func("acpi/virt/numamem", test_acpi_aarch64_virt_tcg_numamem); qtest_add_func("acpi/virt/memhp", test_acpi_aarch64_virt_tcg_memhp); From patchwork Mon Jun 23 13:57:47 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gustavo Romero X-Patchwork-Id: 899239 Delivered-To: patch@linaro.org Received: by 2002:adf:e506:0:b0:3a6:d909:26ce with SMTP id j6csp878499wrm; Mon, 23 Jun 2025 07:02:00 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCW5gvpVC/9b33hlPhSX7zi8k7/Vn/E6RF6dwWYGISOV25sVYduH5XiIALDjRDrdsCosVTcXtg==@linaro.org X-Google-Smtp-Source: AGHT+IEyjifTUgdfV2nQ25kDtzyYAWEXYqjUdZ/h4OzA54jhuXWUc6wpkp3/KpExED7EqOZo0KFy X-Received: by 2002:a05:6214:238b:b0:6fb:4f72:6c35 with SMTP id 6a1803df08f44-6fd0a43b8ccmr210719206d6.4.1750687320267; Mon, 23 Jun 2025 07:02:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1750687320; cv=none; d=google.com; s=arc-20240605; b=ZQoA/sHTrOncJwIAqOk2uO4l20C926r1LiXi7lNttzOXuHazS1BXexPWXJ/44qIZrf lPZjFx6XkozEPBpycBqWrIrIIRaERKyV48+SSWRQiC3w1IKNdB71FLKA9WVSgGRQEigB g/xo8vkq/fTQW06VJAi5VGVWHOWFQ4rfSECilC2V2gyXbVdVnMGsIajTt3jTxq0Kcnit btOFGQexr1M+HKconKu8Cef8ocbPdP0MwskhaKPGR0ZJJyBkk6XDZLTCqlkKxdWdW96o PunClhVUCdiDcjV3cpM4tIWNjbx38UIViYmc3DR4RMvewg6CrGP5HE0ghaDTK2/5OkkK HqPg== 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=BjZboSZZUhHnL3j3LLICgav2KEwJ5awXyYH+Nvj74ZU=; fh=NM4Ghk6du0xINoQVrcLOZNFqo57se3lAmHRoGLE2PMQ=; b=IMQdoUIZ0c/hvPDmgC+FLVOp9JMTEhBKTDuGXgTSc0/mqRVZzstcKBmKKk+/t2uJ0c VGKOpLnK9VJU6LqiG1MT7XTqFgbFG3z1cMqTU6oYqZcs7xk807B0nA41W/Jd9VFTqdvT eL0cThkQo4GbkXxa+5Oq0mOilMrJoJQPr6XVQgBZg4M7e4PUtRNR6xqSmrtuR6EZwqnm +DiCuk+NYo12rNvS0UdT47QyRRQvFrC4Ff+GzaREV+qohU6hNTUoHiG5gkB+vu30MZJN lrDHgILqhhCQaLphSCA8QqcTzpFZgjtxSEJgs+5nY3/kPM6PBT3LJhPYqef0QM4lCghK Q7Qg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ouaxc+C1; 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-7d3f9a152a4si749013885a.490.2025.06.23.07.01.59 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 23 Jun 2025 07:02:00 -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=ouaxc+C1; 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 1uThhX-0008QK-D0; Mon, 23 Jun 2025 09:59:11 -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 1uThhF-0008KU-PK for qemu-devel@nongnu.org; Mon, 23 Jun 2025 09:58:54 -0400 Received: from mail-pg1-x52b.google.com ([2607:f8b0:4864:20::52b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1uThhB-0007J1-UE for qemu-devel@nongnu.org; Mon, 23 Jun 2025 09:58:53 -0400 Received: by mail-pg1-x52b.google.com with SMTP id 41be03b00d2f7-b0db0b6a677so3810319a12.2 for ; Mon, 23 Jun 2025 06:58:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1750687128; x=1751291928; 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=BjZboSZZUhHnL3j3LLICgav2KEwJ5awXyYH+Nvj74ZU=; b=ouaxc+C1DFwroO+JGxwF8v95hxqvKddsbEPxs5atISnbZU2b52VZkQHU1dx5HWPOH4 RuhN644KfhhigdiyR7ytdYMKtmxxJd8I+dA7GnAgr7seuyqlt2eowJAXir+IPqdgvblI p3LXgzsDdFfD++FzX/CwBF/sgyp9qzxPIk12mA0YljpBRDohhOYfqIbvnDDBK+UuSaDj cG2k+vcDdQUTm16g9inQnVcbO9+enr+ikJGBtcvyExB6wyQvnurYcgOx6RjwkHDIM/Ln bdV8oQ6HP4kNKKEUcaYRdrVUDsgfjH/zJajcgYvJvOYxoH+9wv8Jx0NB/+XPgcK2eETU 2sDQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1750687128; x=1751291928; 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=BjZboSZZUhHnL3j3LLICgav2KEwJ5awXyYH+Nvj74ZU=; b=IAxn0qNdNb1pY1qmQtAv502AqQB1I45aRSZ49najXCW83rFLCJlvkz4/rU4PRvTroV lY+iCUHZ7J+IaNpWbor0Jhtq2ajShJTg7p1kPAwobCW6TIDLWX22SJt3dOSG4I6FlBR+ 6M0NBMAuHq55ph89hRMJUqhd/51k6JwCimGOurPP2CVvq+gJBzMtp8ud2NToPmfWjEKI 2ZbxJ6Z42XynoFvRLcdibEcHjyI8w+TQTcex1olq5+o0ZwQgYSmz8haSrvNJaHrknavY ZXmYlGkLRCQoniOaBDdhFmsha03SsATO8Ye0WrAGNueK2WZPaKoubZAJrqkYUtQfV1kp 9Sxg== X-Gm-Message-State: AOJu0Yw0a6lm7n0YwRdqwpi2hrTiaOn7QHBpc36Lv7wAT5wsC8he/ao/ v+sVBrZXIBr5KXhAOMZfOPG9hARWkeWloUDalZdd1DRW7tlxUrvDQVu8MWRYOrjovVXeOYaLaKT epGQr X-Gm-Gg: ASbGncv/T3/B9plXZ9ANdkGlC0smqA5WzRdzr3RQnK3vmAM/bF5yPjdJa5b4Ovi5B+i eN8IpVy6/JEyMOnKxdqsdLwVRqDPaaWhlw/fkLbFz+O7iw3TVh8aP4m0H9JhnvC8KFswmC5Z6+B pGnH6G/ewgXfph5SVhqNjSeRhDFG/NAcpC6z32mzgF3zST0uuOa0CLUZH1nryYdeM59kEAWKeSC NMWdTQkc1foj7IjcHYCYM12KL7Tbzsv1o4uUPPJDWmEf/pqJpetDiS0KtUR5oqlrPa6ZKnPbUVf U1/sJCEJLqZI1OpU/OJxC+C4wbCNC7a6SxdZTDY4tQ+eWYO9f8bQcjoXdyCb/B3k0Xw= X-Received: by 2002:a05:6a21:b94:b0:1f5:6f95:2544 with SMTP id adf61e73a8af0-22026f00f14mr16060884637.33.1750687127987; Mon, 23 Jun 2025 06:58:47 -0700 (PDT) Received: from gromero0.. ([186.215.58.88]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-b31f119eb64sm8063490a12.31.2025.06.23.06.58.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 23 Jun 2025 06:58:47 -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 v5 7/9] qtest/bios-tables-test: Add blobs for its=off test on aarch64 Date: Mon, 23 Jun 2025 13:57:47 +0000 Message-Id: <20250623135749.691137-8-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::52b; envelope-from=gustavo.romero@linaro.org; helo=mail-pg1-x52b.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 Add blobs for test_acpi_aarch64_virt_tcg_its_off(), which introduces a new variant, .its_off, that requires variations of the MADT and IORT tables. MADT (aka APIC) diff: +[000h 0000 4] Signature : "APIC" [Multiple APIC Description Table (MADT)] +[004h 0004 4] Table Length : 000000B8 +[008h 0008 1] Revision : 04 +[009h 0009 1] Checksum : C1 +[00Ah 0010 6] Oem ID : "BOCHS " +[010h 0016 8] Oem Table ID : "BXPC " +[018h 0024 4] Oem Revision : 00000001 +[01Ch 0028 4] Asl Compiler ID : "BXPC" +[020h 0032 4] Asl Compiler Revision : 00000001 + +[024h 0036 4] Local Apic Address : 00000000 +[028h 0040 4] Flags (decoded below) : 00000000 + PC-AT Compatibility : 0 + +[02Ch 0044 1] Subtable Type : 0C [Generic Interrupt Distributor] +[02Dh 0045 1] Length : 18 +[02Eh 0046 2] Reserved : 0000 +[030h 0048 4] Local GIC Hardware ID : 00000000 +[034h 0052 8] Base Address : 0000000008000000 +[03Ch 0060 4] Interrupt Base : 00000000 +[040h 0064 1] Version : 03 +[041h 0065 3] Reserved : 000000 + +[044h 0068 1] Subtable Type : 0B [Generic Interrupt Controller] +[045h 0069 1] Length : 50 +[046h 0070 2] Reserved : 0000 +[048h 0072 4] CPU Interface Number : 00000000 +[04Ch 0076 4] Processor UID : 00000000 +[050h 0080 4] Flags (decoded below) : 00000001 + Processor Enabled : 1 + Performance Interrupt Trigger Mode : 0 + Virtual GIC Interrupt Trigger Mode : 0 +[054h 0084 4] Parking Protocol Version : 00000000 +[058h 0088 4] Performance Interrupt : 00000017 +[05Ch 0092 8] Parked Address : 0000000000000000 +[064h 0100 8] Base Address : 0000000000000000 +[06Ch 0108 8] Virtual GIC Base Address : 0000000000000000 +[074h 0116 8] Hypervisor GIC Base Address : 0000000000000000 +[07Ch 0124 4] Virtual GIC Interrupt : 00000000 +[080h 0128 8] Redistributor Base Address : 0000000000000000 +[088h 0136 8] ARM MPIDR : 0000000000000000 +[090h 0144 1] Efficiency Class : 00 +[091h 0145 1] Reserved : 00 +[092h 0146 2] SPE Overflow Interrupt : 0000 + +[094h 0148 1] Subtable Type : 0E [Generic Interrupt Redistributor] +[095h 0149 1] Length : 10 +[096h 0150 2] Reserved : 0000 +[098h 0152 8] Base Address : 00000000080A0000 +[0A0h 0160 4] Length : 00F60000 + +[0A4h 0164 1] Subtable Type : 0F [Generic Interrupt Translator] +[0A5h 0165 1] Length : 14 +[0A6h 0166 2] Reserved : 0000 +[0A8h 0168 4] Translation ID : 00000000 +[0ACh 0172 8] Base Address : 0000000008080000 +[0B4h 0180 4] Reserved : 00000000 IORT diff: +[000h 0000 4] Signature : "IORT" [IO Remapping Table] +[004h 0004 4] Table Length : 000000EC +[008h 0008 1] Revision : 03 +[009h 0009 1] Checksum : 57 +[00Ah 0010 6] Oem ID : "BOCHS " +[010h 0016 8] Oem Table ID : "BXPC " +[018h 0024 4] Oem Revision : 00000001 +[01Ch 0028 4] Asl Compiler ID : "BXPC" +[020h 0032 4] Asl Compiler Revision : 00000001 + +[024h 0036 4] Node Count : 00000003 +[028h 0040 4] Node Offset : 00000030 +[02Ch 0044 4] Reserved : 00000000 + +[030h 0048 1] Type : 00 +[031h 0049 2] Length : 0018 +[033h 0051 1] Revision : 01 +[034h 0052 4] Reserved : 00000000 +[038h 0056 4] Mapping Count : 00000000 +[03Ch 0060 4] Mapping Offset : 00000000 + +[040h 0064 4] ItsCount : 00000001 +[044h 0068 4] Identifiers : 00000000 + +[048h 0072 1] Type : 04 +[049h 0073 2] Length : 0058 +[04Bh 0075 1] Revision : 04 +[04Ch 0076 4] Reserved : 00000001 +[050h 0080 4] Mapping Count : 00000001 +[054h 0084 4] Mapping Offset : 00000044 + +[058h 0088 8] Base Address : 0000000009050000 +[060h 0096 4] Flags (decoded below) : 00000001 + COHACC Override : 1 + HTTU Override : 0 + Proximity Domain Valid : 0 +[064h 0100 4] Reserved : 00000000 +[068h 0104 8] VATOS Address : 0000000000000000 +[070h 0112 4] Model : 00000000 +[074h 0116 4] Event GSIV : 0000006A +[078h 0120 4] PRI GSIV : 0000006B +[07Ch 0124 4] GERR GSIV : 0000006D +[080h 0128 4] Sync GSIV : 0000006C +[084h 0132 4] Proximity Domain : 00000000 +[088h 0136 4] Device ID Mapping Index : 00000000 + +[08Ch 0140 4] Input base : 00000000 +[090h 0144 4] ID Count : 0000FFFF +[094h 0148 4] Output Base : 00000000 +[098h 0152 4] Output Reference : 00000030 +[09Ch 0156 4] Flags (decoded below) : 00000000 + Single Mapping : 0 + +[0A0h 0160 1] Type : 02 +[0A1h 0161 2] Length : 004C +[0A3h 0163 1] Revision : 03 +[0A4h 0164 4] Reserved : 00000002 +[0A8h 0168 4] Mapping Count : 00000002 +[0ACh 0172 4] Mapping Offset : 00000024 + +[0B0h 0176 8] Memory Properties : [IORT Memory Access Properties] +[0B0h 0176 4] Cache Coherency : 00000001 +[0B4h 0180 1] Hints (decoded below) : 00 + Transient : 0 + Write Allocate : 0 + Read Allocate : 0 + Override : 0 +[0B5h 0181 2] Reserved : 0000 +[0B7h 0183 1] Memory Flags (decoded below) : 03 + Coherency : 1 + Device Attribute : 1 +[0B8h 0184 4] ATS Attribute : 00000000 +[0BCh 0188 4] PCI Segment Number : 00000000 +[0C0h 0192 1] Memory Size Limit : 40 +[0C1h 0193 3] Reserved : 000000 + +[0C4h 0196 4] Input base : 00000000 +[0C8h 0200 4] ID Count : 000000FF +[0CCh 0204 4] Output Base : 00000000 +[0D0h 0208 4] Output Reference : 00000048 +[0D4h 0212 4] Flags (decoded below) : 00000000 + Single Mapping : 0 + +[0D8h 0216 4] Input base : 00000100 +[0DCh 0220 4] ID Count : 0000FEFF +[0E0h 0224 4] Output Base : 00000100 +[0E4h 0228 4] Output Reference : 00000030 +[0E8h 0232 4] Flags (decoded below) : 00000000 + Single Mapping : 0 Signed-off-by: Gustavo Romero --- tests/data/acpi/aarch64/virt/APIC.its_off | Bin 0 -> 184 bytes tests/data/acpi/aarch64/virt/IORT.its_off | Bin 0 -> 236 bytes tests/qtest/bios-tables-test-allowed-diff.h | 2 -- 3 files changed, 2 deletions(-) create mode 100644 tests/data/acpi/aarch64/virt/APIC.its_off create mode 100644 tests/data/acpi/aarch64/virt/IORT.its_off diff --git a/tests/data/acpi/aarch64/virt/APIC.its_off b/tests/data/acpi/aarch64/virt/APIC.its_off new file mode 100644 index 0000000000000000000000000000000000000000..37d82e970b1331cb5b259f0bd2d3654bacb2d623 GIT binary patch literal 184 zcmZ<^@O0k6z`($A(8=G~BUr&HBEVSz2pEB4AU24G0Uik$i-7~iVg@p}17JJ`2AFzr Zgb>LrJ^_#xE~p*f82CkCMsUFG1ppOZ2>}2A literal 0 HcmV?d00001 diff --git a/tests/data/acpi/aarch64/virt/IORT.its_off b/tests/data/acpi/aarch64/virt/IORT.its_off new file mode 100644 index 0000000000000000000000000000000000000000..0fceb820d509e852ca0849baf568a8e93e426738 GIT binary patch literal 236 zcmebD4+?q1z`(#9?&R<65v<@85#X!<1dKp25F11@1F-=RgMkDCNC*yK9F_TjFfcO#g+N#Zh@s|zoCF3AP#UU@ R!2`+%Dg6Hr$N|zYvjDIZ5CH%H literal 0 HcmV?d00001 diff --git a/tests/qtest/bios-tables-test-allowed-diff.h b/tests/qtest/bios-tables-test-allowed-diff.h index a88198d5c2..dfb8523c8b 100644 --- a/tests/qtest/bios-tables-test-allowed-diff.h +++ b/tests/qtest/bios-tables-test-allowed-diff.h @@ -1,3 +1 @@ /* List of comma-separated changed AML files to ignore */ -"tests/data/acpi/aarch64/virt/APIC.its_off", -"tests/data/acpi/aarch64/virt/IORT.its_off", From patchwork Mon Jun 23 13:57:48 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Gustavo Romero X-Patchwork-Id: 899240 Delivered-To: patch@linaro.org Received: by 2002:adf:e506:0:b0:3a6:d909:26ce with SMTP id j6csp878608wrm; Mon, 23 Jun 2025 07:02:06 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWHhYUNmiMWwOovyydBGGeNkRGNxeu0vm0MwC6lPHKnf910mTC1+kBEFM5Go6BPP5YDU+p/Tw==@linaro.org X-Google-Smtp-Source: AGHT+IGmKZieiJYE/Vj82mWUkXsFEzWuIS+z3SFDVBJ4jX9t6hNaP/VagfCZwT5DHSxua0lyAbzf X-Received: by 2002:a05:620a:472c:b0:7d3:dd53:9283 with SMTP id af79cd13be357-7d3fbf9b2e8mr1819770085a.7.1750687325887; Mon, 23 Jun 2025 07:02:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1750687325; cv=none; d=google.com; s=arc-20240605; b=StdUZT9LDs0XfMhz8In2EkJYd7OQR+lYcblCoRwa3a0tH6Y4qiPiLBtWnoEvPH0NtV xn2ZdAFQOSHP9nOFZa4sg7q0rKExZ/JmDyBtsFLUujPS+j1EkLy9uM5CODlkNI7yI+ai w53ARry+NeDur9BBhLgkS+hA38W8J11RCWZ2RivGfdoE6PuwyGOgBrchda1xYUHoljnn Nrv830CFunQfyThfP6Uf4e2iOgERggQvs6pGUyF/yRE+oiSyFo0v6RuHUneWLwseetnH TRuRfT3hH4u/o4+Ty9QoZT8zO4QseABbzr0+TP+eJ4ocfd90d8rTA5a/Fl9O/9j9t1jT 4TRQ== 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=IOV46Ps4a8FdPp4RmxE7rRFywBE4TgcqqV4mGLREwqI=; fh=NM4Ghk6du0xINoQVrcLOZNFqo57se3lAmHRoGLE2PMQ=; b=hEvNbiqnmSWmVBgd1fXtywK1NGzMjJIWAbN4Wudv+1NjtM2s9CAvf+cCK8iaVdjB7G Q0q1p2YqsHKtXbrMSo3tPT6g8gnAdAc+v5vmLt06+e6SG2DQdVckiUZBrEPRb8XZ20rx QG7RJp7S8AjN5eCenxgPNaijnTdoYosOMKrriMn772LT7DPfReI0RY8oeBm+Al9l2S1i sR1AlsuUIdZvcKrHWtDDdFCzL3JMMGjxL7DudkU8ktMIfycldWAoja00jkjPoHPIkMKf PTuyoJS6xO3zrHaFCe5iSW9/1ZuXt3zif5ErINx9tmvr5q6rPD8NIkfisunZltlUr6mm c+vQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ZxThlQyg; 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-7d3f999e640si792738485a.8.2025.06.23.07.02.05 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 23 Jun 2025 07:02:05 -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=ZxThlQyg; 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 1uThhf-0000Bi-6O; Mon, 23 Jun 2025 09:59:19 -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 1uThhK-0008NC-2X for qemu-devel@nongnu.org; Mon, 23 Jun 2025 09:59:03 -0400 Received: from mail-pf1-x42b.google.com ([2607:f8b0:4864:20::42b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1uThhH-0007Jp-6p for qemu-devel@nongnu.org; Mon, 23 Jun 2025 09:58:57 -0400 Received: by mail-pf1-x42b.google.com with SMTP id d2e1a72fcca58-7406c6dd2b1so3233828b3a.0 for ; Mon, 23 Jun 2025 06:58:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1750687132; x=1751291932; 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=IOV46Ps4a8FdPp4RmxE7rRFywBE4TgcqqV4mGLREwqI=; b=ZxThlQyg1ZSim0yRiNdGMgsonDQz6NI+QoIn+eYdyN5ckVhc5WsKJF8Sbp4YUDMgNP iKwae4B/R9uGzLKVBS0QTXMPu3f49ghw3od36MF9amVsBaKK7uvITT+EfseL5ncIPKkF lt0AJ2T22ItfTQCXsrpacplYLcnq72ZEyyxs9OxYHPPY4jHMCDa+SGEvZXT5lRXhysV+ yLG+MAPMbEdzDs74Gmv2ohogQMf2uNrSiHMs3Buvx6hdsp1GFjJ8AszBBKGxfBcaZzyv hfClgEZ0SNS4UDSAG8lUg9tgBpGLnoT7UM6HDTxMvRn5sVD3uuYFdldXVvqToj1tYrpH 0gFw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1750687132; x=1751291932; 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=IOV46Ps4a8FdPp4RmxE7rRFywBE4TgcqqV4mGLREwqI=; b=u4LsO98OQgemtqylZ7fWphmIYtrd2+x2vCIdKPxyWoDcSyqKnb8ZPBQ731sJ6f6sHd y794SBgQm8WTvRd3lPjvjS/6vfh/5yk3ekiv/J5M+hKTM96WxdTDjbTZmVz5xT9wwXMI uiqERgOaExfF7YZ/AITEyL5v27jJ2/0GGTGejDsqObz5ZT/allXWQ3PjvrREkSb9faLK WrIGfWztx8wMa132+ZnIsphHhlxhkCXpsR1vstXEPE/DtDkCrvWVZ073SjsdV9zZRJyl HOAAhwOQgvmO+GIMFlyVkguqRXxfLTMdeVaw85KrFwbA8mwxYJsnO5wlJLpEBfawAAWJ ECkQ== X-Gm-Message-State: AOJu0YzwS+Du8zOXSSrjXfeGi6+At8fY6iSRZ/q7BxSYw5RtxlKyBzP9 fQ9Eo41eo3fq/q9hpIG5tntf3F6BwxCGhq5TNfMVGdByF+6M0AuyE+iElHTQOUAzprHGn3r9eFg 2vLve X-Gm-Gg: ASbGncubG/wFFq0JqTe7ZCnJ1U6Zlt3odcEEwhiUiwY6L2u9Xul0N1RqrGjXgeqZu6t ivIhUex662LBb9+fYtaLKohKG7kJZ4zbKYbWh5SRs+nT8P3TfxFy+U7t41kwzhTraRLhp2R2lMq HgNbR/mvjNDcmjxIUdn62DJAjfMX/3CP0s7uhxdZjGY07FZhrF2RSB2H7L9Qoleyi9USkZewUKQ neVNbBw//0WzKe7zZTKSXtJpHHfYiBLZSVwFVc6eyBQE0ZQD9Cvuk3tU0DIUtUdhi5rkXVPAFsz 0GkpgQ5ZeAP0Fb6g2g0yrgIp0xp8WSJLwIQeBnxbJrudl7eyn1NutCpBqoQUCou1tTI= X-Received: by 2002:a05:6a21:3387:b0:218:183b:ccaa with SMTP id adf61e73a8af0-220292ec76fmr18167176637.17.1750687131541; Mon, 23 Jun 2025 06:58:51 -0700 (PDT) Received: from gromero0.. ([186.215.58.88]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-b31f119eb64sm8063490a12.31.2025.06.23.06.58.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 23 Jun 2025 06:58:51 -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 v5 8/9] hw/arm/virt-acpi-build: Fix ACPI IORT and MADT tables when its=off Date: Mon, 23 Jun 2025 13:57:48 +0000 Message-Id: <20250623135749.691137-9-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::42b; envelope-from=gustavo.romero@linaro.org; helo=mail-pf1-x42b.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.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 Currently, the ITS Group nodes in the IORT table and the GIC ITS Struct in the MADT table are always generated, even if GIC ITS is not available on the machine. This commit fixes it by not generating the ITS Group nodes, not mapping any other node to them, and not advertising the GIC ITS in the MADT table, when GIC ITS is not available on the machine. Since the fix changes the MADT and IORT tables, add the blobs for the "its=off" test to the allow list and update them in the next commit. Reported-by: Udo Steinberg Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2886 Signed-off-by: Gustavo Romero Co-authored-by: Philippe Mathieu-Daudé --- hw/arm/virt-acpi-build.c | 128 ++++++++++++-------- tests/qtest/bios-tables-test-allowed-diff.h | 2 + 2 files changed, 80 insertions(+), 50 deletions(-) diff --git a/hw/arm/virt-acpi-build.c b/hw/arm/virt-acpi-build.c index 40a782a498..17ae46804a 100644 --- a/hw/arm/virt-acpi-build.c +++ b/hw/arm/virt-acpi-build.c @@ -328,17 +328,27 @@ build_iort(GArray *table_data, BIOSLinker *linker, VirtMachineState *vms) /* Sort the smmu idmap by input_base */ g_array_sort(smmu_idmaps, iort_idmap_compare); - /* - * Knowing the ID ranges from the RC to the SMMU, it's possible to - * determine the ID ranges from RC that go directly to ITS. - */ - create_its_idmaps(its_idmaps, smmu_idmaps); - - nb_nodes = 3; /* RC, ITS, SMMUv3 */ - rc_mapping_count = smmu_idmaps->len + its_idmaps->len; + nb_nodes = 2; /* RC and SMMUv3 */ + rc_mapping_count = smmu_idmaps->len; + + if (vms->its) { + /* + * Knowing the ID ranges from the RC to the SMMU, it's possible to + * determine the ID ranges from RC that go directly to ITS. + */ + create_its_idmaps(its_idmaps, smmu_idmaps); + + nb_nodes++; /* ITS */ + rc_mapping_count += its_idmaps->len; + } } else { - nb_nodes = 2; /* RC, ITS */ - rc_mapping_count = 1; + if (vms->its) { + nb_nodes = 2; /* RC and ITS */ + rc_mapping_count = 1; /* Direct map to ITS */ + } else { + nb_nodes = 1; /* RC only */ + rc_mapping_count = 0; /* No output mapping */ + } } /* Number of IORT Nodes */ build_append_int_noprefix(table_data, nb_nodes, 4); @@ -347,31 +357,43 @@ build_iort(GArray *table_data, BIOSLinker *linker, VirtMachineState *vms) build_append_int_noprefix(table_data, IORT_NODE_OFFSET, 4); build_append_int_noprefix(table_data, 0, 4); /* Reserved */ - /* Table 12 ITS Group Format */ - build_append_int_noprefix(table_data, 0 /* ITS Group */, 1); /* Type */ - node_size = 20 /* fixed header size */ + 4 /* 1 GIC ITS Identifier */; - build_append_int_noprefix(table_data, node_size, 2); /* Length */ - build_append_int_noprefix(table_data, 1, 1); /* Revision */ - build_append_int_noprefix(table_data, id++, 4); /* Identifier */ - build_append_int_noprefix(table_data, 0, 4); /* Number of ID mappings */ - build_append_int_noprefix(table_data, 0, 4); /* Reference to ID Array */ - build_append_int_noprefix(table_data, 1, 4); /* Number of ITSs */ - /* GIC ITS Identifier Array */ - build_append_int_noprefix(table_data, 0 /* MADT translation_id */, 4); + if (vms->its) { + /* Table 12 ITS Group Format */ + build_append_int_noprefix(table_data, 0 /* ITS Group */, 1); /* Type */ + node_size = 20 /* fixed header size */ + 4 /* 1 GIC ITS Identifier */; + build_append_int_noprefix(table_data, node_size, 2); /* Length */ + build_append_int_noprefix(table_data, 1, 1); /* Revision */ + build_append_int_noprefix(table_data, id++, 4); /* Identifier */ + build_append_int_noprefix(table_data, 0, 4); /* Number of ID mappings */ + build_append_int_noprefix(table_data, 0, 4); /* Reference to ID Array */ + build_append_int_noprefix(table_data, 1, 4); /* Number of ITSs */ + /* GIC ITS Identifier Array */ + build_append_int_noprefix(table_data, 0 /* MADT translation_id */, 4); + } if (vms->iommu == VIRT_IOMMU_SMMUV3) { int irq = vms->irqmap[VIRT_SMMU] + ARM_SPI_BASE; - + int num_id_mappings, offset_to_id_array; + + if (vms->its) { + num_id_mappings = 1; /* ITS Group node */ + offset_to_id_array = SMMU_V3_ENTRY_SIZE; /* Just after the header */ + } else { + num_id_mappings = 0; /* No ID mappings */ + offset_to_id_array = 0; /* No ID mappings array */ + } smmu_offset = table_data->len - table.table_offset; /* Table 9 SMMUv3 Format */ build_append_int_noprefix(table_data, 4 /* SMMUv3 */, 1); /* Type */ - node_size = SMMU_V3_ENTRY_SIZE + ID_MAPPING_ENTRY_SIZE; + node_size = SMMU_V3_ENTRY_SIZE + + (ID_MAPPING_ENTRY_SIZE * num_id_mappings); build_append_int_noprefix(table_data, node_size, 2); /* Length */ build_append_int_noprefix(table_data, 4, 1); /* Revision */ build_append_int_noprefix(table_data, id++, 4); /* Identifier */ - build_append_int_noprefix(table_data, 1, 4); /* Number of ID mappings */ + /* Number of ID mappings */ + build_append_int_noprefix(table_data, num_id_mappings, 4); /* Reference to ID Array */ - build_append_int_noprefix(table_data, SMMU_V3_ENTRY_SIZE, 4); + build_append_int_noprefix(table_data, offset_to_id_array, 4); /* Base address */ build_append_int_noprefix(table_data, vms->memmap[VIRT_SMMU].base, 8); /* Flags */ @@ -387,9 +409,11 @@ build_iort(GArray *table_data, BIOSLinker *linker, VirtMachineState *vms) build_append_int_noprefix(table_data, 0, 4); /* Proximity domain */ /* DeviceID mapping index (ignored since interrupts are GSIV based) */ build_append_int_noprefix(table_data, 0, 4); - - /* Output IORT node is the ITS Group node (the first node) */ - build_iort_id_mapping(table_data, 0, 0x10000, IORT_NODE_OFFSET); + /* Array of ID mappings */ + if (num_id_mappings) { + /* Output IORT node is the ITS Group node (the first node). */ + build_iort_id_mapping(table_data, 0, 0x10000, IORT_NODE_OFFSET); + } } /* Table 17 Root Complex Node */ @@ -430,7 +454,7 @@ build_iort(GArray *table_data, BIOSLinker *linker, VirtMachineState *vms) * * N.B.: The mapping from SMMUv3 to ITS Group node (SMMUv3 -> ITS) is * defined in the SMMUv3 table, where all SMMUv3 IDs are mapped to the - * ITS Group node. + * ITS Group node, if ITS is available. */ for (i = 0; i < smmu_idmaps->len; i++) { range = &g_array_index(smmu_idmaps, AcpiIortIdMapping, i); @@ -439,15 +463,17 @@ build_iort(GArray *table_data, BIOSLinker *linker, VirtMachineState *vms) range->id_count, smmu_offset); } - /* - * Map bypassed (don't go throught the SMMU) RIDs (input) to ITS Group - * node directly: RC -> ITS. - */ - for (i = 0; i < its_idmaps->len; i++) { - range = &g_array_index(its_idmaps, AcpiIortIdMapping, i); - /* Output IORT node is the ITS Group node (the first node). */ - build_iort_id_mapping(table_data, range->input_base, - range->id_count, IORT_NODE_OFFSET); + if (vms->its) { + /* + * Map bypassed (don't go throught the SMMU) RIDs (input) to ITS Group + * node directly: RC -> ITS. + */ + for (i = 0; i < its_idmaps->len; i++) { + range = &g_array_index(its_idmaps, AcpiIortIdMapping, i); + /* Output IORT node is the ITS Group node (the first node). */ + build_iort_id_mapping(table_data, range->input_base, + range->id_count, IORT_NODE_OFFSET); + } } } else { /* @@ -768,18 +794,20 @@ build_madt(GArray *table_data, BIOSLinker *linker, VirtMachineState *vms) memmap[VIRT_HIGH_GIC_REDIST2].size); } - /* - * 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 */ + if (vms->its) { + /* + * 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; diff --git a/tests/qtest/bios-tables-test-allowed-diff.h b/tests/qtest/bios-tables-test-allowed-diff.h index dfb8523c8b..a88198d5c2 100644 --- a/tests/qtest/bios-tables-test-allowed-diff.h +++ b/tests/qtest/bios-tables-test-allowed-diff.h @@ -1 +1,3 @@ /* List of comma-separated changed AML files to ignore */ +"tests/data/acpi/aarch64/virt/APIC.its_off", +"tests/data/acpi/aarch64/virt/IORT.its_off", From patchwork Mon Jun 23 13:57:49 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gustavo Romero X-Patchwork-Id: 899234 Delivered-To: patch@linaro.org Received: by 2002:adf:e506:0:b0:3a6:d909:26ce with SMTP id j6csp876877wrm; Mon, 23 Jun 2025 06:59:50 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUoQcNXDEG0uPSCP31HcyD1u5gnrKHLMuozb/sCukNODFzBXgO76jtBvorUadA2Rz8YWN8grw==@linaro.org X-Google-Smtp-Source: AGHT+IHJJYWI99dUay09KLY80bwak4dSXd52e9tjCbPRQVvh6ZhnuMBBrn+uaqHYG1HUSg+vniOA X-Received: by 2002:a05:6214:62e:b0:6fa:c81a:6207 with SMTP id 6a1803df08f44-6fd0a4661e6mr176887966d6.9.1750687190262; Mon, 23 Jun 2025 06:59:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1750687190; cv=none; d=google.com; s=arc-20240605; b=BIdzfSMqtqzmIIUweTzYrp0RWrFxoy8Iwnh1OwsCqBMvTO4W34j0SrvVFfIJX1NGeT gsRIVwAP7O31PnIaI2naGinBdu8l7ZEKeOOnNl8prejojIrDIlNj8oz1lMjXT6mWz5js 1nFZZl9pylqpthjPdCkzXt3CMJ18KET+Tu26f3fslGVYCKbah+P99r3q8MVBv+ZJrGPS mIpPH6JPCa3QudAhG2HYdF+/NQ7V8gyBFD35fS5q5oE00iA6L+Kh0K0IVkULoiQwnXcg m++O8MpUX7FJ18nmRR5/uS7RuO1NyMeuMQ4lHXSGVr2veYWgX23x7dtpWlxUNEFMmWF4 cReA== 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=p0/yq+vfIvmjKZWamcj479Q+dBed8z1l1/92Ss/Ji20=; fh=NM4Ghk6du0xINoQVrcLOZNFqo57se3lAmHRoGLE2PMQ=; b=TCTEWP7L/kqep6GUEvzvsl6hW2L4/cqKx92mTTRo2XCSkDYZBGrb3zp08PFh8IH/IO cH1melM0lxMT4s99vk3ie8Ezpquq8/neOwp6i4ie68iC1PTPhVyrSQcbgaAx7RLy85P8 xihICqczLR4IN1qxQo2GPeoaz2B3/VEwkhYPfHNQ5QM5jdYCeVHW/pmjvKUdpdGZ8CP0 pr3U81ctRrhgoAEK8ip7FT+thas1QY2gCQWaI9eKPfhTj+GBFXnx4lp7sm56BVrkVFVy K5qzkAbGnT4xIv9b1e+Re38dJcJKFGSns2Dn0X52prw0m1I8vla5pEkaniudfPG9EdMl tnew==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=shBL9ks6; 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 6a1803df08f44-6fd0943af3fsi86751236d6.132.2025.06.23.06.59.50 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 23 Jun 2025 06:59:50 -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=shBL9ks6; 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 1uThhd-00009H-Fi; Mon, 23 Jun 2025 09:59:17 -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 1uThhN-0008Oj-Qy for qemu-devel@nongnu.org; Mon, 23 Jun 2025 09:59:03 -0400 Received: from mail-pf1-x42a.google.com ([2607:f8b0:4864:20::42a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1uThhJ-0007Kc-02 for qemu-devel@nongnu.org; Mon, 23 Jun 2025 09:58:59 -0400 Received: by mail-pf1-x42a.google.com with SMTP id d2e1a72fcca58-7424ccbef4eso3244769b3a.2 for ; Mon, 23 Jun 2025 06:58:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1750687135; x=1751291935; 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=p0/yq+vfIvmjKZWamcj479Q+dBed8z1l1/92Ss/Ji20=; b=shBL9ks6fkfkSvfoavDk7S7qmZStuCiUgz4NVJzL1IiuzLPO27hBY+MLJ46Jpo1SmG IfHYn+xPfnTdbhn0peI5wWflsqTdo5fg6LAnt2ZWwjySnhG1Ab8+n10fAMknTXY1OiPA /cdPLVHXJqI+9S+DyfqlNASniu+GEvhJav5GyOsNe6yKWiA9GWn0WAB4p2KhMGd7C7vT 3Fy68mCy65h5n7qkPZMSGzy46jvR4atu7MEhHs3Fz3cWdfeZgQ2ozOsDyvOl7pDXsADd kdat245jRpf9SIuRRBT4PCzfxdIMI9mUTbGSr34lA7iCi70F6jDFWcovJD8gx2nIo3lY MR+A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1750687135; x=1751291935; 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=p0/yq+vfIvmjKZWamcj479Q+dBed8z1l1/92Ss/Ji20=; b=etP/MmA8fsDS07rZGLpvVW14pfZTqUNHxYYty8II9WRds62grHwwGenzAcsd0IgGiT aRR3uZmc+fQZC45b3CUPMbxbF0g+bXCjxcsXOcncS2ULcp08S9SxayklU6771yO/rpiu JF27sZFP+SDSc/GXIWtEdCfSLLhZ+LoA6PlRm10aNd0NSzaMGnp9v72qyT9z1AlQaJMq tf3C3RYk+fWZiXVQow7LATxeZFLZineL4TSkzC6fo0gL6RFoFy9Wj1ahpSBCzEF9HDXN EslLkIwiIgoPSiqItJxoedlBB7O7oXpsbZh6KyfMj6b8NzC7QjnKxiRW+wwzWohbu0OG c/6Q== X-Gm-Message-State: AOJu0Yya/Ghi+WVvDr54KNO6otLmqZ/YfAhZufJm8tf3HiyamtwVC1Pj sra90cBLhn1Wm67c5wuZlFWxzeoN+uD6y5KkYJ/xHenTdKf/u5o4so+BUn97AbzOO5ceIwnbOml oxl25 X-Gm-Gg: ASbGncuTrnO+6TsgeOx1erUCrtfjkpRai6/eiHr9E9ol/MzKogzkSgsVVSmz4coR4zU QADs/VN3nprY2YqfdbTIzLtpqj0JqwhAeMp2btCN3belQvDnN9+ohKnR4OrVodz5eSZvVq5JLTz QY1n3tQs2ej+eTO2K0reUfzxEf6XUufIk88CO1vHsgANeFyMm5PX0AKubrZL/l5nHlkxjeKh2qy f7+sg0+UzMv2pkd3q+2yK16CK/Qv8Qqawc+mJYQnwHNKZ6Zu1TEQJnkwSX1jM1UlpQy9nZOa3Lt Ma2cE1itlWcs0oOIq6xQNiy9O4zRZ39dGvoAT5NvP7MP2NndvPG4GWN0NO3aHKGAvS4= X-Received: by 2002:a05:6a21:648f:b0:21f:31d9:593b with SMTP id adf61e73a8af0-22026ff5037mr18853654637.37.1750687135181; Mon, 23 Jun 2025 06:58:55 -0700 (PDT) Received: from gromero0.. ([186.215.58.88]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-b31f119eb64sm8063490a12.31.2025.06.23.06.58.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 23 Jun 2025 06:58:54 -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 v5 9/9] qtest/bios-tables-test: Update blobs for its=off test on aarch64 Date: Mon, 23 Jun 2025 13:57:49 +0000 Message-Id: <20250623135749.691137-10-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::42a; envelope-from=gustavo.romero@linaro.org; helo=mail-pf1-x42a.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 Update blobs for the its=off test on aarch64 after fix. Basically, all structs related to ITS are gone in MADT and IORT tables after the fix (previously ITS was not properly disabled when "its=off" option was passed to the machine). MADT diff: [000h 0000 4] Signature : "APIC" [Multiple APIC Description Table (MADT)] -[004h 0004 4] Table Length : 000000B8 +[004h 0004 4] Table Length : 000000A4 [008h 0008 1] Revision : 04 -[009h 0009 1] Checksum : C1 +[009h 0009 1] Checksum : 08 [00Ah 0010 6] Oem ID : "BOCHS " [010h 0016 8] Oem Table ID : "BXPC " [018h 0024 4] Oem Revision : 00000001 [01Ch 0028 4] Asl Compiler ID : "BXPC" [020h 0032 4] Asl Compiler Revision : 00000001 [024h 0036 4] Local Apic Address : 00000000 [028h 0040 4] Flags (decoded below) : 00000000 PC-AT Compatibility : 0 [02Ch 0044 1] Subtable Type : 0C [Generic Interrupt Distributor] [02Dh 0045 1] Length : 18 [02Eh 0046 2] Reserved : 0000 [030h 0048 4] Local GIC Hardware ID : 00000000 [034h 0052 8] Base Address : 0000000008000000 [03Ch 0060 4] Interrupt Base : 00000000 @@ -48,37 +48,29 @@ [064h 0100 8] Base Address : 0000000000000000 [06Ch 0108 8] Virtual GIC Base Address : 0000000000000000 [074h 0116 8] Hypervisor GIC Base Address : 0000000000000000 [07Ch 0124 4] Virtual GIC Interrupt : 00000000 [080h 0128 8] Redistributor Base Address : 0000000000000000 [088h 0136 8] ARM MPIDR : 0000000000000000 [090h 0144 1] Efficiency Class : 00 [091h 0145 1] Reserved : 00 [092h 0146 2] SPE Overflow Interrupt : 0000 [094h 0148 1] Subtable Type : 0E [Generic Interrupt Redistributor] [095h 0149 1] Length : 10 [096h 0150 2] Reserved : 0000 [098h 0152 8] Base Address : 00000000080A0000 [0A0h 0160 4] Length : 00F60000 -[0A4h 0164 1] Subtable Type : 0F [Generic Interrupt Translator] -[0A5h 0165 1] Length : 14 -[0A6h 0166 2] Reserved : 0000 -[0A8h 0168 4] Translation ID : 00000000 -[0ACh 0172 8] Base Address : 0000000008080000 -[0B4h 0180 4] Reserved : 00000000 IORT diff: [000h 0000 4] Signature : "IORT" [IO Remapping Table] -[004h 0004 4] Table Length : 000000EC +[004h 0004 4] Table Length : 000000AC [008h 0008 1] Revision : 03 -[009h 0009 1] Checksum : 57 +[009h 0009 1] Checksum : 97 [00Ah 0010 6] Oem ID : "BOCHS " [010h 0016 8] Oem Table ID : "BXPC " [018h 0024 4] Oem Revision : 00000001 [01Ch 0028 4] Asl Compiler ID : "BXPC" [020h 0032 4] Asl Compiler Revision : 00000001 -[024h 0036 4] Node Count : 00000003 +[024h 0036 4] Node Count : 00000002 [028h 0040 4] Node Offset : 00000030 [02Ch 0044 4] Reserved : 00000000 -[030h 0048 1] Type : 00 -[031h 0049 2] Length : 0018 -[033h 0051 1] Revision : 01 +[030h 0048 1] Type : 04 +[031h 0049 2] Length : 0044 +[033h 0051 1] Revision : 04 [034h 0052 4] Reserved : 00000000 [038h 0056 4] Mapping Count : 00000000 [03Ch 0060 4] Mapping Offset : 00000000 -[040h 0064 4] ItsCount : 00000001 -[044h 0068 4] Identifiers : 00000000 - -[048h 0072 1] Type : 04 -[049h 0073 2] Length : 0058 -[04Bh 0075 1] Revision : 04 -[04Ch 0076 4] Reserved : 00000001 -[050h 0080 4] Mapping Count : 00000001 -[054h 0084 4] Mapping Offset : 00000044 - -[058h 0088 8] Base Address : 0000000009050000 -[060h 0096 4] Flags (decoded below) : 00000001 +[040h 0064 8] Base Address : 0000000009050000 +[048h 0072 4] Flags (decoded below) : 00000001 COHACC Override : 1 HTTU Override : 0 Proximity Domain Valid : 0 -[064h 0100 4] Reserved : 00000000 -[068h 0104 8] VATOS Address : 0000000000000000 -[070h 0112 4] Model : 00000000 -[074h 0116 4] Event GSIV : 0000006A -[078h 0120 4] PRI GSIV : 0000006B -[07Ch 0124 4] GERR GSIV : 0000006D -[080h 0128 4] Sync GSIV : 0000006C -[084h 0132 4] Proximity Domain : 00000000 -[088h 0136 4] Device ID Mapping Index : 00000000 - -[08Ch 0140 4] Input base : 00000000 -[090h 0144 4] ID Count : 0000FFFF -[094h 0148 4] Output Base : 00000000 -[098h 0152 4] Output Reference : 00000030 -[09Ch 0156 4] Flags (decoded below) : 00000000 - Single Mapping : 0 - -[0A0h 0160 1] Type : 02 -[0A1h 0161 2] Length : 004C -[0A3h 0163 1] Revision : 03 -[0A4h 0164 4] Reserved : 00000002 -[0A8h 0168 4] Mapping Count : 00000002 -[0ACh 0172 4] Mapping Offset : 00000024 - -[0B0h 0176 8] Memory Properties : [IORT Memory Access Properties] -[0B0h 0176 4] Cache Coherency : 00000001 -[0B4h 0180 1] Hints (decoded below) : 00 +[04Ch 0076 4] Reserved : 00000000 +[050h 0080 8] VATOS Address : 0000000000000000 +[058h 0088 4] Model : 00000000 +[05Ch 0092 4] Event GSIV : 0000006A +[060h 0096 4] PRI GSIV : 0000006B +[064h 0100 4] GERR GSIV : 0000006D +[068h 0104 4] Sync GSIV : 0000006C +[06Ch 0108 4] Proximity Domain : 00000000 +[070h 0112 4] Device ID Mapping Index : 00000000 + +[074h 0116 1] Type : 02 +[075h 0117 2] Length : 0038 +[077h 0119 1] Revision : 03 +[078h 0120 4] Reserved : 00000001 +[07Ch 0124 4] Mapping Count : 00000001 +[080h 0128 4] Mapping Offset : 00000024 + +[084h 0132 8] Memory Properties : [IORT Memory Access Properties] +[084h 0132 4] Cache Coherency : 00000001 +[088h 0136 1] Hints (decoded below) : 00 Transient : 0 Write Allocate : 0 Read Allocate : 0 Override : 0 -[0B5h 0181 2] Reserved : 0000 -[0B7h 0183 1] Memory Flags (decoded below) : 03 +[089h 0137 2] Reserved : 0000 +[08Bh 0139 1] Memory Flags (decoded below) : 03 Coherency : 1 Device Attribute : 1 -[0B8h 0184 4] ATS Attribute : 00000000 -[0BCh 0188 4] PCI Segment Number : 00000000 -[0C0h 0192 1] Memory Size Limit : 40 -[0C1h 0193 3] Reserved : 000000 - -[0C4h 0196 4] Input base : 00000000 -[0C8h 0200 4] ID Count : 000000FF -[0CCh 0204 4] Output Base : 00000000 -[0D0h 0208 4] Output Reference : 00000048 -[0D4h 0212 4] Flags (decoded below) : 00000000 - Single Mapping : 0 - -[0D8h 0216 4] Input base : 00000100 -[0DCh 0220 4] ID Count : 0000FEFF -[0E0h 0224 4] Output Base : 00000100 -[0E4h 0228 4] Output Reference : 00000030 -[0E8h 0232 4] Flags (decoded below) : 00000000 +[08Ch 0140 4] ATS Attribute : 00000000 +[090h 0144 4] PCI Segment Number : 00000000 +[094h 0148 1] Memory Size Limit : 40 +[095h 0149 3] Reserved : 000000 + +[098h 0152 4] Input base : 00000000 +[09Ch 0156 4] ID Count : 000000FF +[0A0h 0160 4] Output Base : 00000000 +[0A4h 0164 4] Output Reference : 00000030 +[0A8h 0168 4] Flags (decoded below) : 00000000 Single Mapping : 0 Signed-off-by: Gustavo Romero --- tests/data/acpi/aarch64/virt/APIC.its_off | Bin 184 -> 164 bytes tests/data/acpi/aarch64/virt/IORT.its_off | Bin 236 -> 172 bytes tests/qtest/bios-tables-test-allowed-diff.h | 2 -- 3 files changed, 2 deletions(-) diff --git a/tests/data/acpi/aarch64/virt/APIC.its_off b/tests/data/acpi/aarch64/virt/APIC.its_off index 37d82e970b1331cb5b259f0bd2d3654bacb2d623..6130cb7d07103b326feb4dcd7034f85808bebadf 100644 GIT binary patch delta 18 ZcmdnNxP+0*F~HM#2?GNI3&%vRSpY2+1Zw~Q delta 39 jcmZ3&xPy_)F~HM#2Ll5G%fX3UvqbnsfJ`vp;DE6JqX7kf diff --git a/tests/data/acpi/aarch64/virt/IORT.its_off b/tests/data/acpi/aarch64/virt/IORT.its_off index 0fceb820d509e852ca0849baf568a8e93e426738..c10da4e61dd00e7eb062558a2735d49ca0b20620 100644 GIT binary patch delta 69 zcmaFExQ3C-(?2L=4FdxM^Yn>aQj$zSmH`lh0E-I)3xowECx)7HGFdP%GXmL+6IZHp Hz*GSMclZc% literal 236 zcmebD4+?q1z`(#9?&R<65v<@85#X!<1dKp25F11@1F-=RgMkDCNC*yK9F_TjFfcO#g+N#Zh@s|zoCF3AP#UU@ R!2`+%Dg6Hr$N|zYvjDIZ5CH%H diff --git a/tests/qtest/bios-tables-test-allowed-diff.h b/tests/qtest/bios-tables-test-allowed-diff.h index a88198d5c2..dfb8523c8b 100644 --- a/tests/qtest/bios-tables-test-allowed-diff.h +++ b/tests/qtest/bios-tables-test-allowed-diff.h @@ -1,3 +1 @@ /* List of comma-separated changed AML files to ignore */ -"tests/data/acpi/aarch64/virt/APIC.its_off", -"tests/data/acpi/aarch64/virt/IORT.its_off",