Re: [PATCH v7 00/24] KVM: arm64: SMMUv3 driver for pKVM (trap and emulate)

From: Jason Gunthorpe

Date: Wed Aug 26 2026 - 08:23:37 EST


On Wed, Aug 26, 2026 at 08:45:50AM +0000, Mostafa Saleh wrote:
> On Tue, Aug 25, 2026 at 05:59:50PM -0300, Jason Gunthorpe wrote:
> > > This is v7 of pKVM SMMUv3 support with trap and emulate
> >
> > I tried to compile it:
> >
> > ld.lld-21: error: undefined symbol: __kvm_nvhe_iova_bitmap_set
> > >>> referenced by __kvm_nvhe_io-pgtable-arm.c
> > >>> arch/arm64/kvm/hyp/nvhe/kvm_nvhe.o:(__kvm_nvhe_visit_dirty) in archive vmlinux.a
> >
> > I think it is because I have CONFIG_IOMMUFD turned on.
> >
> > -#if IS_ENABLED(CONFIG_IOMMUFD_DRIVER)
> > +#if IS_ENABLED(CONFIG_IOMMUFD_DRIVER) && !IS_ENABLED(__KVM_NVHE_HYPERVISOR__)
> > struct iova_bitmap *iova_bitmap_alloc(unsigned long iova, size_t length,
> >
> > ?
>
> Ah, I don't think I tested that config, sorry about that, I will fix
> it in the next version, I think I will just stub it in the hypervisor
> if possible.

I tried and failed, getting the include order right did not happen,
since this non-inline non-static declaration tends to conflict.

Jason