<div dir="ltr">Hi Raghavendra and Paul,<div><br></div><div>Thanks for your reply. <br></div><div><br></div><div>True I should read more about KVM things and need to change the my setup so that I can stop using winows-ubuntu-kvm hierarchy. </div><div> </div><div>Sure I will try out these steps and come back.</div><div><br></div><div>Regards,</div><div>Harish </div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Oct 16, 2014 at 12:43 AM, Raghavendra <span dir="ltr">&lt;<a href="mailto:arrao@cdac.in" target="_blank">arrao@cdac.in</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
  
    
  
  <div bgcolor="#FFFFFF" text="#000000"><span class="">
    <br>
    <div>On 15/10/2014 11:27 PM, harisha ja
      wrote:<br>
    </div>
    <blockquote type="cite">
      <div dir="ltr">Hi Raghavendra,
        <div><br>
        </div>
        <div>Thanks for your response.</div>
        <div><br>
        </div>
        <div>Yes that was an issue and I corrected it. But I see kvm is
          trying to boot the kernel and I still see those tracebacks and
          it does not do anything after that. It is not giving back the
          console. </div>
        <div><br>
        </div>
      </div>
    </blockquote></span>
    That is because you are trying to boot a system without providing
    the root file system.<br>
    You could get a simple non-GUI based file systems if you just search
    for it, else you could build your own and then try launching QEMU.<span class=""><br>
    <blockquote type="cite">
      <div dir="ltr">
        <div><br>
        </div>
        <div><br>
        </div>
        <div>Some commands I executed </div>
        <div><br>
        </div>
        <div>
          <div>linux/linux_ws$ sudo modprobe kvm-intel</div>
          <div>FATAL: Error inserting kvm_intel
            (/lib/modules/3.11.0-15-generic/kernel/arch/x86/kvm/kvm-intel.ko):
            Operation not supported</div>
          <div>rama@ubuntu:~/linux/linux_ws$ </div>
          <div><br>
          </div>
          <div><br>
          </div>
        </div>
      </div>
    </blockquote></span>
    First of all, the underlying hardware, which in your case is VmWare
    box, has to support that!<div><div class="h5"><br>
    <blockquote type="cite">
      <div dir="ltr">
        <div>
          <div><br>
          </div>
          <div>
            <div>rama@ubuntu:~/linux/linux_ws$ egrep &#39;^flags.*(vmx|svm)&#39;
              /proc/cpuinfo</div>
            <div>rama@ubuntu:~/linux/linux_ws$ </div>
          </div>
        </div>
        <div><br>
        </div>
        <div><br>
        </div>
        <div><br>
        </div>
        <div>The modified command </div>
        <div><br>
        </div>
        <div dir="ltr">qemu-system-x86_64 -kernel
           ./arch/x86/boot/bzImage -append &quot;root=/dev/sda&quot;<br>
          <div><br>
          </div>
          <div>This is my printf which I am expecting to see using dmsg
            after kernel bootup. Am I missing something here?</div>
          <div><br>
          </div>
          <div>
            <div>rama@ubuntu:~/linux/linux_ws$ git diff</div>
            <div>diff --git
              a/drivers/net/ethernet/intel/e1000/e1000_main.c
              b/drivers/net/ethernet/intel/e1000/e1000_main.c</div>
            <div>index cbc330b..3063991 100644</div>
            <div>--- a/drivers/net/ethernet/intel/e1000/e1000_main.c</div>
            <div>+++ b/drivers/net/ethernet/intel/e1000/e1000_main.c</div>
            <div>@@ -937,7 +937,7 @@ static int e1000_probe(struct
              pci_dev *pdev, const struct pci_device_id *ent)</div>
            <div>        struct net_device *netdev;</div>
            <div>        struct e1000_adapter *adapter;</div>
            <div>        struct e1000_hw *hw;</div>
            <div>-</div>
            <div>+       </div>
            <div>        static int cards_found = 0;</div>
            <div>        static int global_quad_port_a = 0; /* global
              ksp3 port a indication */</div>
            <div>        int i, err, pci_using_dac;</div>
            <div>@@ -945,7 +945,8 @@ static int e1000_probe(struct
              pci_dev *pdev, const struct pci_device_id *ent)</div>
            <div>        u16 tmp = 0;</div>
            <div>        u16 eeprom_apme_mask = E1000_EEPROM_APME;</div>
            <div>        int bars, need_ioport;</div>
            <div>-</div>
            <div>+       </div>
            <div>+       printk(KERN_DEBUG &quot;I can modify the Linux
              kernel!\n&quot;);</div>
            <div>        /* do not allocate ioport bars when not needed
              */</div>
            <div>        need_ioport = e1000_is_need_ioport(pdev);</div>
            <div>        if (need_ioport) {</div>
          </div>
          <div><br>
          </div>
          <div><br>
          </div>
        </div>
      </div>
    </blockquote></div></div>
    Ok, first of all, what Paul suggested is absolutely right. You can&#39;t
    get through the kernel log for a KERN_DEBUG(except for changing some
    make options and all). Try using dev_info().<br>
    <br>
    The next thing I see is that, you are printing in the driver&#39;s probe
    function, which would not be called unless a matching hardware is
    found.<br>
    While launching kvm itself, you have you provide the hardware as
    well.<br>
    <br>
    So, your complete setup should be something like this.<br>
    1) Download a file system image(or make your own). Lets call this
    &quot;rootfs.img&quot;<br>
    2) Compile the driver, e1000 as a part of linux(not as a module).<br>
    3) While launching QEMU, provide an option to &quot;emulate&quot; the e1000
    device as well.<br>
    4) Launch qemu as :<br>
    <br>
    $ qemu-system-x86 -hda rootfs.img -kernel bzImage -append
    &quot;root=/dev/sda1&quot; -net nic,model=e1000<br>
    <blockquote type="cite">
      <div dir="ltr">
        <div><br>
        </div>
        <div><br>
        </div>
        <div><br>
        </div>
        <div><br>
        </div>
        <div>Thanks and Regards,</div>
        <div>Harisha </div>
        <div><br>
        </div>
      </div>
    </blockquote>
    Hope this helps.<span class="HOEnZb"><font color="#888888"><br>
    <br>
    Raghavendra</font></span><div><div class="h5"><br>
    <blockquote type="cite">
      <div dir="ltr">
        <div><br>
        </div>
        <div><br>
        </div>
        <div><br>
        </div>
        <div><br>
        </div>
      </div>
      <div class="gmail_extra"><br>
        <div class="gmail_quote">On Wed, Oct 15, 2014 at 3:53 PM,
          Raghavendra <span dir="ltr">&lt;<a href="mailto:arrao@cdac.in" target="_blank">arrao@cdac.in</a>&gt;</span>
          wrote:<br>
          <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
            <div bgcolor="#FFFFFF" text="#000000">
              <div>Hello,<span><br>
                  On Wednesday 15 October 2014 03:01 PM, harisha ja
                  wrote:<br>
                </span></div>
              <span>
                <blockquote type="cite">
                  <div dir="ltr">
                    <div><br>
                    </div>
                    <div class="gmail_quote">
                      <div dir="ltr">Hi All,
                        <div><br>
                        </div>
                        <div>I am interested in Linux kernel
                          development. I have subscribed for newbies
                          mail for a while and this is my first mail to
                          the group. My intention and interest is to
                          work on network( if possible mm) side of
                          kernel. First of all thanks for all the kernel
                          developers and the guys here for contribution
                          to Linux community.</div>
                        <div><br>
                        </div>
                        <div>Here is my doubt. </div>
                        <div><br>
                        </div>
                        <div>1) I downloaded the linux source code and
                          created the config using make defconfig and
                          created image using make ( I did not do make
                          install as I want test it with kvm)</div>
                        <div><br>
                        </div>
                        <div>I have windows 7 system and I have
                          installed ubuntu using vmware. I have
                          installed KVM on ubuntu and I am trying to
                          boot the kernal image with KVM. But I am not
                          sure what is the problem. I am stuck in this
                          screen. Is something I am missing here? </div>
                        <div><br>
                        </div>
                        <div>The approach using kvm to put some logs and
                          to see module initialization is wrong?. </div>
                        <div><br>
                        </div>
                        <div>The command I am using </div>
                        <div>
                          <div>kvm  -kernel ./arch/x86/boot/bzImage
                             -append root=/root/</div>
                        </div>
                      </div>
                    </div>
                  </div>
                </blockquote>
              </span> Along with the kernel, you must also specify the
              file system image. A simple invoking of the command could
              be something like this :<br>
              $ kvm -hda file_system.img -kernel bzImage -append
              &quot;root=/dev/sda1&quot;<span><br>
                <blockquote type="cite">
                  <div dir="ltr">
                    <div class="gmail_quote">
                      <div dir="ltr">
                        <div><br>
                        </div>
                        <div><br>
                        </div>
                        <div>I see the below message and then the qemu
                          prompt does not boot and stops by displaying
                          below traceback.</div>
                        <div><br>
                        </div>
                        <div>
                          <pre style="margin-top:0px;margin-bottom:10px;padding:5px;border:0px;font-size:14px;vertical-align:baseline;background-color:rgb(238,238,238);font-family:Consolas,Menlo,Monaco,&#39;Lucida Console&#39;,&#39;Liberation Mono&#39;,&#39;DejaVu Sans Mono&#39;,&#39;Bitstream Vera Sans Mono&#39;,&#39;Courier New&#39;,monospace,serif;overflow:auto;width:auto;max-height:600px;word-wrap:normal;color:rgb(0,0,0);line-height:17.804800033569336px"><code style="margin:0px;padding:0px;border:0px;vertical-align:baseline;font-family:Consolas,Menlo,Monaco,&#39;Lucida Console&#39;,&#39;Liberation Mono&#39;,&#39;DejaVu Sans Mono&#39;,&#39;Bitstream Vera Sans Mono&#39;,&#39;Courier New&#39;,monospace,serif;white-space:inherit">Could not access KVM kernel module: No such file or directory
