QEMU 中关于CPU初始化的重要函数调用栈

版权声明:本文为博主原创文章,遵循 CC 4.0 by-sa 版权协议,转载请附上原文出处链接和本声明。
本文链接:https://blog.csdn.net/leoufung/article/details/49155193

QEMU的版本是v2.4.0.1之后的


Breakpoint 1, x86_cpu_realizefn (dev=0x55c743a33e70, errp=0x7ffef5886bb0) at /home/mce/workspace/git/qemu/qemu/target-i386/cpu.c:2821
2821    {
(gdb) bt
#0  x86_cpu_realizefn (dev=0x55c743a33e70, errp=0x7ffef5886bb0) at /home/mce/workspace/git/qemu/qemu/target-i386/cpu.c:2821
#1  0x000055c74234e8e1 in device_set_realized (obj=0x55c743a33e70, value=true, errp=0x7ffef5886d68) at hw/core/qdev.c:1055
#2  0x000055c7424bf771 in property_set_bool (obj=0x55c743a33e70, v=0x55c743a4eb30, opaque=0x55c743a24720, name=0x55c7425ac510 "realized", errp=0x7ffef5886d68) at qom/object.c:1708
#3  0x000055c7424bdda8 in object_property_set (obj=0x55c743a33e70, v=0x55c743a4eb30, name=0x55c7425ac510 "realized", errp=0x7ffef5886d68) at qom/object.c:965
#4  0x000055c7424c063f in object_property_set_qobject (obj=0x55c743a33e70, value=0x55c743a23bc0, name=0x55c7425ac510 "realized", errp=0x7ffef5886d68) at qom/qom-qobject.c:24
#5  0x000055c7424be03e in object_property_set_bool (obj=0x55c743a33e70, value=true, name=0x55c7425ac510 "realized", errp=0x7ffef5886d68) at qom/object.c:1034
#6  0x000055c742223ef3 in pc_new_cpu (cpu_model=0x55c7425ac5c5 "qemu64", apic_id=0, errp=0x7ffef5886dc0) at /home/mce/workspace/git/qemu/qemu/hw/i386/pc.c:1069
#7  0x000055c7422241b0 in pc_cpus_init (cpu_model=0x55c7425ac5c5 "qemu64") at /home/mce/workspace/git/qemu/qemu/hw/i386/pc.c:1145
#8  0x000055c742226c21 in pc_init1 (machine=0x55c7439d2ad0, host_type=0x55c7425ad217 "i440FX-pcihost", pci_type=0x55c7425ad210 "i440FX")
    at /home/mce/workspace/git/qemu/qemu/hw/i386/pc_piix.c:142
#9  0x000055c74222786f in pc_init_v2_5 (machine=0x55c7439d2ad0) at /home/mce/workspace/git/qemu/qemu/hw/i386/pc_piix.c:474
#10 0x000055c7422c9bdf in main (argc=17, argv=0x7ffef5887348, envp=0x7ffef58873d8) at vl.c:4474
(gdb) c
Continuing.
[Thread 0x7fdbdc40b700 (LWP 37527) exited]
[New Thread 0x7fdbdc40b700 (LWP 37538)]
[New Thread 0x7fdbd99ff700 (LWP 37540)]

Breakpoint 2, kvm_cpu_synchronize_post_init (cpu=0x55c743a33e70) at /home/mce/workspace/git/qemu/qemu/kvm-all.c:1804
1804        run_on_cpu(cpu, do_kvm_cpu_synchronize_post_init, cpu);
(gdb) bt
#0  kvm_cpu_synchronize_post_init (cpu=0x55c743a33e70) at /home/mce/workspace/git/qemu/qemu/kvm-all.c:1804
#1  0x000055c7421a6efd in cpu_synchronize_post_init (cpu=0x55c743a33e70) at /home/mce/workspace/git/qemu/qemu/include/sysemu/kvm.h:430
#2  0x000055c7421a8132 in cpu_synchronize_all_post_init () at /home/mce/workspace/git/qemu/qemu/cpus.c:693
#3  0x000055c7422c9bee in main (argc=17, argv=0x7ffef5887348, envp=0x7ffef58873d8) at vl.c:4480
(gdb) c
Continuing.
[Thread 0x7fdbd99ff700 (LWP 37540) exited]
[Switching to Thread 0x7fdbdc40b700 (LWP 37538)]

Breakpoint 3, do_kvm_cpu_synchronize_post_init (arg=0x55c743a33e70) at /home/mce/workspace/git/qemu/qemu/kvm-all.c:1796
1796        CPUState *cpu = arg;
(gdb) bt
#0  do_kvm_cpu_synchronize_post_init (arg=0x55c743a33e70) at /home/mce/workspace/git/qemu/qemu/kvm-all.c:1796
#1  0x000055c7421a898d in flush_queued_work (cpu=0x55c743a33e70) at /home/mce/workspace/git/qemu/qemu/cpus.c:962
#2  0x000055c7421a8a47 in qemu_wait_io_event_common (cpu=0x55c743a33e70) at /home/mce/workspace/git/qemu/qemu/cpus.c:981
#3  0x000055c7421a8b32 in qemu_kvm_wait_io_event (cpu=0x55c743a33e70) at /home/mce/workspace/git/qemu/qemu/cpus.c:1010
#4  0x000055c7421a8c7c in qemu_kvm_cpu_thread_fn (arg=0x55c743a33e70) at /home/mce/workspace/git/qemu/qemu/cpus.c:1050
#5  0x00007fdbe57dadf5 in start_thread () from /lib64/libpthread.so.0
#6  0x00007fdbe173c1ad in clone () from /lib64/libc.so.6
(gdb) c
Continuing.

Breakpoint 4, kvm_put_msr_feature_control (cpu=0x55c743a33e70) at /home/mce/workspace/git/qemu/qemu/target-i386/kvm.c:1311
1311    {
(gdb) c
Continuing.
[New Thread 0x7fdbd99ff700 (LWP 37549)]

Breakpoint 4, kvm_put_msr_feature_control (cpu=0x55c743a33e70) at /home/mce/workspace/git/qemu/qemu/target-i386/kvm.c:1311
1311    {
Missing separate debuginfos, use: debuginfo-install cyrus-sasl-md5-2.1.26-17.el7.x86_64 cyrus-sasl-plain-2.1.26-17.el7.x86_64 cyrus-sasl-scram-2.1.26-17.el7.x86_64 libdb-5.3.21-17.el7_0.1.x86_64
(gdb) 


(gdb) bt
#0  cpu_common_reset (cpu=0x5570a6b79e70) at qom/cpu.c:239
#1  0x00005570a4ef53ea in x86_cpu_reset (s=0x5570a6b79e70) at /home/mce/workspace/git/qemu/qemu/target-i386/cpu.c:2613
#2  0x00005570a51004e1 in cpu_reset (cpu=0x5570a6b79e70) at qom/cpu.c:233
#3  0x00005570a4ef5ff5 in x86_cpu_realizefn (dev=0x5570a6b79e70, errp=0x7ffe22d45750) at /home/mce/workspace/git/qemu/qemu/target-i386/cpu.c:2919
#4  0x00005570a4fd2921 in device_set_realized (obj=0x5570a6b79e70, value=true, errp=0x7ffe22d45908) at hw/core/qdev.c:1055
#5  0x00005570a51437c9 in property_set_bool (obj=0x5570a6b79e70, v=0x5570a6b94b30, opaque=0x5570a6b6a720, name=0x5570a5230570 "realized", errp=0x7ffe22d45908) at qom/object.c:1708
#6  0x00005570a5141e00 in object_property_set (obj=0x5570a6b79e70, v=0x5570a6b94b30, name=0x5570a5230570 "realized", errp=0x7ffe22d45908) at qom/object.c:965
#7  0x00005570a5144697 in object_property_set_qobject (obj=0x5570a6b79e70, value=0x5570a6b69bc0, name=0x5570a5230570 "realized", errp=0x7ffe22d45908) at qom/qom-qobject.c:24
#8  0x00005570a5142096 in object_property_set_bool (obj=0x5570a6b79e70, value=true, name=0x5570a5230570 "realized", errp=0x7ffe22d45908) at qom/object.c:1034
#9  0x00005570a4ea7ef3 in pc_new_cpu (cpu_model=0x5570a5230625 "qemu64", apic_id=0, errp=0x7ffe22d45960) at /home/mce/workspace/git/qemu/qemu/hw/i386/pc.c:1069
#10 0x00005570a4ea81b0 in pc_cpus_init (cpu_model=0x5570a5230625 "qemu64") at /home/mce/workspace/git/qemu/qemu/hw/i386/pc.c:1145
#11 0x00005570a4eaac21 in pc_init1 (machine=0x5570a6b18ad0, host_type=0x5570a5231277 "i440FX-pcihost", pci_type=0x5570a5231270 "i440FX")
    at /home/mce/workspace/git/qemu/qemu/hw/i386/pc_piix.c:142
#12 0x00005570a4eab86f in pc_init_v2_5 (machine=0x5570a6b18ad0) at /home/mce/workspace/git/qemu/qemu/hw/i386/pc_piix.c:474
#13 0x00005570a4f4dc1f in main (argc=17, argv=0x7ffe22d45ee8, envp=0x7ffe22d45f78) at vl.c:4474



x86_64
(gdb) bt
#0  x86_cpu_reset (s=0x55c470acfe70) at /home/mce/workspace/git/qemu/qemu/target-i386/cpu.c:2608
#1  0x000055c46f811471 in cpu_reset (cpu=0x55c470acfe70) at qom/cpu.c:232
#2  0x000055c46f606797 in x86_cpu_machine_reset_cb (opaque=0x55c470acfe70) at /home/mce/workspace/git/qemu/qemu/target-i386/cpu.c:2717
#3  0x000055c46f656ae1 in qemu_devices_reset () at vl.c:1698
#4  0x000055c46f5bb695 in pc_machine_reset () at /home/mce/workspace/git/qemu/qemu/hw/i386/pc.c:1927
#5  0x000055c46f656b66 in  (report=false) at vl.c:1709
#6  0x000055c46f65ee4f in main (argc=17, argv=0x7fff5ea92208, envp=0x7fff5ea92298) at vl.c:4584
(gdb) 


展开阅读全文

没有更多推荐了,返回首页