Skip to content

Conversation

@slp
Copy link
Collaborator

@slp slp commented Oct 1, 2025

The SoC in some popular boards (namely, the RPi family) doesn't support an architected vGIC, which is required for requesting KVM the instantiation of a GICv3. To relieve the users from having to configure the gic version manually, try first to instantiate a GICv3, and fall back to a GICv2 if it fails.

Fixes: #420

slp added 2 commits September 30, 2025 11:38
In the past, we had support for both requesting KVM the instantiation of
a GICv3 or a GICv2. We lost this ability with the interrupt controller
refactoring, supporting only GICv2.

Turns out the SoC on some aarch64 boards (namely, the Raspberry Pi
family) doesn't implement an architected vGIC, which is required by the
GICv3 implementation in the KVM.

As RPi boards are very popular, and the maintenance cost for this device
is very small, let's reimplement support for requesting KVM the
instantiation of a GICv2.

Signed-off-by: Sergio Lopez <[email protected]>
The SoC in some popular boards (namely, the RPi family) doesn't support
an architected vGIC, which is required for requesting KVM the
instantiation of a GICv3. To relieve the users from having to configure
the gic version manually, try first to instantiate a GICv3, and fall
back to a GICv2 if it fails.

Signed-off-by: Sergio Lopez <[email protected]>
Copy link
Collaborator

@mtjhrc mtjhrc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not able to test this, but code LGTM

Copy link
Member

@jakecorrenti jakecorrenti left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code LGTM. None of my Pis are available either (running various servers), so I can't test it.

Food for thought: I wonder if down the line we should consider making some of this code more generic? It seems to be fairly similar to the GicV3 implementation; maybe we could abstract some of it away.

@slp slp merged commit 27b2ce2 into containers:main Oct 8, 2025
12 of 13 checks passed
@slp slp deleted the kvm-gicv2 branch October 8, 2025 13:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support for Raspberry Pi

3 participants