Re: [PATCH] KVM: arm64: remove incorrect __init annotation

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, Jan 3, 2021 at 5:43 PM Marc Zyngier <maz@xxxxxxxxxx> wrote:
>
> On Sun, 03 Jan 2021 14:00:50 +0000,
> Arnd Bergmann <arnd@xxxxxxxxxx> wrote:
> >
> > From: Arnd Bergmann <arnd@xxxxxxxx>
> >
> > When hyp_cpu_pm_exit() is not inlined, it causes a link time warning:
> >
> > WARNING: modpost: vmlinux.o(.text+0x39974): Section mismatch in reference from the function kvm_arch_init() to the function .init.text:hyp_cpu_pm_exit()
> > The function kvm_arch_init() references
> > the function __init hyp_cpu_pm_exit().
> > This is often because kvm_arch_init lacks a __init
> > annotation or the annotation of hyp_cpu_pm_exit is wrong.
> >
> > This is not only called at boot time, so remove the annotation
> > to prevent undefined behavior in case it gets called after being
> > freed.
>
> It *is* only called at boot time (despite these functions being called
> from module_init(), KVM cannot be built as a module on arm64).

Ah, I see where I went wrong: I looked at the callers of kvm_arch_init_vm()
instead of kvm_arch_init().

      Arnd
_______________________________________________
kvmarm mailing list
kvmarm@xxxxxxxxxxxxxxxxxxxxx
https://lists.cs.columbia.edu/mailman/listinfo/kvmarm



[Index of Archives]     [Linux KVM]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux