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

server/2024/9/20 1:31:43/ 标签: harmonyos, windows, 嵌入式硬件, macos, 网络

系列文章目录

第十三章 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]

总结

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


http://www.ppmy.cn/server/31778.html

相关文章

手写一个uart协议——rs232

先了解一下关于uart和rs232的基础知识 文章目录 一、RS232的回环测试1.1模块整体架构1.2 rx模块设计1.2.1 波形设计1.2.2代码实现与tb1.2.4 仿真 1.3 tx模块设计1.3.1 波形设计1.3.2 代码实现与tb1.3.4 顶层设计1.3.3 仿真 本篇内容&#xff1a; 一、RS232的回环测试 上位机…

算法提高之货币系统

算法提高之货币系统 核心思想&#xff1a;背包 贪心 贪心思路&#xff1a;将a从小到大排序&#xff0c;因为a数组中数如果能用之前的数线性表示则它一定没用 所以对每一个数 求其是否能用前i-1个数表示&#xff08;背包求方案数&#xff09;如果不能被其他数表示 就加入到b数组…

Django后台项目开发实战五

完成两个功能&#xff1a; HR 可以维护候选人信息面试官可以录入面试反馈 第五阶段 创建 interview 应用&#xff0c;实现候选人面试评估表的增删改功能&#xff0c;并且按照页面分组来展示不同的内容&#xff0c;如候选人基础信息&#xff0c;一面&#xff0c;二面的面试结…

【JVM】Java工具(Arthas,APM,Java Agent,JMX)

Java工具 常见的Java工具有以下几类&#xff1a; 1、诊断类工具&#xff0c;如Arthas、VisualVM等。 2、开发类工具&#xff0c;如Idea、Eclipse。 3、APM应用性能监测工具&#xff0c;如Skywalking、Zipkin等。 4、热部署工具&#xff0c;如Jrebel等。 Arthas中 Java Ag…

初识MVC

初识MVC 理论部分 今天第一次学MVC&#xff0c;拿到一个练手项目。现在来记录一下学习过程。 项目的背景就是个学生管理系统。我只做后端。 从大的来说MVC将应用程序分为三个主要组件&#xff08;部分&#xff09;&#xff1a; 模型&#xff08;Model&#xff09;是应用程序…

Springboot 学习之数据库配置项加密工具:ulisesbocchio

在 springboot 项目中&#xff0c;我们为了规避安全漏洞的问题&#xff0c;要对数据库连接的用户名和密码等信息加密处理。ulisesbocchio 是一款好用的加密插件&#xff0c;下面分享一下使用方法。 一.配置 mavan 依赖&#xff0c;直接使用 spring-boot-starter 方式 <depe…

定点小数_

目录 定点小数表示和运算 定点小数的原码 定点小时加减法运算 定点小数 vs 定点整数 定点小数表示和运算 定点小数的原码 定点小数原反补转换 定点小时加减法运算 定点小数 vs 定点整数 定点小数原码依然是 取值范围等比数列 符号位 定点小数 同样的:

tensorflow_decision_forests\tensorflow\ops\inference\inference.so not found

恰好有一个帖子提到了py3.10里面的解决方案 pip install --user tensorflow2.11.0My tensorflow version is 2.11.0 and my tensorflow_decision_forests version is 1.2.0 so those should be compatible. I also am using Python version 3.10.11原文链接&#xff1a; http…

创建和激活python虚拟环境(venv), 以及在vscode上运行python虚拟环境

最近使用python做项目&#xff0c;发现佬们都是在用python的虚拟环境来放项目。发现确实有一些优势在这之中&#xff0c; 首先就是隔离性&#xff0c;我们将每个项目放入相对应的环境配置&#xff0c;可以有效避免乱七八糟的库出现在解释器中。其次就是可移植性强&#xff0c;…

【C++风云录】图形和动作捕捉库全面解析:从OpenPose到OpenCV

深入浅出&#xff1a;六大计算机视觉和动作捕捉库的教程和比较 前言 本文将为读者详细介绍六种在计算机视觉领域广泛使用的开源软件和SDK&#xff0c;包括OpenPose、Vicon SDK、Intel RealSense SDK、Microsoft Kinect SDK、PCL (Point Cloud Library)和OpenCV。我们会一一解…

