Closed prcuzz closed 1 year ago
I don't know, but you must build the kernel from the kvmi-v7
branch.
And I think the latest documentation is this: https://kvm-vmi.github.io/kvm-vmi/master/setup.html
Also, you don't have to use the root user to build the kernel. You need sudo
only with make modules_install
and make install
. Building the kernel with sudo should work, but I haven't test it.
Keep in mind that you've picked the bare-metal setup (not Valgrant). You'll have to install that kernel on a/your system and that system must boot :). If it doesn't, you'll have to set your block device drivers (scsi,nvme...) to Y, not M, during make menuconfig
.
HI @adlazar , thanks for replying ! hi @prcuzz , are you compiling on Ubuntu 22.04 ? There is an issue related with objtool that i'm investigating.
Also, as @adlazar noticed, I see the master
branch in your git history.
the main repo tracks the kvmi-v7 commit in the kvm submodule.
you shouldn't checkout the master branch there :)
Okay, so the issue with objtool
and binutils
on ubuntu 22.04 has already been addressed here:
https://github.com/KVM-VMI/kvm/issues/54
@adlazar @Wenzel Thank you for your reply. I tried compiling the kvmi-v7 version of the code and ran into a new problem.
➜ kvm git:(kvmi-v7) make -j$(nproc)
...
AS arch/x86/boot/compressed/piggy.o
LD arch/x86/boot/compressed/vmlinux
ZOFFSET arch/x86/boot/zoffset.h
OBJCOPY arch/x86/boot/vmlinux.bin
AS arch/x86/boot/header.o
LD arch/x86/boot/setup.elf
OBJCOPY arch/x86/boot/setup.bin
BUILD arch/x86/boot/bzImage
Setup is 18044 bytes (padded to 18432 bytes).
System is 11825 kB
CRC 98886c23
Kernel: arch/x86/boot/bzImage is ready (#2)
ERROR: "unlock_device_hotplug" [drivers/dax/kmem.ko] undefined!
ERROR: "add_memory_resource" [drivers/dax/kmem.ko] undefined!
ERROR: "lock_device_hotplug" [drivers/dax/kmem.ko] undefined!
make[1]: *** [scripts/Makefile.modpost:94: __modpost] Error 1
make: *** [Makefile:1280: modules] Error 2
I found someone who had the same problem as me: https://github.com/KVM-VMI/kvm-vmi/issues/100 So I followed your suggetsion and executed these cmd:
make distclean
make olddefconfig
./scripts/config --enable KVM
./scripts/config --enable KVM_INTEL
./scripts/config --enable KVM_AMD
./scripts/config --enable KVM_INTROSPECTION
./scripts/config --disable TRANSPARENT_HUGEPAGE
./scripts/config --enable REMOTE_MAPPING
then I got this:
➜ kvm git:(kvmi-v7) sudo make modules_install INSTALL_MOD_STRIP=1
sed: can't read modules.order: No such file or directory
make: *** [Makefile:1312: _modinst_] Error 2
I googled it and executed "make modules", then I got this:
➜ kvm git:(kvmi-v7) sudo make modules_install INSTALL_MOD_STRIP=1
cp: cannot stat './modules.builtin.modinfo': No such file or directory
make: *** [Makefile:1314: _modinst_] Error 1
I didn't find any useful infomation yet.
I use ubuntu 20.04.
I followed the steps in order in https://kvm-vmi.github.io/kvm-vmi/master/setup.html#kvm. What could have gone wrong? Any suggestions to help me solve this problem? Thank you very much!!
I found the solution in https://github.com/frankaemika/libfranka/issues/62 .
I finished the installation. Thank you!
➜ ~ uname -a
Linux ubuntu 5.4.24+ #1 SMP Tue Mar 7 06:01:40 PST 2023 x86_64 x86_64 x86_64 GNU/Linux
poke @prcuzz see this ticket: https://github.com/KVM-VMI/kvm-vmi/issues/149
And this PR which implements the compilation fixes: https://github.com/KVM-VMI/kvm-vmi/pull/148
I'm working on a documentation update as well.
@Wenzel Thank you for your maintenance and I hope the problems I encountered will be helpful to others.
Per the last comment, closing this issue. Thanks !
I wanted to install and use libvmi/libvmi, so I tried to compile the kernel here to enable the kvm introspection feature.
I followed the step in https://kvm-vmi.github.io/kvm-vmi/kvmi-v7/setup.html#kvm. But I had a problem:
It says "Missing separator" in line 1. And I find the file ".fixdep.o.cmd":
I can see no space or tab here. How can I solve this problem? Please help me.