【QEMU系统分析之实例篇(十三)】

2024-05-04 15:20

本文主要是介绍【QEMU系统分析之实例篇(十三)】,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!

系列文章目录

第十三章 QEMU系统仿真的机器创建分析实例


文章目录

  • 系列文章目录
    • 第十三章 QEMU系统仿真的机器创建分析实例
  • 前言
  • 一、QEMU是什么?
  • 二、QEMU系统仿真的机器创建分析实例
    • 1.系统仿真的命令行参数
    • 2.完成早期后端驱动的设置工作
      • qemu_create_early_backends()
        • qemu_console_early_init();
        • object_option_foreach_add(object_create_early)
        • 初始化字符设备
        • configure_blockdev(&bdo_queue, machine_class, snapshot)
        • audio_init_audiodevs()
        • audio_create_default_audiodevs()
    • 3.调试输出
  • 总结


前言

本文以 QEMU 8.2.2 为例,分析其作为系统仿真工具的工作过程,并为读者展示各种 QEMU 系统仿真的启动配置实例。
本文读者需要具备一定的 QEMU 系统仿真使用经验,并对 C 语言编程有一定了解。


一、QEMU是什么?

QEMU 是一个通用且开源的机器模拟器和虚拟机。
其官方主页是:https://www.qemu.org/


二、QEMU系统仿真的机器创建分析实例

1.系统仿真的命令行参数

QEMU 作为系统仿真工具,其入口代码在 system/main.c 文件中,初始化函数 qemu_init() 的实现在 system/vl.c 文件中。
前文完成创建目标机器的过程分析,本文将继续后续运行过程的分析,读者需要对 QEMU 系统启动过程的程序代码有所了解,相关内容可以参考《QEMU系统分析之启动篇》系列文章。

..\qemu\8.2.2-qkd\qemu-system-x86_64.exe -cpu "Penryn" -M  "q35,accel=whpx,smm=off" -m "6G" -display "sdl" -audio "sdl,model=hda" -vga "std" -L "data"

2.完成早期后端驱动的设置工作

这部分代码在 system/vl.c 文件中,实现如下:

int qemu_init(int argc, char **argv)
{
...qemu_create_early_backends();
...
}

前文分析了创建显示输出和默认设备的过程,本文将继续逐步跟踪创建早期后端驱动的过程,看看系统需要提前创建哪些后端驱动。


qemu_create_early_backends()

函数 qemu_create_early_backends() 代码如下:

static void qemu_create_early_backends(void)
{MachineClass *machine_class = MACHINE_GET_CLASS(current_machine);
#if defined(CONFIG_SDL)const bool use_sdl = (dpy.type == DISPLAY_TYPE_SDL);
#elseconst bool use_sdl = false;
#endif
#if defined(CONFIG_GTK)const bool use_gtk = (dpy.type == DISPLAY_TYPE_GTK);
#elseconst bool use_gtk = false;
#endifif (dpy.has_window_close && !use_gtk && !use_sdl) {error_report("window-close is only valid for GTK and SDL, ""ignoring option");}qemu_console_early_init();if (dpy.has_gl && dpy.gl != DISPLAYGL_MODE_OFF && display_opengl == 0) {
#if defined(CONFIG_OPENGL)error_report("OpenGL is not supported by the display");
#elseerror_report("OpenGL support is disabled");
#endifexit(1);}object_option_foreach_add(object_create_early);/* spice needs the timers to be initialized by this point *//* spice must initialize before audio as it changes the default audiodev *//* spice must initialize before chardevs (for spicevmc and spiceport) */qemu_spice.init();qemu_opts_foreach(qemu_find_opts("chardev"),chardev_init_func, NULL, &error_fatal);#ifdef CONFIG_VIRTFSqemu_opts_foreach(qemu_find_opts("fsdev"),fsdev_init_func, NULL, &error_fatal);
#endif/** Note: we need to create audio and block backends before* setting machine properties, so they can be referred to.*/configure_blockdev(&bdo_queue, machine_class, snapshot);audio_init_audiodevs();if (default_audio) {audio_create_default_audiodevs();}
}

首先我们对控制台进行前期初始化,代码如下:

    qemu_console_early_init();

qemu_console_early_init();

代码如下:

void qemu_console_early_init(void)
{/* set the default vc driver */if (!object_class_by_name(TYPE_CHARDEV_VC)) {type_register(&char_vc_type_info);}
}

如果没有类型为 TYPE_CHARDEV_VC 的类,就注册这个类型。


object_option_foreach_add(object_create_early)

然后对需要提前创建的对象,将其加入对象选项表里。