【前端学习——call和apply函数】

call()和apply()这两个方法的作用可以简单归纳为改变this指向&#xff0c;从而让我们的this指向不在是谁调用了函数就指向谁。 call()方法的作用和 apply() 方法类似&#xff0c;区别就是call()方法接受的是参数列表&#xff0c;而apply()方法接受的是一个参数数组。 https:/…

用C#写一个特性,在函数上面可以自动计算函数耗时情况

用C#写一个特性&#xff0c;在函数上面可以自动计算函数耗时情况 TimingAttribute类是自定义的特性类&#xff0c;用来标记需要计时的方法。TimingInterceptor类是一个拦截器&#xff0c;它通过反射来拦截被TimingAttribute标记的方法&#xff0c;并在方法执行前后进行计时。My…

面试题分享之Java集合篇(三)

注意&#xff1a;文章若有错误的地方&#xff0c;欢迎评论区里面指正 &#x1f36d; 系列文章目录 面试题分享之Java基础篇&#xff08;二&#xff09;面试题分享之Java基础篇&#xff08;三&#xff09; 面试题分享之Java集合篇&#xff08;一&#xff09;、 面试题分享之Ja…

Java 基础面试 -- 异常处理

一、引言 在Java编程中&#xff0c;异常处理是确保程序稳定性和健壮性的重要机制。当程序在运行时遇到不可预见的问题&#xff0c;如文件读取失败、网络错误、除零异常等&#xff0c;异常处理机制允许我们捕获这些错误&#xff0c;并进行相应的处理&#xff0c;从而避免程序崩…

SQL-慢查询的定位及优化

定位慢查询sql 启用慢查询日志&#xff1a; 确保MySQL实例已经启用了慢查询日志功能。可以通过以下命令查看是否启用&#xff1a; SHOW VARIABLES LIKE slow_query_log;如果未启用&#xff0c;可以通过以下命令启用&#xff1a; SET GLOBAL slow_query_log ON;配置慢查询日志&…

ssm104园区停车管理系统+jsp

园区停车管理系统的设计与实现 摘 要 网络技术和计算机技术发展至今&#xff0c;已经拥有了深厚的理论基础&#xff0c;并在现实中进行了充分运用&#xff0c;尤其是基于计算机运行的软件更是受到各界的关注。加上现在人们已经步入信息时代&#xff0c;所以对于信息的宣传和管…

数据库管理-第180期 23ai: Cloud/Container Plus AI(20240503)

数据库管理180期 2024-05-03 数据库管理-第180期 23ai: Cloud/Container Plus AI&#xff08;20240503&#xff09;1 Free版本更新2 如我所期3 宣传图Oracle Vector DBJSON Relational DualityProperty GraphsShardingTrue CacheFirewall 总结 数据库管理-第180期 23ai: Cloud/…

QT:label标签/进度条的使用

文章目录 设置不同格式的文本显示图片文本对齐/自动换行/缩进/边距LCDNumber倒计时 ProgressBar进度条 设置不同格式的文本 在文本格式中&#xff0c;存在富文本&#xff0c;makedown格式的文本&#xff0c;还有纯文本&#xff0c;下面就依据这三个进行举例 #include "w…

嵌入式开发四:STM32 基础知识入门

为方便更好的学习STM32单片机&#xff0c;本篇博客主要总结STM32的入门基础知识&#xff0c;重点在于理解寄存器以及存储器映射和寄存器映射&#xff0c;深刻体会STM32是如何组织和管理庞大的寄存器&#xff0c;从而提高开发效率的&#xff0c;为后面的基于标准库的开发做好铺垫…

Python实战开发及案例分析(2)——单目标优化

在Python中&#xff0c;进行单目标优化主要涉及定义一个优化问题&#xff0c;包括一个目标函数和可能的约束条件&#xff0c;然后选择合适的算法来求解。Python提供了多种库&#xff0c;如SciPy、Pyomo、GEKKO等&#xff0c;用于处理各种优化问题。 案例分析&#xff1a;使用 …