On Tue, Sep 30, 2025, Oliver Upton wrote:
> On Tue, Sep 30, 2025 at 08:14:19AM -0700, Sean Christopherson wrote:
> > > What about providing an API to do exactly that, instantiate and 
> > > initialize a
> > > barebones GIC?  E.g.
> > > 
> > >   void kvm_arch_init_barebones_irqchip(struct kvm_vm *vm)
> > > 
> > > Hmm, then we'd also need
> > > 
> > >   void kvm_arch_vm_free(struct kvm_vm *vm)
> > > 
> > > to gracefully free the GIC, as done by dirty_log_perf_test.c.  Blech.  
> > > Though
> > > maybe we'll end up with that hook sooner or later?
> > > 
> > > All in all, I have no strong preference at this point.
> > 
> > Oliver, any thoughts?  This is causing noise in people's CIs, i.e. we 
> > should land
> > a fix sooner than later, even if it's not the "final" form. 
> 
> The lack of a default VGICv3 wound up getting in my way with some
> changes to promote selftests to run in VHE EL2, cc'ed you on that series
> since I wound up walking back my gripes here :)
> 
>   
> https://lore.kernel.org/kvmarm/[email protected]

Hah!  I saw the series but didn't read the cover letter. :-)

> That's now in Paolo's tree as of this morning. With that said, I think
> irqfd_test needs a bit more attention (below).
> 
> Thanks,
> Oliver
> 
> >From 4d0a035fb7e6cead74af4edb24fbcfdec076d321 Mon Sep 17 00:00:00 2001
> From: Oliver Upton <[email protected]>
> Date: Tue, 30 Sep 2025 10:53:14 -0700
> Subject: [PATCH] KVM: selftests: Fix irqfd_test for non-x86 architectures
> 
> The KVM_IRQFD ioctl fails if no irqchip is present in-kernel, which
> isn't too surprising as there's not much KVM can do for an IRQ if it
> cannot resolve a destination.
> 
> As written the irqfd_test assumes that a 'default' VM created in
> selftests has an in-kernel irqchip created implicitly. That may be the
> case on x86 but it isn't necessarily true on other architectures.
> 
> Add an arch predicate indicating if 'default' VMs get an irqchip and
> make the irqfd_test depend on it. Work around arm64 VGIC initialization
> requirements by using vm_create_with_one_vcpu(), ignoring the created
> vCPU as it isn't used for the test.
> 
> Fixes: 7e9b231c402a ("KVM: selftests: Add a KVM_IRQFD test to verify 
> uniqueness requirements")

Reported-by: Sebastian Ott <[email protected]>
Reported-by: Naresh Kamboju <[email protected]>

> Signed-off-by: Oliver Upton <[email protected]>

Acked-by: Sean Christopherson <[email protected]>

Reply via email to