failed to initialize KVM: No such file or directory</code></pre>
                        </div>
                        <div><br>
                        </div>
                      </div>
                    </div>
                  </div>
                </blockquote>
              </span> That&#39;s fine. QEMU uses something called as tcg
              accelerator to get the job done.<span><br>
                <blockquote type="cite">
                  <div dir="ltr">
                    <div class="gmail_quote">
                      <div dir="ltr">
                        <div>
                          <div><br>
                          </div>
                          <div><br>
                          </div>
                          <div>QEMU </div>
                          <div>5.1654731 Stack: 5.1654731 c18ea844
                            claea9a0 00000000 fffffffa d?861efc 00008001
                            d?8611 a35f91 5.1654731 cl8ddba8 d?861efc
                            d7861efc fffffffa 00000000 d7b6e000 cl8dd6
                            ff3dc0 5.1654731 d7b6e000 6e6b6e75 2d6e??61
                            636f 6c62 2c30286b c1002930 d78611 13c248
                            5.1654731 </div>
                          <div>Call Trace: </div>
                          <div>5.1654731 l&lt;c1a35f91&gt;1
                            mount_block_root+Ox158/0x1de </div>
                          <div>5.1654731 l&lt;c1002930&gt;1 ?
                            do_general_protection+0x40/0x170 </div>
                          <div>5.1654731 l&lt;c113c248&gt;1 ?
                            SyS_mknod+0x28/0x30 </div>
                          <div>5.1654731 l&lt;cla3610a&gt;1
                            mount_root+Oxf3/Oxfb </div>
                          <div>5.1654731 l&lt;c1a36235&gt;1
                            prepare_namespace+0x123/0x167 </div>
                          <div>5.1654731 l&lt;c112cf30&gt;l ?
                            SyS_access+0x20/0x30 </div>
                          <div>5.1654731 l&lt;cla35cf7&gt;1
                            kernel_init_freeable+Ox1b5/0x1c2 </div>
                          <div>5.1654731 l&lt;c1a35545&gt;1 ?
                            do_early_param+0x74/0x74 </div>
                          <div>5.1654731 l&lt;c174caab&gt;1
                            kernel_init+Oxb/Oxe0</div>
                          <div>5.1654731 l&lt;c175a041&gt;1
                            ret_from_kernel_thread+0x21/0x30 </div>
                          <div>5.1654731 l&lt;c174caa0&gt;1 ?
                            rest_init+0x60/0x60</div>
                          <div>5.1654731 Code: 00 00 00 00 31 ff 83 3d
                            8c a9 ae cl 00 74 05 e8 Oe dO 9 c? 44 24 04
                            a0 a9 ae cl c7 04 24 44 a8 Be cl e8 b6 05 00
                            00 fb 3116 &lt;35&gt;1 15 83 75 f0 01 8b 45
                            f0 ff 15 80 a9 ae cl 01 c6 8d be 5.1654731
                            EIP: l&lt;c174f2e9&gt;1 panic+0x165/0x197
                            SS:ESP 0068:d7861eb8 5.1654731 --I end trace
                            a4Obaf277b417d8d 1-- <br>
                          </div>
                        </div>
                      </div>
                    </div>
                  </div>
                </blockquote>
              </span> This is probably because of the file system issue
              that I&#39;ve mentioned previously.<br>
              <blockquote type="cite">
                <div dir="ltr">
                  <div class="gmail_quote">
                    <div dir="ltr">
                      <div>
                        <div><br>
                        </div>
                        <div><br>
                        </div>
                        <div><br>
                        </div>
                      </div>
                      <div><br>
                      </div>
                      <div><br>
                      </div>
                      <div><br>
                      </div>
                      <div>Thanks</div>
                      <div>Harish </div>
                    </div>
                  </div>
                  <br>
                </div>
                <br>
                <fieldset></fieldset>
                <br>
                <pre>_______________________________________________
