From nobody Mon Dec 15 21:30:02 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=reject dis=none) header.from=unpredictable.fr ARC-Seal: i=1; a=rsa-sha256; t=1754636618; cv=none; d=zohomail.com; s=zohoarc; b=E8NFancVvaA7oEKxhlRIE23jNDeeOksesdvMaUGK3UOHUgS77t2UMPD8Lm2TuPl7c9w8oXPy+HpkECT/TOZoqbT/UZWVIWTQ1aQaQeLRhJyyfgn1Sw5rfQuw5sFZokjS73f7ny7sHFYs6hzLVQ3xkLy3Bjwt6RQOFLZjX7cnu8c= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1754636618; h=Content-Transfer-Encoding:Cc:Cc: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; bh=/ppM7p2dgG+rBZSRQlt4dgyhSPzj1LQ/TSd0lA8u5U4=; b=FMf1HIm6mEYDCRwyoIeCr4ya7ZlQUvUJXay26tslCceLhUs4YDYcl8aIVSVg+gJNPfKeDcyu3gkYuSfkriD0N0Qix7QVSYtKGy4h4E2Zxz8kKKO33qHvz1yAgyj7pItHPdCrGHccwFMajiBERKHKrJ2qvxvZRON6MUubyY92YOo= 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=reject dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1754636618886421.3858831610015; Fri, 8 Aug 2025 00:03:38 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ukH7M-0006B6-4L; Fri, 08 Aug 2025 03:02:24 -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 1ukH74-00065w-GV for qemu-devel@nongnu.org; Fri, 08 Aug 2025 03:02:02 -0400 Received: from p-east3-cluster5-host5-snip4-1.eps.apple.com ([57.103.86.172] helo=outbound.qs.icloud.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ukH71-0005F9-UU for qemu-devel@nongnu.org; Fri, 08 Aug 2025 03:02:02 -0400 Received: from outbound.qs.icloud.com (unknown [127.0.0.2]) by p00-icloudmta-asmtp-us-east-2d-100-percent-5 (Postfix) with ESMTPS id 60E001800164; Fri, 8 Aug 2025 07:01:56 +0000 (UTC) Received: from localhost.localdomain (qs-asmtp-me-k8s.p00.prod.me.com [17.57.155.37]) by p00-icloudmta-asmtp-us-east-2d-100-percent-5 (Postfix) with ESMTPSA id 4863F1800174; Fri, 8 Aug 2025 07:01:54 +0000 (UTC) Dkim-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=unpredictable.fr; s=sig1; bh=/ppM7p2dgG+rBZSRQlt4dgyhSPzj1LQ/TSd0lA8u5U4=; h=From:To:Subject:Date:Message-Id:MIME-Version:x-icloud-hme; b=I5Ar1MIwl9m/TBe7fazSVx8guKgUdSjaa/7PVglgowifeOTu+D9XgNPYlCXBdrUmzGJ4vDknvBStkuRNPMtCgrqwbsQEDv2zR0uBhoY4y430HkGJaAKheSqOrgjzcFSSDB8XZCLEfQAFBJv1SbRkqD+fyA3zeYnzcBaQqHi4Mz33njds0l4nMHgZbljiY5jYNi4LRynIW8SuOZJrIIKEOpJSG9EccKd8vjcRrlcUeuNbRqYWziyppfzBZextjuqYAl8z95JOUIoeh24M+Z2m+qwM3Fq1Xwnod6D6a+NQt+vSmrDTD5meitkulZYE97aVrkZfjohVeJtcRk+Zv6ptPw== X-Client-IP: 46.189.47.18 From: Mohamed Mediouni To: qemu-devel@nongnu.org Cc: Peter Maydell , Shannon Zhao , "Michael S. Tsirkin" , Ani Sinha , qemu-arm@nongnu.org, Paolo Bonzini , Roman Bolshakov , Igor Mammedov , Phil Dennis-Jordan , Alexander Graf , Mads Ynddal , Cameron Esfahani , Mohamed Mediouni Subject: [PATCH v6 08/13] hw/arm: virt: cleanly fail on attempt to use the platform vGIC together with ITS Date: Fri, 8 Aug 2025 09:01:32 +0200 Message-Id: <20250808070137.48716-9-mohamed@unpredictable.fr> X-Mailer: git-send-email 2.39.5 (Apple Git-154) In-Reply-To: <20250808070137.48716-1-mohamed@unpredictable.fr> References: <20250808070137.48716-1-mohamed@unpredictable.fr> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Proofpoint-ORIG-GUID: n4LmibNZrAF5jqmam66FcKpX_MyG08e- X-Proofpoint-GUID: n4LmibNZrAF5jqmam66FcKpX_MyG08e- X-Proofpoint-Spam-Details-Enc: AW1haW4tMjUwODA4MDA1NyBTYWx0ZWRfX25qA4Z+TuPsQ tObdcTP/kn7i3GllVx8kN+1os4k4t2SgOf6FqyHIRLlqQstzm66fvwU4GuWH/03h5ZNzanklon2 ZRvt1mszI9+35QXEBlVc7lIWih/NJmDj4iWMJQYcFzje3s1HpNoCWR9SXaCGUMXQSKgOqV3NBoi pMiTHNBRAvWgvySWnltXaPRycCqbU3YPOih5+LSbtOKPspm9/7e77TJWpfzQyoHjxTzypwIjiZ/ DOibJqacbrRSmsstCO7uKL1bFjxo6806PIGqrCcZwbGOqMtO13bqukkqknCZ2qSmOMIuuMv0I= X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1099,Hydra:6.1.9,FMLib:17.12.80.40 definitions=2025-08-08_01,2025-08-06_01,2025-03-28_01 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 adultscore=0 bulkscore=0 mlxscore=0 spamscore=0 clxscore=1030 malwarescore=0 phishscore=0 suspectscore=0 mlxlogscore=899 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.22.0-2506270000 definitions=main-2508080057 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=57.103.86.172; envelope-from=mohamed@unpredictable.fr; helo=outbound.qs.icloud.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_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, 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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @unpredictable.fr) X-ZM-MESSAGEID: 1754636620982116600 Content-Type: text/plain; charset="utf-8" Apple's platform vGIC doesn't support ITS. Deal with this by reporting to t= he user and not creating the ITS device. Regular configuration: GICv3 + ITS Resulting configuration here: GICv3 with no MSIs And its=3Doff explicitly for the newest machine version: GICv3 + GICv2m Signed-off-by: Mohamed Mediouni --- hw/arm/virt.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/hw/arm/virt.c b/hw/arm/virt.c index 91d8cd9363..005e923a22 100644 --- a/hw/arm/virt.c +++ b/hw/arm/virt.c @@ -740,6 +740,16 @@ static void create_its(VirtMachineState *vms) return; } =20 + if (hvf_enabled() && hvf_irqchip_in_kernel() && vms->tcg_its) { + /* + * In the HVF case, inform the user that they can use the + * user-mode GIC if they want to have an ITS. + */ + info_report("ITS not supported without kernel-irqchip=3Doff on HVF= "); + info_report("Disabling ITS"); + return; + } + dev =3D qdev_new(its_class_name()); =20 object_property_set_link(OBJECT(dev), "parent-gicv3", OBJECT(vms->gic), --=20 2.39.5 (Apple Git-154)