初始化字符设备

接下来,对 ”chardev“ 设备调用函数 chardev_init_func() 完成字符设备的初始化,代码如下:

void qemu_display_early_init(DisplayOptions *opts)
{
...qemu_opts_foreach(qemu_find_opts("chardev"),chardev_init_func, NULL, &error_fatal);
...
}

configure_blockdev(&bdo_queue, machine_class, snapshot)

audio_init_audiodevs()

audio_create_default_audiodevs()

3.调试输出

首先,添加跟踪调试信息,修改后的代码如下:

```c
static void qemu_create_early_backends(void)
{...huedbg_flag = 1;HUEDBG("\n");huedbg_dump_device_configs(2);HUEDBG("\n");qemu_create_early_backends();HUEDBG("\n");huedbg_dump_device_configs(2);HUEDBG("\n");huedbg_flag = 0;...
}

运行后,输出信息如下:

[13832]../system/vl.c/qemu_init(3805):
[13832]D:/msys64/home/yuhui/gitee/mingw-qemu/util/huedbg_inline-device_config.c/huedbg_dump_device_configs(134):<<<deep>>>=[2] device_configs=[p(00007ff716d51cc0)]
[13832]D:/msys64/home/yuhui/gitee/mingw-qemu/util/huedbg_inline-device_config.c/huedbg_dump_device_configs(136):device_configs.tqh_first=[00000183981af480]
[13832]D:/msys64/home/yuhui/gitee/mingw-qemu/util/huedbg_inline-device_config.c/huedbg_dump_device_config(92):<<<deep>>>=[0] conf=[00000183981af480]
[13832]D:/msys64/home/yuhui/gitee/mingw-qemu/util/huedbg_inline-device_config.c/huedbg_dump_device_config(94):type=[1]
[13832]D:/msys64/home/yuhui/gitee/mingw-qemu/util/huedbg_inline-device_config.c/huedbg_dump_device_config(98):cmdline=[vc:80Cx24C]
[13832]D:/msys64/home/yuhui/gitee/mingw-qemu/util/huedbg_inline-device_config.c/huedbg_dump_device_config(99):loc=[p(00000183981af490)]
[13832]D:/msys64/home/yuhui/gitee/mingw-qemu/util/huedbg_inline-device_config.c/huedbg_dump_device_config(100):next=[p(00000183981af4a8)]
[13832]D:/msys64/home/yuhui/gitee/mingw-qemu/util/huedbg_inline-device_config.c/huedbg_dump_device_config(101):next.tqe_next=[00000183981ae7c0]
[13832]D:/msys64/home/yuhui/gitee/mingw-qemu/util/huedbg_inline-device_config.c/huedbg_dump_device_config(92):<<<deep>>>=[0] conf=[00000183981ae7c0]
[13832]D:/msys64/home/yuhui/gitee/mingw-qemu/util/huedbg_inline-device_config.c/huedbg_dump_device_config(94):type=[2]
[13832]D:/msys64/home/yuhui/gitee/mingw-qemu/util/huedbg_inline-device_config.c/huedbg_dump_device_config(98):cmdline=[vc:80Cx24C]
[13832]D:/msys64/home/yuhui/gitee/mingw-qemu/util/huedbg_inline-device_config.c/huedbg_dump_device_config(99):loc=[p(00000183981ae7d0)]
[13832]D:/msys64/home/yuhui/gitee/mingw-qemu/util/huedbg_inline-device_config.c/huedbg_dump_device_config(100):next=[p(00000183981ae7e8)]
[13832]D:/msys64/home/yuhui/gitee/mingw-qemu/util/huedbg_inline-device_config.c/huedbg_dump_device_config(101):next.tqe_next=[0000000000000000]
[13832]D:/msys64/home/yuhui/gitee/mingw-qemu/util/huedbg_inline-device_config.c/huedbg_dump_device_configs(141):device_configs.tqh_circ.tql_next=[00000183981af480]
[13832]D:/msys64/home/yuhui/gitee/mingw-qemu/util/huedbg_inline-device_config.c/huedbg_dump_device_configs(142):device_configs.tqh_circ.tql_prev=[00000183981ae7e8]
[13832]../system/vl.c/qemu_init(3807):
[13832]../ui/console-vc.c/qemu_console_early_init(1085):enter
[13832]../qom/object.c/object_class_by_name(1095):enter
[13832]../qom/object.c/type_table_lookup(103):lookup type(chardev-vc) in hash table
[13832]../qom/object.c/object_class_by_name(1099):no type return
[13832]../ui/console-vc.c/qemu_console_early_init(1088):run
[13832]../qom/object.c/type_table_lookup(103):lookup type(chardev-vc) in hash table
[13832]../ui/console-vc.c/qemu_console_early_init(1090):run
[13832]../ui/console-vc.c/qemu_console_early_init(1092):exit
[13832]../qom/object.c/object_class_by_name(1095):enter
[13832]../qom/object.c/type_table_lookup(103):lookup type(chardev-vc) in hash table
[13832]../qom/object.c/type_table_lookup(103):lookup type(chardev) in hash table
[13832]../qom/object.c/type_get_parent(194):parent_type(chardev)
[13832]../qom/object.c/type_get_parent(194):parent_type(chardev)
[13832]../qom/object.c/type_get_parent(194):parent_type(object)
[13832]../qom/object.c/type_get_parent(194):parent_type(chardev)
[13832]../qom/object.c/type_get_parent(194):parent_type(object)
[13832]../qom/object.c/type_get_parent(196):no parent_type
[13832]../qom/object.c/type_initialize(337):name=[chardev-vc] new ti->class enter
[13832]../qom/object.c/type_get_parent(194):parent_type(chardev)
[13832]../qom/object.c/type_get_parent(194):parent_type(object)
[13832]../qom/object.c/type_get_parent(196):no parent_type
[13832]../ui/console-vc.c/char_vc_class_init(1065):enter
[13832]../qom/object.c/type_table_lookup(103):lookup type(chardev) in hash table
[13832]../qom/object.c/type_get_parent(194):parent_type(chardev)
[13832]../ui/console-vc.c/char_vc_class_init(1073):exit
[13832]../qom/object.c/type_initialize(410):name=[chardev-vc] new class return
[13832]../qom/object.c/object_class_by_name(1105):class(chardev-vc) return
[13832]../qom/object.c/type_table_lookup(103):lookup type(chardev) in hash table
[13832]../qom/object.c/type_get_parent(194):parent_type(chardev)
[13832]../qom/object.c/object_class_by_name(1095):enter
[13832]../qom/object.c/type_table_lookup(103):lookup type(chardev-vc) in hash table
[13832]../qom/object.c/object_class_by_name(1105):class(chardev-vc) return
[13832]../qom/object.c/type_table_lookup(103):lookup type(chardev) in hash table
[13832]../qom/object.c/type_get_parent(194):parent_type(chardev)
[13832]../qom/object.c/type_table_lookup(103):lookup type(chardev-vc) in hash table
[13832]../qom/object.c/object_new_with_type(789):try type_initialize(chardev-vc)
[13832]../qom/object.c/object_new_with_type(799):obj(chardev-vc) alloc
[13832]../qom/object.c/object_new_with_type(808):try object_initialize_with_type(chardev-vc)
[13832]../qom/object.c/object_initialize_with_type(568):obj with type(chardev-vc) enter
[13832]../qom/object.c/object_initialize_with_type(576):mapping obj(chardev-vc).class with type(chardev-vc).class
[13832]../qom/object.c/object_initialize_with_type(579):try object_class_property_init_all(chardev-vc)
[13832]../qom/object.c/object_class_property_init_all(552):obj(chardev-vc) enter
[13832]../qom/object.c/object_class_property_iter_init(1440):objclass{chardev-vc} enter
[13832]../qom/object.c/object_class_get_parent(1130):enter
[13832]../qom/object.c/type_get_parent(194):parent_type(chardev)
[13832]../qom/object.c/object_class_get_parent(1138):objclass(chardev-vc) has parent(chardev)
[13832]../qom/object.c/object_class_get_parent(1141):objclass(chardev-vc) return
[13832]../qom/object.c/object_class_property_iter_init(1443):objclass{chardev-vc} return
[13832]../qom/object.c/object_class_get_parent(1130):enter
[13832]../qom/object.c/type_get_parent(194):parent_type(object)
[13832]../qom/object.c/object_class_get_parent(1138):objclass(chardev) has parent(object)
[13832]../qom/object.c/object_class_get_parent(1141):objclass(chardev) return
[13832]../qom/object.c/object_class_get_parent(1130):enter
[13832]../qom/object.c/type_get_parent(196):no parent_type
[13832]../qom/object.c/object_class_get_parent(1134):objclass(object) has no parent return
[13832]../qom/object.c/object_class_property_init_all(555):prop name=[type] type=[string] desc=[(null)] init=[0000000000000000]
[13832]../qom/object.c/object_class_property_init_all(563):obj(chardev-vc) return
[13832]../qom/object.c/object_initialize_with_type(583):try object_init_with_type(chardev-vc)
[13832]../qom/object.c/object_init_with_type(416):obj->class->type->name=[chardev-vc] ti->name=[chardev-vc] enter
[13832]../qom/object.c/type_get_parent(194):parent_type(chardev)
[13832]../qom/object.c/object_init_with_type(416):obj->class->type->name=[chardev-vc] ti->name=[chardev] enter
[13832]../qom/object.c/type_get_parent(194):parent_type(object)
[13832]../qom/object.c/object_init_with_type(416):obj->class->type->name=[chardev-vc] ti->name=[object] enter
[13832]../qom/object.c/object_init_with_type(427):obj->class->type->name=[chardev-vc] ti->name=[object] return
[13832]../qom/object.c/object_init_with_type(423):name=[chardev] ti->instance_init() before
[13832]../qom/object.c/type_table_lookup(103):lookup type(chardev) in hash table
[13832]../qom/object.c/type_get_parent(194):parent_type(chardev)
[13832]../qom/object.c/object_init_with_type(425):name=[chardev] ti->instance_init() after
[13832]../qom/object.c/object_init_with_type(427):obj->class->type->name=[chardev-vc] ti->name=[chardev] return
[13832]../qom/object.c/object_init_with_type(427):obj->class->type->name=[chardev-vc] ti->name=[chardev-vc] return
[13832]../qom/object.c/object_initialize_with_type(585):try object_post_init_with_type(chardev-vc)
[13832]../qom/object.c/object_post_init_with_type(433):obj->class->type->name=[chardev-vc] ti->name=[chardev-vc] enter
[13832]../qom/object.c/type_get_parent(194):parent_type(chardev)
[13832]../qom/object.c/object_post_init_with_type(433):obj->class->type->name=[chardev-vc] ti->name=[chardev] enter
[13832]../qom/object.c/type_get_parent(194):parent_type(object)
[13832]../qom/object.c/object_post_init_with_type(433):obj->class->type->name=[chardev-vc] ti->name=[object] enter
[13832]../qom/object.c/object_post_init_with_type(444):return
[13832]../qom/object.c/object_post_init_with_type(444):return
[13832]../qom/object.c/object_post_init_with_type(444):return
[13832]../qom/object.c/object_initialize_with_type(587):obj(chardev-vc) return
[13832]../qom/object.c/object_new_with_type(812):obj(chardev-vc) return
[13832]../ui/console-vc.c/vc_chr_open(978):enter
[13832]../qom/object.c/type_table_lookup(103):lookup type(chardev-vc) in hash table
[13832]../qom/object.c/type_table_lookup(103):lookup type(qemu-fixed-text-console) in hash table
[13832]../qom/object.c/object_new_with_type(789):try type_initialize(qemu-fixed-text-console)
[13832]../qom/object.c/object_new_with_type(799):obj(qemu-fixed-text-console) alloc
[13832]../qom/object.c/object_new_with_type(808):try object_initialize_with_type(qemu-fixed-text-console)
[13832]../qom/object.c/object_initialize_with_type(568):obj with type(qemu-fixed-text-console) enter
[13832]../qom/object.c/object_initialize_with_type(576):mapping obj(qemu-fixed-text-console).class with type(qemu-fixed-text-console).class
[13832]../qom/object.c/object_initialize_with_type(579):try object_class_property_init_all(qemu-fixed-text-console)
[13832]../qom/object.c/object_class_property_init_all(552):obj(qemu-fixed-text-console) enter
[13832]../qom/object.c/object_class_property_iter_init(1440):objclass{qemu-fixed-text-console} enter
[13832]../qom/object.c/object_class_get_parent(1130):enter
[13832]../qom/object.c/type_get_parent(194):parent_type(qemu-text-console)
[13832]../qom/object.c/object_class_get_parent(1138):objclass(qemu-fixed-text-console) has parent(qemu-text-console)
[13832]../qom/object.c/object_class_get_parent(1141):objclass(qemu-fixed-text-console) return
[13832]../qom/object.c/object_class_property_iter_init(1443):objclass{qemu-fixed-text-console} return
[13832]../qom/object.c/object_class_get_parent(1130):enter
[13832]../qom/object.c/type_get_parent(194):parent_type(qemu-console)
[13832]../qom/object.c/object_class_get_parent(1138):objclass(qemu-text-console) has parent(qemu-console)
[13832]../qom/object.c/object_class_get_parent(1141):objclass(qemu-text-console) return
[13832]../qom/object.c/object_class_get_parent(1130):enter
[13832]../qom/object.c/type_get_parent(194):parent_type(object)
[13832]../qom/object.c/object_class_get_parent(1138):objclass(qemu-console) has parent(object)
[13832]../qom/object.c/object_class_get_parent(1141):objclass(qemu-console) return
[13832]../qom/object.c/object_class_get_parent(1130):enter
[13832]../qom/object.c/type_get_parent(196):no parent_type
[13832]../qom/object.c/object_class_get_parent(1134):objclass(object) has no parent return
[13832]../qom/object.c/object_class_property_init_all(555):prop name=[type] type=[string] desc=[(null)] init=[0000000000000000]
[13832]../qom/object.c/object_class_property_init_all(563):obj(qemu-fixed-text-console) return
[13832]../qom/object.c/object_initialize_with_type(583):try object_init_with_type(qemu-fixed-text-console)
[13832]../qom/object.c/object_init_with_type(416):obj->class->type->name=[qemu-fixed-text-console] ti->name=[qemu-fixed-text-console] enter
[13832]../qom/object.c/type_get_parent(194):parent_type(qemu-text-console)
[13832]../qom/object.c/object_init_with_type(416):obj->class->type->name=[qemu-fixed-text-console] ti->name=[qemu-text-console] enter
[13832]../qom/object.c/type_get_parent(194):parent_type(qemu-console)
[13832]../qom/object.c/object_init_with_type(416):obj->class->type->name=[qemu-fixed-text-console] ti->name=[qemu-console] enter
[13832]../qom/object.c/type_get_parent(194):parent_type(object)
[13832]../qom/object.c/object_init_with_type(416):obj->class->type->name=[qemu-fixed-text-console] ti->name=[object] enter
[13832]../qom/object.c/object_init_with_type(427):obj->class->type->name=[qemu-fixed-text-console] ti->name=[object] return
[13832]../qom/object.c/object_init_with_type(423):name=[qemu-console] ti->instance_init() before
[13832]../qom/object.c/type_table_lookup(103):lookup type(qemu-console) in hash table
[13832]../qom/object.c/type_get_parent(194):parent_type(qemu-text-console)
[13832]../qom/object.c/type_get_parent(194):parent_type(qemu-console)
[13832]../qom/object.c/object_init_with_type(425):name=[qemu-console] ti->instance_init() after
[13832]../qom/object.c/object_init_with_type(427):obj->class->type->name=[qemu-fixed-text-console] ti->name=[qemu-console] return
[13832]../qom/object.c/object_init_with_type(423):name=[qemu-text-console] ti->instance_init() before
[13832]../qom/object.c/type_table_lookup(103):lookup type(qemu-text-console) in hash table
[13832]../qom/object.c/type_get_parent(194):parent_type(qemu-text-console)
[13832]../qom/object.c/type_table_lookup(103):lookup type(qemu-console) in hash table
[13832]../qom/object.c/type_get_parent(194):parent_type(qemu-text-console)
[13832]../qom/object.c/type_get_parent(194):parent_type(qemu-console)
[13832]../qom/object.c/object_init_with_type(425):name=[qemu-text-console] ti->instance_init() after
[13832]../qom/object.c/object_init_with_type(427):obj->class->type->name=[qemu-fixed-text-console] ti->name=[qemu-text-console] return
[13832]../qom/object.c/object_init_with_type(423):name=[qemu-fixed-text-console] ti->instance_init() before
[13832]../qom/object.c/object_init_with_type(425):name=[qemu-fixed-text-console] ti->instance_init() after
[13832]../qom/object.c/object_init_with_type(427):obj->class->type->name=[qemu-fixed-text-console] ti->name=[qemu-fixed-text-console] return
[13832]../qom/object.c/object_initialize_with_type(585):try object_post_init_with_type(qemu-fixed-text-console)
[13832]../qom/object.c/object_post_init_with_type(433):obj->class->type->name=[qemu-fixed-text-console] ti->name=[qemu-fixed-text-console] enter
[13832]../qom/object.c/type_get_parent(194):parent_type(qemu-text-console)
[13832]../qom/object.c/object_post_init_with_type(433):obj->class->type->name=[qemu-fixed-text-console] ti->name=[qemu-text-console] enter
[13832]../qom/object.c/type_get_parent(194):parent_type(qemu-console)
[13832]../qom/object.c/object_post_init_with_type(433):obj->class->type->name=[qemu-fixed-text-console] ti->name=[qemu-console] enter
[13832]../qom/object.c/type_get_parent(194):parent_type(object)
[13832]../qom/object.c/object_post_init_with_type(433):obj->class->type->name=[qemu-fixed-text-console] ti->name=[object] enter
[13832]../qom/object.c/object_post_init_with_type(444):return
[13832]../qom/object.c/object_post_init_with_type(444):return
[13832]../qom/object.c/object_post_init_with_type(444):return
[13832]../qom/object.c/object_post_init_with_type(444):return
[13832]../qom/object.c/object_initialize_with_type(587):obj(qemu-fixed-text-console) return
[13832]../qom/object.c/object_new_with_type(812):obj(qemu-fixed-text-console) return
[13832]../ui/console-vc.c/vc_chr_open(1026):enter
[13832]../qom/object.c/object_class_get_parent(1130):enter
[13832]../qom/object.c/type_get_parent(194):parent_type(object)
[13832]../qom/object.c/object_class_get_parent(1138):objclass(container) has parent(object)
[13832]../qom/object.c/object_class_get_parent(1141):objclass(container) return
[13832]../qom/object.c/object_class_get_parent(1130):enter
[13832]../qom/object.c/type_get_parent(196):no parent_type
[13832]../qom/object.c/object_class_get_parent(1134):objclass(object) has no parent return
[13832]../qom/object.c/type_table_lookup(103):lookup type(container) in hash table
[13832]../qom/object.c/object_new_with_type(789):try type_initialize(container)
[13832]../qom/object.c/object_new_with_type(799):obj(container) alloc
[13832]../qom/object.c/object_new_with_type(808):try object_initialize_with_type(container)
[13832]../qom/object.c/object_initialize_with_type(568):obj with type(container) enter
[13832]../qom/object.c/object_initialize_with_type(576):mapping obj(container).class with type(container).class
[13832]../qom/object.c/object_initialize_with_type(579):try object_class_property_init_all(container)
[13832]../qom/object.c/object_class_property_init_all(552):obj(container) enter
[13832]../qom/object.c/object_class_property_iter_init(1440):objclass{container} enter
[13832]../qom/object.c/object_class_get_parent(1130):enter
[13832]../qom/object.c/type_get_parent(194):parent_type(object)
[13832]../qom/object.c/object_class_get_parent(1138):objclass(container) has parent(object)
[13832]../qom/object.c/object_class_get_parent(1141):objclass(container) return
[13832]../qom/object.c/object_class_property_iter_init(1443):objclass{container} return
[13832]../qom/object.c/object_class_get_parent(1130):enter
[13832]../qom/object.c/type_get_parent(196):no parent_type
[13832]../qom/object.c/object_class_get_parent(1134):objclass(object) has no parent return
[13832]../qom/object.c/object_class_property_init_all(555):prop name=[type] type=[string] desc=[(null)] init=[0000000000000000]
[13832]../qom/object.c/object_class_property_init_all(563):obj(container) return
[13832]../qom/object.c/object_initialize_with_type(583):try object_init_with_type(container)
[13832]../qom/object.c/object_init_with_type(416):obj->class->type->name=[container] ti->name=[container] enter
[13832]../qom/object.c/type_get_parent(194):parent_type(object)
[13832]../qom/object.c/object_init_with_type(416):obj->class->type->name=[container] ti->name=[object] enter
[13832]../qom/object.c/object_init_with_type(427):obj->class->type->name=[container] ti->name=[object] return
[13832]../qom/object.c/object_init_with_type(427):obj->class->type->name=[container] ti->name=[container] return
[13832]../qom/object.c/object_initialize_with_type(585):try object_post_init_with_type(container)
[13832]../qom/object.c/object_post_init_with_type(433):obj->class->type->name=[container] ti->name=[container] enter
[13832]../qom/object.c/type_get_parent(194):parent_type(object)
[13832]../qom/object.c/object_post_init_with_type(433):obj->class->type->name=[container] ti->name=[object] enter
[13832]../qom/object.c/object_post_init_with_type(444):return
[13832]../qom/object.c/object_post_init_with_type(444):return
[13832]../qom/object.c/object_initialize_with_type(587):obj(container) return
[13832]../qom/object.c/object_new_with_type(812):obj(container) return
[13832]../qom/object.c/object_property_try_add(1309):name=[chardevs] enter!
[13832]../qom/object.c/object_class_get_parent(1130):enter
[13832]../qom/object.c/type_get_parent(194):parent_type(object)
[13832]../qom/object.c/object_class_get_parent(1138):objclass(container) has parent(object)
[13832]../qom/object.c/object_class_get_parent(1141):objclass(container) return
[13832]../qom/object.c/object_class_get_parent(1130):enter
[13832]../qom/object.c/type_get_parent(196):no parent_type
[13832]../qom/object.c/object_class_get_parent(1134):objclass(object) has no parent return
[13832]../qom/object.c/object_property_try_add(1350):name=[chardevs] return-3!
[13832]../qom/object.c/object_property_try_add(1309):name=[compat_monitor0] enter!
[13832]../qom/object.c/object_class_get_parent(1130):enter
[13832]../qom/object.c/type_get_parent(194):parent_type(object)
[13832]../qom/object.c/object_class_get_parent(1138):objclass(container) has parent(object)
[13832]../qom/object.c/object_class_get_parent(1141):objclass(container) return
[13832]../qom/object.c/object_class_get_parent(1130):enter
[13832]../qom/object.c/type_get_parent(196):no parent_type
[13832]../qom/object.c/object_class_get_parent(1134):objclass(object) has no parent return
[13832]../qom/object.c/object_property_try_add(1350):name=[compat_monitor0] return-3!
[13832]../system/vl.c/qemu_create_early_backends(2027):
[13832]../blockdev.c/drive_new(879):value=[cdrom]
[13832]../blockdev.c/drive_new(1019):
[13832]../blockdev.c/blockdev_init(484):
[13832]../blockdev.c/drive_new(1021):
[13832]../blockdev.c/drive_new(879):value=[(null)]
[13832]../blockdev.c/drive_new(1019):
[13832]../blockdev.c/blockdev_init(484):
[13832]../blockdev.c/drive_new(1021):
[13832]../system/vl.c/qemu_create_early_backends(2029):
[13832]../system/vl.c/qemu_create_early_backends(2031):
[13832]../system/vl.c/qemu_init(3809):
[13832]D:/msys64/home/yuhui/gitee/mingw-qemu/util/huedbg_inline-device_config.c/huedbg_dump_device_configs(134):<<<deep>>>=[2] device_configs=[p(00007ff716d51cc0)]
[13832]D:/msys64/home/yuhui/gitee/mingw-qemu/util/huedbg_inline-device_config.c/huedbg_dump_device_configs(136):device_configs.tqh_first=[00000183981af480]
[13832]D:/msys64/home/yuhui/gitee/mingw-qemu/util/huedbg_inline-device_config.c/huedbg_dump_device_config(92):<<<deep>>>=[0] conf=[00000183981af480]
[13832]D:/msys64/home/yuhui/gitee/mingw-qemu/util/huedbg_inline-device_config.c/huedbg_dump_device_config(94):type=[1]
[13832]D:/msys64/home/yuhui/gitee/mingw-qemu/util/huedbg_inline-device_config.c/huedbg_dump_device_config(98):cmdline=[vc:80Cx24C]
[13832]D:/msys64/home/yuhui/gitee/mingw-qemu/util/huedbg_inline-device_config.c/huedbg_dump_device_config(99):loc=[p(00000183981af490)]
[13832]D:/msys64/home/yuhui/gitee/mingw-qemu/util/huedbg_inline-device_config.c/huedbg_dump_device_config(100):next=[p(00000183981af4a8)]
[13832]D:/msys64/home/yuhui/gitee/mingw-qemu/util/huedbg_inline-device_config.c/huedbg_dump_device_config(101):next.tqe_next=[00000183981ae7c0]
[13832]D:/msys64/home/yuhui/gitee/mingw-qemu/util/huedbg_inline-device_config.c/huedbg_dump_device_config(92):<<<deep>>>=[0] conf=[00000183981ae7c0]
[13832]D:/msys64/home/yuhui/gitee/mingw-qemu/util/huedbg_inline-device_config.c/huedbg_dump_device_config(94):type=[2]
[13832]D:/msys64/home/yuhui/gitee/mingw-qemu/util/huedbg_inline-device_config.c/huedbg_dump_device_config(98):cmdline=[vc:80Cx24C]
[13832]D:/msys64/home/yuhui/gitee/mingw-qemu/util/huedbg_inline-device_config.c/huedbg_dump_device_config(99):loc=[p(00000183981ae7d0)]
[13832]D:/msys64/home/yuhui/gitee/mingw-qemu/util/huedbg_inline-device_config.c/huedbg_dump_device_config(100):next=[p(00000183981ae7e8)]
[13832]D:/msys64/home/yuhui/gitee/mingw-qemu/util/huedbg_inline-device_config.c/huedbg_dump_device_config(101):next.tqe_next=[0000000000000000]
[13832]D:/msys64/home/yuhui/gitee/mingw-qemu/util/huedbg_inline-device_config.c/huedbg_dump_device_configs(141):device_configs.tqh_circ.tql_next=[00000183981af480]
[13832]D:/msys64/home/yuhui/gitee/mingw-qemu/util/huedbg_inline-device_config.c/huedbg_dump_device_configs(142):device_configs.tqh_circ.tql_prev=[00000183981ae7e8]

总结

以上分析了系统初始化过程中创建早期后端驱动的过程。

这篇关于【QEMU系统分析之实例篇(十三)】的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!



http://www.chinasem.cn/article/959509

相关文章

前端原生js实现拖拽排课效果实例

《前端原生js实现拖拽排课效果实例》:本文主要介绍如何实现一个简单的课程表拖拽功能,通过HTML、CSS和JavaScript的配合,我们实现了课程项的拖拽、放置和显示功能,文中通过实例代码介绍的... 目录1. 效果展示2. 效果分析2.1 关键点2.2 实现方法3. 代码实现3.1 html部分3.2

mysqld_multi在Linux服务器上运行多个MySQL实例

《mysqld_multi在Linux服务器上运行多个MySQL实例》在Linux系统上使用mysqld_multi来启动和管理多个MySQL实例是一种常见的做法,这种方式允许你在同一台机器上运行多个... 目录1. 安装mysql2. 配置文件示例配置文件3. 创建数据目录4. 启动和管理实例启动所有实例

Java function函数式接口的使用方法与实例

《Javafunction函数式接口的使用方法与实例》:本文主要介绍Javafunction函数式接口的使用方法与实例,函数式接口如一支未完成的诗篇,用Lambda表达式作韵脚,将代码的机械美感... 目录引言-当代码遇见诗性一、函数式接口的生物学解构1.1 函数式接口的基因密码1.2 六大核心接口的形态学

java图像识别工具类(ImageRecognitionUtils)使用实例详解

《java图像识别工具类(ImageRecognitionUtils)使用实例详解》:本文主要介绍如何在Java中使用OpenCV进行图像识别,包括图像加载、预处理、分类、人脸检测和特征提取等步骤... 目录前言1. 图像识别的背景与作用2. 设计目标3. 项目依赖4. 设计与实现 ImageRecogni

Java操作ElasticSearch的实例详解

《Java操作ElasticSearch的实例详解》Elasticsearch是一个分布式的搜索和分析引擎,广泛用于全文搜索、日志分析等场景,本文将介绍如何在Java应用中使用Elastics... 目录简介环境准备1. 安装 Elasticsearch2. 添加依赖连接 Elasticsearch1. 创

使用C#代码计算数学表达式实例

《使用C#代码计算数学表达式实例》这段文字主要讲述了如何使用C#语言来计算数学表达式,该程序通过使用Dictionary保存变量,定义了运算符优先级,并实现了EvaluateExpression方法来... 目录C#代码计算数学表达式该方法很长,因此我将分段描述下面的代码片段显示了下一步以下代码显示该方法如

Oracle Expdp按条件导出指定表数据的方法实例

《OracleExpdp按条件导出指定表数据的方法实例》:本文主要介绍Oracle的expdp数据泵方式导出特定机构和时间范围的数据,并通过parfile文件进行条件限制和配置,文中通过代码介绍... 目录1.场景描述 2.方案分析3.实验验证 3.1 parfile文件3.2 expdp命令导出4.总结

MySQL的索引失效的原因实例及解决方案

《MySQL的索引失效的原因实例及解决方案》这篇文章主要讨论了MySQL索引失效的常见原因及其解决方案,它涵盖了数据类型不匹配、隐式转换、函数或表达式、范围查询、LIKE查询、OR条件、全表扫描、索引... 目录1. 数据类型不匹配2. 隐式转换3. 函数或表达式4. 范围查询之后的列5. like 查询6

Python开发围棋游戏的实例代码(实现全部功能)

《Python开发围棋游戏的实例代码(实现全部功能)》围棋是一种古老而复杂的策略棋类游戏,起源于中国,已有超过2500年的历史,本文介绍了如何用Python开发一个简单的围棋游戏,实例代码涵盖了游戏的... 目录1. 围棋游戏概述1.1 游戏规则1.2 游戏设计思路2. 环境准备3. 创建棋盘3.1 棋盘类

【机器学习】高斯过程的基本概念和应用领域以及在python中的实例

引言 高斯过程(Gaussian Process,简称GP)是一种概率模型,用于描述一组随机变量的联合概率分布,其中任何一个有限维度的子集都具有高斯分布 文章目录 引言一、高斯过程1.1 基本定义1.1.1 随机过程1.1.2 高斯分布 1.2 高斯过程的特性1.2.1 联合高斯性1.2.2 均值函数1.2.3 协方差函数(或核函数) 1.3 核函数1.4 高斯过程回归(Gauss