Kernelnewbies mailing list
<a href="mailto:Kernelnewbies@kernelnewbies.org" target="_blank">Kernelnewbies@kernelnewbies.org</a>
<a href="http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies" target="_blank">http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies</a>
</pre>
              </blockquote>
              <br>
              Raghavendra<br>
              <br>
-------------------------------------------------------------------------------------------------------------------------------
              <br>
              [ C-DAC is on Social-Media too. Kindly follow us at: <br>
              Facebook: <a href="https://www.facebook.com/CDACINDIA" target="_blank">https://www.facebook.com/CDACINDIA</a>
              &amp; Twitter: @cdacindia ]
              <br>
              <br>
              This e-mail is for the sole use of the intended
              recipient(s) and may
              <br>
              contain confidential and privileged information. If you
              are not the
              <br>
              intended recipient, please contact the sender by reply
              e-mail and destroy
              <br>
              all copies and the original message. Any unauthorized
              review, use,
              <br>
              disclosure, dissemination, forwarding, printing or copying
              of this email
              <br>
              is strictly prohibited and appropriate legal action will
              be taken.
              <br>
-------------------------------------------------------------------------------------------------------------------------------
            </div>
          </blockquote>
        </div>
        <br>
      </div>
      <br>
      <fieldset></fieldset>
      <br>
      <pre>_______________________________________________
Kernelnewbies mailing list
<a href="mailto:Kernelnewbies@kernelnewbies.org" target="_blank">Kernelnewbies@kernelnewbies.org</a>
<a href="http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies" target="_blank">http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies</a>
</pre>
    </blockquote>
    <br>
  <br>-------------------------------------------------------------------------------------------------------------------------------
<br>[ C-DAC is on Social-Media too. Kindly follow us at: 
<br>Facebook: <a href="https://www.facebook.com/CDACINDIA" target="_blank">https://www.facebook.com/CDACINDIA</a> &amp; Twitter: @cdacindia ]
<br>
<br>This e-mail is for the sole use of the intended recipient(s) and may
<br>contain confidential and privileged information. If you are not the
<br>intended recipient, please contact the sender by reply e-mail and destroy
<br>all copies and the original message. Any unauthorized review, use,
<br>disclosure, dissemination, forwarding, printing or copying of this email
<br>is strictly prohibited and appropriate legal action will be taken.
<br>-------------------------------------------------------------------------------------------------------------------------------
</div></div></div>

</blockquote></div><br></div>