Borislav Petkov
2023-Oct-25 10:34 UTC
[PATCH v3 1/5] x86/paravirt: move some functions and defines to alternative
On Thu, Oct 19, 2023 at 11:15:16AM +0200, Juergen Gross wrote:> +/* Low-level backend functions usable from alternative code replacements. */ > +DEFINE_ASM_FUNC(x86_nop, "", .entry.text); > +EXPORT_SYMBOL_GPL(x86_nop);This is all x86 code so you don't really need the "x86_" prefix - "nop" is perfectly fine.> +noinstr void x86_BUG(void) > +{ > + BUG(); > +} > +EXPORT_SYMBOL_GPL(x86_BUG);That export is needed for? Paravirt stuff in modules? It builds here without it - I guess I need to do an allmodconfig. -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette
Juergen Gross
2023-Oct-25 13:31 UTC
[PATCH v3 1/5] x86/paravirt: move some functions and defines to alternative
On 25.10.23 12:34, Borislav Petkov wrote:> On Thu, Oct 19, 2023 at 11:15:16AM +0200, Juergen Gross wrote: >> +/* Low-level backend functions usable from alternative code replacements. */ >> +DEFINE_ASM_FUNC(x86_nop, "", .entry.text); >> +EXPORT_SYMBOL_GPL(x86_nop); > > This is all x86 code so you don't really need the "x86_" prefix - "nop" > is perfectly fine.There is #define nop() asm volatile ("nop") in arch/x86/include/asm/special_insns.h already.> >> +noinstr void x86_BUG(void) >> +{ >> + BUG(); >> +} >> +EXPORT_SYMBOL_GPL(x86_BUG); > > That export is needed for? > > Paravirt stuff in modules? > > It builds here without it - I guess I need to do an allmodconfig. >It might not be needed now, but are you sure we won't need it in future? Juergen -------------- next part -------------- A non-text attachment was scrubbed... Name: OpenPGP_0xB0DE9DD628BF132F.asc Type: application/pgp-keys Size: 3098 bytes Desc: OpenPGP public key URL: <http://lists.linuxfoundation.org/pipermail/virtualization/attachments/20231025/311a8a31/attachment.bin> -------------- next part -------------- A non-text attachment was scrubbed... Name: OpenPGP_signature.asc Type: application/pgp-signature Size: 495 bytes Desc: OpenPGP digital signature URL: <http://lists.linuxfoundation.org/pipermail/virtualization/attachments/20231025/311a8a31/attachment.sig>
Juergen Gross
2023-Oct-30 12:39 UTC
[PATCH v3 1/5] x86/paravirt: move some functions and defines to alternative
On 25.10.23 12:34, Borislav Petkov wrote:> On Thu, Oct 19, 2023 at 11:15:16AM +0200, Juergen Gross wrote: >> +/* Low-level backend functions usable from alternative code replacements. */ >> +DEFINE_ASM_FUNC(x86_nop, "", .entry.text); >> +EXPORT_SYMBOL_GPL(x86_nop); > > This is all x86 code so you don't really need the "x86_" prefix - "nop" > is perfectly fine. > >> +noinstr void x86_BUG(void) >> +{ >> + BUG(); >> +} >> +EXPORT_SYMBOL_GPL(x86_BUG); > > That export is needed for? > > Paravirt stuff in modules? > > It builds here without it - I guess I need to do an allmodconfig. >Turns out it is needed after all. With patch 4 applied I get: ERROR: modpost: "BUG_func" [arch/x86/events/amd/power.ko] undefined! ERROR: modpost: "BUG_func" [arch/x86/kernel/cpu/mce/mce-inject.ko] undefined! ERROR: modpost: "BUG_func" [arch/x86/kernel/cpuid.ko] undefined! ERROR: modpost: "BUG_func" [arch/x86/kvm/kvm.ko] undefined! ERROR: modpost: "BUG_func" [arch/x86/kvm/kvm-intel.ko] undefined! ERROR: modpost: "BUG_func" [arch/x86/kvm/kvm-amd.ko] undefined! ERROR: modpost: "BUG_func" [fs/nfsd/nfsd.ko] undefined! ERROR: modpost: "BUG_func" [crypto/aes_ti.ko] undefined! ERROR: modpost: "BUG_func" [drivers/video/fbdev/uvesafb.ko] undefined! ERROR: modpost: "BUG_func" [drivers/video/vgastate.ko] undefined! Juergen -------------- next part -------------- A non-text attachment was scrubbed... Name: OpenPGP_0xB0DE9DD628BF132F.asc Type: application/pgp-keys Size: 3098 bytes Desc: OpenPGP public key URL: <http://lists.linuxfoundation.org/pipermail/virtualization/attachments/20231030/88b00271/attachment.bin> -------------- next part -------------- A non-text attachment was scrubbed... Name: OpenPGP_signature.asc Type: application/pgp-signature Size: 495 bytes Desc: OpenPGP digital signature URL: <http://lists.linuxfoundation.org/pipermail/virtualization/attachments/20231030/88b00271/attachment.sig>