I was recently debugging the QEMU source code and there are endpoints like kvm_ioctl, kvm_vm_ioctl, kvm_vcpu_ioctl, kvm_device_ioctl which interact with the /dev/kvm and VM and VCPU file descriptors to make everything happen.
But when the code calls kvm_vm_ioctl(KVM_CREATE_VM) for example, an ioctl@plt is called and the context switches to the kernel.
How do I debug from here on?
Some people have told to modify and insmod kvm.ko with printk(), but I cannot find kvm.ko anywhere, not even in lsmod.
Platform: Raspberry Pi 4 (Raspbian Lite 64-bit)
Note: /dev/kvm is present but lsmod doesn't show kvm module.