From nobody Fri Nov 14 23:28:55 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1759847119; cv=none; d=zohomail.com; s=zohoarc; b=Zbq/jKnuxBQ8BvdGq2oPLmQ9j9IfRKHMx/caV8AiXlEg41zBP+AnyBgl9+XfoRGBJ8DEt6wrjwXsS6mxliHVbEPchLc0W0uc5n9y0EIgTXOY8+ym3fkuxTj4DF2KWfs75ZM9wqkPWFbjBg3uVFKEGeAUB3JwBXEqlg4XuApleQM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1759847119; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To:Cc; bh=tGVyZTzYATyCeTWWOlBiNol/uabWyBP70eHig5Rs8QI=; b=PntzYypIqcLlpwDqDzIndjfjaZlq2V3Jrdl4AMOHDDVEpxJYszyqJ2LpYMj5uQgx87wp6CIlXhnlgbaZB52dD4ZHburLU6CPosIIE8eZVAmIbI8JcVYIQ2v1StkyjfLv7+k3iW0nRPPCX/sDFAaojV9kBTehkcHOltmE9fvXg6o= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1759847119448714.6029205882463; Tue, 7 Oct 2025 07:25:19 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1v68Qs-0005zU-JL; Tue, 07 Oct 2025 10:12:51 -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 1v68QY-0005pU-1A for qemu-devel@nongnu.org; Tue, 07 Oct 2025 10:12:30 -0400 Received: from mail-wm1-x32a.google.com ([2a00:1450:4864:20::32a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1v68QI-0002He-N2 for qemu-devel@nongnu.org; Tue, 07 Oct 2025 10:12:27 -0400 Received: by mail-wm1-x32a.google.com with SMTP id 5b1f17b1804b1-46e6a689bd0so49724485e9.1 for ; Tue, 07 Oct 2025 07:12:08 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-46e78c5d290sm167037135e9.0.2025.10.07.07.12.04 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Oct 2025 07:12:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1759846326; x=1760451126; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=tGVyZTzYATyCeTWWOlBiNol/uabWyBP70eHig5Rs8QI=; b=HoCgklq8a7307Ym8pLYYHzbvjq6zQWh/Oi/Tu9l//Nh1TW/ntsqXuIqUHCGYv+Qgmp DN3/5lXvMm5ab+II2lsaAUsGhUZudmfJJlCzijGl8peQdSdZ6L8t+a5U89dUOTn47gJi dk2ecB444UkRKWuFULuFvAMhA7Ow2sEUgxAiDCWwiVJKWFtqDxbbt2BqfePaLdSef819 a+UFZIqLPM4tuajOufWZjw44KQSMVJ+DhkD9KHrifU+2zUm7ZEaFdQTwW841TNj4/0RM IRxjxc2CjfjhAOyojOWsHoWNEa36IMJsgbFBe1DWzt+pEn7ae7xGiyGsDvc1CyFq1BDV I3cQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1759846326; x=1760451126; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=tGVyZTzYATyCeTWWOlBiNol/uabWyBP70eHig5Rs8QI=; b=lSMLqXBWTpNauKU0cV1rcuJ8QnsfPE/Lqj4CTAisbhZQT/CVbj/rQOqhvpu5dTe/pM 003xHzAq5IKV8TkkWlylHvSsRM2tA8GY5M3Z0D2pyWFZrxrz45r5SbOgeRjcRo/E8gE3 X/g6YUB0BjovD93ERymFpgkWPMNklYCKMneIns26neS4VuxR6sPfm0a8fWPO1cZCB+s/ JHZidY7+kV7QepXEAbUWNIgrZejrUAp2+CZBxWyKwocol8D70F4NzO6yvHu1ntXOh35F IrFqrgc76W2Rc1c2rivWMMYciN2QJs27Y+z9uuoUD7M7XPe0+asKX1Pyv0K6dgEBQemg MF/w== X-Gm-Message-State: AOJu0YxtU+j60RhjbCJJt87B307RkXzSFg0uAw/6EDj8rD8SQtRl/Bzt Ib3G4Zuv0D+XPwHdVCoh2FaQd0DCpqz8XQoxyB7m0SoaVo+dmV3fG9WVNJhzWeGAhsIVi1vzK42 WOv0d X-Gm-Gg: ASbGncuV0jc5vzM2+MZZAkYF530tf3l5WD7npUWXZPaJxT67YThauxsdOhAu7vtvoNa X6yy9SE8ZubYUoVOgboUeqE0SO+6rzySJCeib+s0UBF19DFZrPPWFuF2ZdBDvf5bf/58n0KLSEX 7LEvVdYbTimjQhx7Lq2Zxn6Eoaa8By3WywEkEwXCxOqCpi+LtCX/8XjNtk4nSTjfzOPDmt3GmL1 YxIpRAntPnU1PaUJl6jIiVQB1rLA1uJN8XkdELZ3PSEeLfdZOwrVRAmN7i0Cnkr1P8U53hJ0rUt 7vzscUlBelOcI9TmIOkqsu9P0XkKgnsbNGEH14x3uBwsUOgohhPpC8YOeNuiRsEHf1M1UnmpC3J 6Ywg2hOlXhm641Btagfyb1p6YB2HjHHLnUrr1BN1bmp8l6/VZnflU3T3w X-Google-Smtp-Source: AGHT+IEU+XmxM1GR470I57wyEdW+7hCSsORnDfRjMTipsgQMR5of7E/AyDgkgs6gEMgpno/mD/h/lw== X-Received: by 2002:a05:600c:8185:b0:46e:3f6f:a8ee with SMTP id 5b1f17b1804b1-46e7110c256mr98066035e9.13.1759846325934; Tue, 07 Oct 2025 07:12:05 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 38/62] hw/arm/xlnx-versal: add a per_cluster_gic switch to VersalCpuClusterMap Date: Tue, 7 Oct 2025 15:10:58 +0100 Message-ID: <20251007141123.3239867-39-peter.maydell@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20251007141123.3239867-1-peter.maydell@linaro.org> References: <20251007141123.3239867-1-peter.maydell@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::32a; envelope-from=peter.maydell@linaro.org; helo=mail-wm1-x32a.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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1759847123483116600 From: Luc Michel Add the per_cluster_gic switch to the VersalCpuClusterMap structure. When set, this indicates that a GIC instance should by created per-cluster instead of globally for the whole RPU or APU. This is in preparation for versal2. Signed-off-by: Luc Michel Reviewed-by: Francisco Iglesias Reviewed-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Edgar E. Iglesias Tested-by: Philippe Mathieu-Daud=C3=A9 Message-id: 20250926070806.292065-38-luc.michel@amd.com Signed-off-by: Peter Maydell --- hw/arm/xlnx-versal.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/hw/arm/xlnx-versal.c b/hw/arm/xlnx-versal.c index 49b5b244403..3d960ed2636 100644 --- a/hw/arm/xlnx-versal.c +++ b/hw/arm/xlnx-versal.c @@ -88,6 +88,11 @@ enum StartPoweredOffMode { =20 typedef struct VersalCpuClusterMap { VersalGicMap gic; + /* + * true: one GIC per cluster. + * false: one GIC for all CPUs + */ + bool per_cluster_gic; =20 const char *name; const char *cpu_model; @@ -825,12 +830,18 @@ static void versal_create_cpu_cluster(Versal *s, cons= t VersalCpuClusterMap *map) cpus[i * map->num_core + j] =3D cpu; } =20 + if (map->per_cluster_gic) { + versal_create_and_connect_gic(s, map, mr, &cpus[i * map->num_c= ore], + map->num_core); + } } =20 qdev_realize_and_unref(cluster, NULL, &error_fatal); =20 - versal_create_and_connect_gic(s, map, mr, cpus, - map->num_cluster * map->num_core); + if (!map->per_cluster_gic) { + versal_create_and_connect_gic(s, map, mr, cpus, + map->num_cluster * map->num_core); + } =20 has_gtimer =3D arm_feature(&ARM_CPU(cpus[0])->env, ARM_FEATURE_GENERIC= _TIMER); if (map->dtb_expose && has_gtimer) { --=20 2.43.0