AMDESE / AMDSEV

AMD Secure Encrypted Virtualization
294 stars 85 forks source link

snp-latest: ERROR: modpost: "kvm_vm_set_region_attr" [arch/x86/kvm/kvm-amd.ko] undefined! #153

Open aep opened 1 year ago

aep commented 1 year ago

the snp-latest kernel does not build on fedora. Which rpm distro should i use instead? I think it might be a good idea to just commit a working .config instead of patching the distro one?

MOZGIII commented 1 year ago

I have tried copying a .config from a working Ubuntu build to the NixOS build and it fails with the same error. I find this behavior very odd.

I think the ideal scenario way of doing this is adding more expressiveness to the configuration tweaks. Currently, the configuration is easy to replicate due to explicit command use, however those commands can actually be quite trickly since they don't fail when a mistake is made in the argument.

Similarly, certain tweaks seem to be made not because they are required for the modules to work, but for the unrelated convenience tweaking. Imo, all the config tweaks should be carefully documented - that's the only way to make them clear.

As for committing the working .config - it would be a good addition, but might be difficult to maintain, and we'd really require one per supported distro, as from my experience with copying over a working config into NixOS it is not enough to just have a working config from somewhere else - it must be working for a given environment.


Oh, and here's a sample config: https://gist.github.com/MOZGIII/1b818a5fa7f57b2e947fd42f4df42009 Just in can it might help.

tlendacky commented 1 year ago

the snp-latest kernel does not build on fedora.

That is odd since kvm_vm_set_region_attr() is part of virt/kvm/kvm_main.c and is exported. I'll install the latest Fedora and see if I can reproduce the issue.

tlendacky commented 1 year ago

Can you add the following command to enable a config option in build_kernel() of common.sh (make it one of the first commands to run):

run_cmd ./scripts/config --enable EXPERT

Let me know if that takes care of the issue.

aep commented 1 year ago

I'm on vacation atm but I'm pretty sure expert is the correct option that fixed it for me.

sent from mobile

On Thu, May 25, 2023, 18:15 Tom Lendacky @.***> wrote:

Can you add the following command to enable a config option in build_kernel() of common.sh (make it one of the first commands to run):

run_cmd ./scripts/config --enable EXPERT

Let me know if that takes care of the issue.

— Reply to this email directly, view it on GitHub https://github.com/AMDESE/AMDSEV/issues/153#issuecomment-1563172879, or unsubscribe https://github.com/notifications/unsubscribe-auth/AABBNXSTRBYUYGADFHCF7GLXH6AS5ANCNFSM6AAAAAAX7KDPBE . You are receiving this because you authored the thread.Message ID: @.***>