I get the following errors when I try compiling Linux kernel 4.16.1 and 4.16.2:

arch/x86/kvm/svm.o: In function `__sev_issue_cmd':
svm.c:(.text+0x1f08): undefined reference to `sev_issue_cmd_external_user'
arch/x86/kvm/svm.o: In function `sev_unbind_asid':
svm.c:(.text+0x2033): undefined reference to `sev_guest_deactivate'
svm.c:(.text+0x203f): undefined reference to `sev_guest_df_flush'
svm.c:(.text+0x206c): undefined reference to `sev_guest_decommission'
arch/x86/kvm/svm.o: In function `svm_mem_enc_op':
svm.c:(.text+0x2c56): undefined reference to `psp_copy_user_blob'
svm.c:(.text+0x2d4c): undefined reference to `sev_platform_init'
svm.c:(.text+0x2e59): undefined reference to `psp_copy_user_blob'
svm.c:(.text+0x2eea): undefined reference to `sev_guest_df_flush'
svm.c:(.text+0x2f3d): undefined reference to `sev_guest_activate'
svm.c:(.text+0x3001): undefined reference to `psp_copy_user_blob'
svm.c:(.text+0x3054): undefined reference to `psp_copy_user_blob'
arch/x86/kvm/svm.o: In function `svm_hardware_setup':
svm.c:(.init.text+0x263): undefined reference to `sev_platform_status'
make: *** [Makefile:1041: vmlinux] Error 1

Would anyone know what needs to be done to resolve this? I don't have this issue with any previous kernel version.

closed as off-topic by Jeff Schaller, Christopher, Rui F Ribeiro, slm Apr 24 at 3:20

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Questions describing a problem that can't be reproduced and seemingly went away on its own (or went away when a typo was fixed) are off-topic as they are unlikely to help future readers." – Jeff Schaller, Christopher, Rui F Ribeiro, slm
If this question can be reworded to fit the rules in the help center, please edit the question.

  • 1
    In your kernel configuration, you apparently have CONFIG_KVM_AMD selected (otherwise it would not be compiling arch/x86/kvm/svm.c), but have you also selected CONFIG_KVM_AMD_SEV? If not, then try selecting it. If it works, there is now a dependency between those features that the kernel configurator is not aware of. Make a bug report of it. – telcoM Apr 14 at 14:52
  • I found the problem; it was easy to fix and kind of embarrassing. I had "Kernel-based Virtual Machine support" set to be compiled as a module. When I changed it to being built-in, my kernel compiled with no problem. I should have looked more closely at my configuration. Thanks for the response, TelcoM. – Taren Apr 14 at 22:31

I needed to compile 'Kernel-based Virtual Machine Support' into the kernel, rather than as a module. Once that was done, the kernel compiled with no problem.

Not the answer you're looking for? Browse other questions tagged or ask your own question.