On Mon, Aug 25, 2025 at 02:11:30PM -0700, Sean Christopherson wrote:
> On Mon, Aug 25, 2025, Marc Zyngier wrote:
> > On Mon, 25 Aug 2025 20:52:21 +0100,
> > Sean Christopherson <sea...@google.com> wrote:
> > > Is there a sane way to handle vGIC creation in kvm_arch_vm_post_create()? 
> > >  E.g.
> > > could we create a v3 GIC when possible, and fall back to v2?  And then 
> > > provide a
> > > way for tests to express a hard v3 GIC dependency?
> > 
> > You can ask KVM what's available. Like an actual VMM does. There is no
> > shortage of examples in the current code base.
> 
> Right, by "sane" I meant: is there a way to instantiate a supported GIC 
> without
> making it hard/painful to write tests, and without having to plumb in arm64
> specific requirements to common APIs?
> 
> E.g. are there tests that use the common vm_create() APIs and rely on NOT 
> having
> a GIC?

Instead of stuffing a GIC in behind vm_create(), I'd rather we have a
specific helper for creating a VM with an irqchip. There's tests in
arm64 that rely on all this generic infrastructure and also need to
select / dimension a GIC appropriately for the test.

The majority of selftests don't even need an irqchip anyway.

Thanks,
Oliver

Reply via email to