From nobody Mon Sep 28 23:12:45 2026 Received: from mail-wr1-f46.google.com (mail-wr1-f46.google.com [209.85.221.46]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 22153355F46 for ; Sat, 15 Aug 2026 09:25:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.46 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786785948; cv=none; b=u24Ic4y1xK4AQJTtjo4esTtZIi1LuzG3HftCNGdU/TM8V+lx4tY1LHDxVLxv2gxHgkSEoOgP/W1RxCE2W4bVG3uHm7DvxgYBFFMfB/ZU+JE2zN7pRiOLrARD57xoG54BMU1N9xJox1b+F9XyYVU8qenGG/0GN5sMGHXX1Tzy1oQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786785948; c=relaxed/simple; bh=ca1jM0fOCLIP9WuBP03SPXW8RpJRHt73yJX9//rI98M=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=mwpNm2lr4m0o1Mk3hmP/ZMumHw5+FvN6To9tU7RGF5Sl8YkAZFV8LK2okb+iZEQ+5bUv6qXOcNeBueRvlJdmDTLOyMY65cqan6LWMchZiBnTUzTPySs+ObiC8+rU/+VNIbcBBQaVJJqvv8ebxUZ4pwLMG62MXkAs+vfp+bTvZmA= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=N4mR3ySA; arc=none smtp.client-ip=209.85.221.46 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="N4mR3ySA" Received: by mail-wr1-f46.google.com with SMTP id ffacd0b85a97d-47f93b2fe4cso1010491f8f.0 for ; Sat, 15 Aug 2026 02:25:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1786785945; x=1787390745; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to:content-type; bh=Hk8cmy7ROF0KR33i9zqmPXL+Xk26nOxz+b7oFhOL0UE=; b=N4mR3ySAqDNC1eti+WwmUO+UEyq7GOOKlIaoCfl8PFplEw2Sc970GRaMAjz5boYlfe h3WTtpJmADHqZtZ25wBnsShQpbfJHQRS5XFwsxuoChF5XekSm0uRwc8H2nHokYVFwd9x DuZV6R8S0ZGoNiu6lL+N2TlgxTofx63KfnrDrjqcsAw2Y1ZVmzeNg7DpeeRVS7FxbRvw Ry2N05t1HTnyrq+nhJflM8WjhUHfrcaIAHC864U0208CfqqP8ZtWI9R8UFCPN9VAWX2b V962CBHjnIcWSEZnb9nv2WThmuF4Cgqj20xlnjbeVWMH4WSpFGRDWIqb3WEm5MdKsZKm C8pQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1786785945; x=1787390745; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to:content-type; bh=Hk8cmy7ROF0KR33i9zqmPXL+Xk26nOxz+b7oFhOL0UE=; b=ourCiUXxEERLu1n+T9bRTE4o4gXlXSt2Jv5bZcxF1B8h9h1M88YBMhEEttvhCACT2M Hi622/wtRNEGnkInTUR7fHKY7bR11GcETsFpIjUtYMNFidVlzmswVD5dfdNPQA0OoUKj QWgoN3b1QrZRZQgEd9T+Z5Z32MtXgCEvSSwNQyttTzX23u1b/+HZkBk+vFxuLQTe42/q ej3E9B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d:b0:499:87b6:f3c0 with SMTP id 5b1f17b1804b1-4998807e4c9mr158343345e9.14.1786785945038; Sat, 15 Aug 2026 02:25:45 -0700 (PDT) Received: from localhost.localdomain (dynamic-2a02-3100-aecb-d601-fc34-eb31-14a1-3704.310.pool.telefonica.de. [2a02:3100:aecb:d601:fc34:eb31:14a1:3704]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4998ca63e5csm29202615e9.2.2026.08.15.02.25.43 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Sat, 15 Aug 2026 02:25:44 -0700 (PDT) From: Karl Mehltretter To: Marc Zyngier Cc: Oliver Upton , Sascha Bischoff , Paolo Bonzini , Jonathan Corbet , Shuah Khan , Jonathan Cameron , Timothy Hayes , kvmarm@lists.linux.dev, kvm@vger.kernel.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, Karl Mehltretter Subject: [PATCH] Documentation: KVM: Fix the GICv5 KVM_IRQ_LINE PPI range Date: Sat, 15 Aug 2026 11:25:37 +0200 Message-Id: <20260815092537.31737-1-kmehltretter@gmail.com> X-Mailer: git-send-email 2.39.5 (Apple Git-154) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" KVM rejects GICv5 PPI irq_id values above 63, while the documented range extends to 127. KVM also rejects PPIs not present in the KVM_DEV_ARM_VGIC_USERSPACE_PPIS mask. That mask is populated by KVM_DEV_ARM_VGIC_CTRL_INIT; reading it beforehand currently succeeds but returns all zeroes. Correct the range, document the mask restriction, and require the mask to be queried after VGIC initialization. Fixes: b88d05a893cb ("KVM: arm64: gic-v5: Support GICv5 interrupts with KVM= _IRQ_LINE") Assisted-by: Claude:claude-fable-5 Signed-off-by: Karl Mehltretter --- Documentation/virt/kvm/api.rst | 4 +++- Documentation/virt/kvm/devices/arm-vgic-v5.rst | 3 +++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/Documentation/virt/kvm/api.rst b/Documentation/virt/kvm/api.rst index e3003a241d5b0..6d8fd74174492 100644 --- a/Documentation/virt/kvm/api.rst +++ b/Documentation/virt/kvm/api.rst @@ -912,7 +912,9 @@ The irq_type field has the following values: in-kernel GICv5: SPI, irq_id between 0 and 65535 (incl.) - KVM_ARM_IRQ_TYPE_PPI: in-kernel GICv2/GICv3: PPI, irq_id between 16 and 31 (incl.) - in-kernel GICv5: PPI, irq_id between 0 and 127 (incl.) + in-kernel GICv5: PPI, irq_id between 0 and 63 (incl.), and + only if present in the mask returned by the + KVM_DEV_ARM_VGIC_USERSPACE_PPIS attribute =20 (The irq_id field thus corresponds nicely to the IRQ ID in the ARM GIC spe= cs) =20 diff --git a/Documentation/virt/kvm/devices/arm-vgic-v5.rst b/Documentation= /virt/kvm/devices/arm-vgic-v5.rst index d328cf1e22c1f..e24aed0c4afcd 100644 --- a/Documentation/virt/kvm/devices/arm-vgic-v5.rst +++ b/Documentation/virt/kvm/devices/arm-vgic-v5.rst @@ -35,6 +35,9 @@ Groups: populated with the userspace PPI mask. The lower __u64 contains the = mask for the lower 64 PPIS, with the remaining 64 being in the second __u= 64. =20 + Userspace must query this attribute after initializing the VGIC with + KVM_DEV_ARM_VGIC_CTRL_INIT. + This is a read-only attribute, and cannot be set. Attempts to set it= are rejected. =20 --=20 2.53.0