How to modify the kvm module in linux kernel? -


I want to make some modifications in the kvm module in my Linux kernel. For this, I did the following:

  1. Obtained kernel sources:
    apt-get source linux-image-source - $ (uname-r)
  2. Modify a function in the file - changed some variables and added the printk statement.
  3. Kernel created:
    fakeroot debian / rules

  4. The system is rebooted.
  5. enabled QEMU with kvm enabled.

    However, the changes I have made do not appear when I try to test them in QEMU. Whenever I checked with dmesg , even then the printk statement was not executed.

    Does anyone please tell me which part is going wrong?

    Installing a new kernel does not necessarily have to be booted, you may need to change your default Boot loader (eg grab)

    You can check that the kernel you have compiled and installed is what you booted with the experiment:

      Cat / proc / version   

    If this is not expected, then you should zoom in to your grub config and / or reboot and correct the kernel to manu There is a need to choose from.

    After installing the correct kernel, you are reported by the kernel (via dmesg) to change which message level

    this is controlled by a kernel proc file. You can see the current values ​​by touching this file:

      cat / proc / sys / kernel / printk   

    example output:

      4 4 1 7   

    The first argument - severity messages & lt; 4 (i.e. 0, 1/2 or 3) will be recorded. The second argument - messages with no specified intensity are less than 4 and in this way the above example is not seen by the system.

    Therefore, the following logs will be changed so that all kernel messages can be viewed:

      echo to 8 & gt; / Proc / sys / kernel / printk   

    See for more information (for example).

Comments

Popular posts from this blog

c - Mpirun hangs when mpi send and recieve is put in a loop -

python - Apply coupon to a customer's subscription based on non-stripe related actions on the site -

java - Unable to get JDBC connection in Spring application to MySQL -