From nobody Mon Nov 23 04:27:58 2026 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=cs.fau.de ARC-Seal: i=1; a=rsa-sha256; t=1793717667; cv=none; d=zohomail.com; s=zohoarc; b=dVtyTnrM8igbZuEDjxWNZ5IZvo/cpg0z3UUQ6WmRzrZEJ7gffC5E319kqT1cfoS2GEJszdzfWyHUQol1cbfe72/zudGk4+aYK3Din8WDXjy31cmxCHYHaMFKYL40topBVeq8PtnIz6RL9LEsNWsGuOYIu33iVv+L6lI2EHMp1G8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1793717667; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=Wq8CRXCfTqp1OjqieDyO9/BFFT2lhkTJEQig9iU5ZcE=; b=WEiVKImvd9kk86K6uAMPyPRBMapC15gwth7GIjdHJAUycnnL1SJFgsD1H4DJ4oQTDwDcG90RUukQbuwSRnRpTUHY967JgQ5lYgVo9fjYa5X0Z1Y7FhPENLJ5RFFqGzkXj7NpM1WyjjWqcK8c55LjDmbZ1t43HmFzuM6+TIy+8wQ= 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 lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1793717665995642.3794953740445; Tue, 3 Nov 2026 06:54:25 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1xOFtd-0006Wd-DI; Tue, 03 Nov 2026 09:53:57 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1xOFta-0006WI-Gl; Tue, 03 Nov 2026 09:53:54 -0500 Received: from faui40.informatik.uni-erlangen.de ([131.188.34.40]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1xOFtU-0007Vc-N6; Tue, 03 Nov 2026 09:53:54 -0500 Received: from i4laptop29.pool.uni-erlangen.de (i4laptop29.informatik.uni-erlangen.de [10.188.34.180]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) (Authenticated sender: schober) by faui40.informatik.uni-erlangen.de (Postfix) with ESMTPSA id 4jJs5R2dScz1RF7R; Tue, 03 Nov 2026 15:53:31 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cs.fau.de; s=r20250630-faui40; t=1793717616; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=Wq8CRXCfTqp1OjqieDyO9/BFFT2lhkTJEQig9iU5ZcE=; b=a1TYbZGkAMEPEldjg/tzz7E0T5JoDK63/yUitNQFLLcZG2aHzfbvO4VjlXlH5JPnrKudJ5 uK5nBhlsHpSDLSuTGuuHjX2VAlFKmnV9FaNNtUCn9YlFE0LMQ4gjbyDn0Se4mGcI+Yh7v4 3TDnVVOG4kHlplCIqj1lC1Z7UkUY4L1CLISkiNZb8tSt2FexXKHbiLpIs6ect2TJxD1Kxr +MQ45J/PPtsroDQWYZLJRahY+0UKp/KM0QeKMnlAxm+fQBoeQPaG9glN0TRL+BXmvxwHHI PFdYXwEhTouzTYf360N8cWsHbI/PLon40+AjsO0sa49/bmq0Z9vLTjNgvhopag== From: Ferdinand Schober To: qemu-devel@nongnu.org Cc: qemu-arm@nongnu.org, Ferdinand Schober , qemu-stable@nongnu.org Subject: [PATCH] arm/cpu: fix GIC v3 flag for a64fx Date: Tue, 3 Nov 2026 15:52:54 +0100 Message-ID: <20261103145254.1543907-1-schober@cs.fau.de> X-Mailer: git-send-email 2.56.0 MIME-Version: 1.0 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=lists1p.gnu.org; Received-SPF: pass client-ip=131.188.34.40; envelope-from=schober@cs.fau.de; helo=faui40.informatik.uni-erlangen.de X-Spam_score_int: -19 X-Spam_score: -2.0 X-Spam_bar: -- X-Spam_report: (-2.0 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, 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: qemu development 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 @cs.fau.de) X-ZM-MESSAGEID: 1793717672041158500 Content-Type: text/plain; charset="utf-8" The a64fx CPU model wrongfully set GIC bits in the processor feature register (ID_AA64PFR0). I traced this back to e31c70ac04001df5e540b79843834277e283fa71, where A64FX got added. This bit is supposed to get set conditionally in id_aa64pfr0_read, depending on whether or not a gicv3 is present, from what I can tell. Qemu picks gic-version=3D2 by default, while v3 gets advertised due to this= flag. Recent EDK2 firmware accesses ICC_SRE_EL2 in this case and crashes. Clear the GIC field, as the other CPU models do. Cc: qemu-stable@nongnu.org Fixes: e31c70ac0400 ("target-arm: Add support for Fujitsu A64FX") Signed-off-by: Ferdinand Schober --- To reproduce: UEFI firmware (version edk2-20260812-8.fc44 built at 00:00:00= on Sep 9 2026) (edk2-aarch64-20260812-8.fc44.noarch from Fedora 44) qemu-system-aarch64 -m 1G -cpu a64fx \ -machine virt,virtualization=3Don,iommu=3Dsmmuv3 -nographic \ -bios /usr/share/edk2/aarch64/QEMU_EFI.fd target/arm/tcg/cpu64.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/target/arm/tcg/cpu64.c b/target/arm/tcg/cpu64.c index 60c701e5d7..3a0f8b623c 100644 --- a/target/arm/tcg/cpu64.c +++ b/target/arm/tcg/cpu64.c @@ -504,7 +504,8 @@ static void aarch64_a64fx_initfn(Object *obj) SET_IDREG(isar, REVIDR, 0); cpu->ctr =3D 0x86668006; cpu->reset_sctlr =3D 0x30000180; - SET_IDREG(isar, ID_AA64PFR0, 0x0000000101111111); /* No RAS Extensions= */ + /* No RAS Extensions, GIC filled in later */ + SET_IDREG(isar, ID_AA64PFR0, 0x0000000100111111); SET_IDREG(isar, ID_AA64PFR1, 0x0000000000000000); SET_IDREG(isar, ID_AA64DFR0, 0x0000000010305408); SET_IDREG(isar, ID_AA64DFR1, 0x0000000000000000); --=20 2.56.0