登录
注册
开源
企业版
高校版
搜索
帮助中心
使用条款
关于我们
开源
企业版
高校版
私有云
模力方舟
登录
注册
代码拉取完成,页面将自动刷新
捐赠
捐赠前请先登录
取消
前往登录
扫描微信二维码支付
取消
支付完成
支付提示
将跳转至支付宝完成支付
确定
取消
Watch
不关注
关注所有动态
仅关注版本发行动态
关注但不提醒动态
39
Star
90
Fork
38
openEuler
/
rust_shyper
代码
Issues
3
Pull Requests
0
Wiki
统计
流水线
服务
JavaDoc
PHPDoc
质量分析
Jenkins for Gitee
腾讯云托管
腾讯云 Serverless
悬镜安全
阿里云 SAE
Codeblitz
SBOM
我知道了,不再自动展开
更新失败,请稍后重试!
移除标识
内容风险标识
本任务被
标识为内容中包含有代码安全 Bug 、隐私泄露等敏感信息,仓库外成员不可访问
【求问】如何加载Guest VM?
待办的
#IBGBZA
自定义
傅全通
创建于
2025-01-07 22:26
## 【问题】启动守护进程后应该如何操作以启动Guest VM? 以及是否需要将Guest VM的启动镜像装载到rust-shyper自身所使用的磁盘(在我这里是qemu所使用的vm0.img磁盘映像文件)中的特定位置,并在配置文件里指向该位置? ## 【详细描述】 在64位windows平台上编译 rust-shyper,使用`make qemu`指令编译。 所使用的rootfs是自己在WSL中编译得到的vm0.img。 在Windows Powershell中,按照`make run`中的qemu指令来启动rust-shyper,登录后依次执行以下代码 ``` insmod tools/shyper.ko tools/shyper system daemon tools/mediated-cfg.json & tools/shyper vm config tools/vm1_config_console.json ``` 结果最后一步出错。尝试将镜像放到各个位置,无果。 ## 【补充信息】 vm0.img中,`/tools/mediated-cfg.json`配置为`/dev/vda`; 所用的vm1_config_console.json`是项目根目录下的那个文件, 仅改动第六行为`"kernel_filename": "/image/Image_vanilla",`; 已经把`Image_vanilla`放在vm0.img的`/image/`下。 ## 【命令行输出】 ``` (base) PS D:\Documents\OS\rust_shyper-master> qemu-system-aarch64 -machine virt,virtualization=on,gic-version=2 ` >> -m 8g -cpu cortex-a57 -smp 4 ` >> -display none ` >> -global virtio-mmio.force-legacy=false ` >> -kernel target/aarch64/release/rust_shyper.bin ` >> -serial mon:stdio ` >> -netdev user,id=n0,hostfwd=tcp::5555-:22 ` >> -device virtio-net-device,bus=virtio-mmio-bus.24,netdev=n0 ` >> -drive file=vm0.img,if=none,format=raw,id=x0 ` >> -device virtio-blk-device,drive=x0,bus=virtio-mmio-bus.25 Welcome to qemu rust_shyper 0.1.0! Built at 2025-01-07 04:21:12 +08:00 by QuanQiuTong Compiler: rustc 1.75.0-nightly (fdaaaf9f9 2023-11-08) Features: "pl011, qemu" Commit: init buddy system, heap start from 412ce000 with size 4 MB [I]>[core 0, rust_shyper::kernel::mem, src\kernel\mem.rs:52] Memory VM regions: total 1 region, size 7936 MB / 2031616 pages [I]>[core 0, rust_shyper::kernel::mem, src\kernel\mem.rs:58] Memory VM regions init ok! [I]>[core 0, rust_shyper::kernel::mem, src\kernel\mem.rs:23] Mem init ok [I]>[core 0, rust_shyper::device::device_tree, src\device\device_tree.rs:72] fdt 0x48000000 has original size 1048576 [I]>[core 0, rust_shyper::device::device_tree, src\device\device_tree.rs:195] fdt patched size 12288 [W]>[core 0, rust_shyper::kernel::iommu, src\kernel\iommu.rs:23] Platform not support IOMMU [I]>[core 2, rust_shyper, src\lib.rs:215] secondary core 0x80000002 init [I]>[core 3, rust_shyper, src\lib.rs:215] secondary core 0x80000003 init [I]>[core 1, rust_shyper, src\lib.rs:215] secondary core 0x80000001 init [I]>[core 0, rust_shyper::kernel::cpu, src\kernel\cpu.rs:295] Bring up 4 cores [I]>[core 0, rust_shyper::kernel::cpu, src\kernel\cpu.rs:296] Cpu init ok [I]>[core 0, rust_shyper, src\lib.rs:189] cpu init ok [I]>[core 0, rust_shyper::kernel::interrupt, src\kernel\interrupt.rs:53] Interrupt init ok [I]>[core 1, rust_shyper, src\lib.rs:218] secondary core 0x80000001 interrupt init [I]>[core 2, rust_shyper, src\lib.rs:218] secondary core 0x80000002 interrupt init [I]>[core 0, rust_shyper, src\lib.rs:192] interrupt init ok [I]>[core 3, rust_shyper, src\lib.rs:218] secondary core 0x80000003 interrupt init [I]>[core 0, rust_shyper::kernel::timer, src\kernel\timer.rs:41] Timer frequency: 62500000Hz [I]>[core 1, rust_shyper::kernel::vcpu_array, src\kernel\vcpu_array.rs:98] cpu[1] init Round Robin Scheduler [I]>[core 3, rust_shyper::kernel::vcpu_array, src\kernel\vcpu_array.rs:98] cpu[3] init Round Robin Scheduler [I]>[core 2, rust_shyper::kernel::vcpu_array, src\kernel\vcpu_array.rs:98] cpu[2] init Round Robin Scheduler [I]>[core 0, rust_shyper::kernel::timer, src\kernel\timer.rs:42] Timer init ok [I]>[core 1, rust_shyper, src\lib.rs:222] [boot] sched init ok at core 0x80000001 [I]>[core 3, rust_shyper, src\lib.rs:222] [boot] sched init ok at core 0x80000003 [I]>[core 2, rust_shyper, src\lib.rs:222] [boot] sched init ok at core 0x80000002 [I]>[core 0, rust_shyper::kernel::vcpu_array, src\kernel\vcpu_array.rs:98] cpu[0] init Round Robin Scheduler [I]>[core 0, rust_shyper, src\lib.rs:196] sched init ok [I]>[core 1, rust_shyper::kernel::cpu, src\kernel\cpu.rs:307] [idle] prepare to idle... [I]>[core 2, rust_shyper::kernel::cpu, src\kernel\cpu.rs:307] [idle] prepare to idle... [I]>[core 3, rust_shyper::kernel::cpu, src\kernel\cpu.rs:307] [idle] prepare to idle... [I]>[core 0, rust_shyper::config::config, src\config\config.rs:535] Successfully add MVM[0] name "supervisor", currently vm_num 1 [I]>[core 0, rust_shyper::vmm::manager, src\vmm\manager.rs:56] vmm_push_vm: add vm 0 on cpu 0 [I]>[core 0, rust_shyper::kernel::vm, src\kernel\vm.rs:207] VM[0] phys_id_list [0] [I]>[core 0, rust_shyper::kernel::vm, src\kernel\vm.rs:302] VM 0 registers emulated device: id=<0>, name="EmuDeviceTGicd", ipa=<0x8000000> [I]>[core 0, rust_shyper::kernel::vm, src\kernel\vm.rs:302] VM 0 registers emulated device: id=<1>, name="EmuDeviceTVirtioNet", ipa=<0xa001000> [I]>[core 0, rust_shyper::kernel::vm, src\kernel\vm.rs:302] VM 0 registers emulated device: id=<2>, name="EmuDeviceTVirtioConsole", ipa=<0xa002000> [I]>[core 0, rust_shyper::kernel::ivc, src\kernel\ivc.rs:62] vm shyper base ipa 0, len 0 [I]>[core 0, rust_shyper::kernel::vm, src\kernel\vm.rs:302] VM 0 registers emulated device: id=<3>, name="EmuDeviceTShyper", ipa=<0x0> [I]>[core 0, rust_shyper::vmm::init, src\vmm\init.rs:647] VM 0 init cpu: cores=<1>, allocat_bits=<0b1> [I]>[core 0, rust_shyper::vmm::init, src\vmm\init.rs:681] * Core 0 is assigned => vm 0, vcpu 0 [I]>[core 0, rust_shyper::vmm::init, src\vmm\init.rs:669] vmm_init_cpu: VM [0] is ready [I]>[core 0, rust_shyper::vmm::init, src\vmm\init.rs:76] VM 0 memory region: ipa=<0x50000000>, pa=<0x50000000>, size=<0x80000000> [I]>[core 0, rust_shyper::vmm::init, src\vmm\init.rs:86] successfully add a region! [I]>[core 0, rust_shyper::vmm::init, src\vmm\init.rs:190] MVM 0 loading Image [I]>[core 0, rust_shyper::vmm::init, src\vmm\init.rs:102] VM 0 loads kernel: ipa=<0x80080000>, pa=<0x80080000>, size=<14180K> [I]>[core 0, rust_shyper::vmm::init, src\vmm\init.rs:555] apply aarch64 [I]>[core 0, rust_shyper::vmm::init, src\vmm\init.rs:555] apply aarch64 [I]>[core 0, rust_shyper::vmm::init, src\vmm\init.rs:569] fdt add vm_service irq = 64 [I]>[core 0, rust_shyper::vmm::init, src\vmm\init.rs:642] VM 0 id supervisor init ok [I]>[core 0, rust_shyper, src\lib.rs:202] rust_shyper Hypervisor init ok Start booting Monitor VM ... ...(省略)... OK Welcome to Buildroot buildroot login: root Password: # cd / # insmod tools/ mediated-cfg.json shyper.ko vm1_config_console.json shyper vm1.img # insmod tools/shyper.ko [ 44.268273] shyper: loading out-of-tree module taints kernel. [ 44.275910] [Shyper MOD INFO] Init shyper service [ 44.277133] [Shyper MOD INFO] major 240 minor 0[ 44.279652] [Shyper MOD INFO] VM [0] is installing kernel module [ 44.280632] [Shyper MOD INFO] register irq success, irq_id is 5 [ 44.282171] [Shyper MOD INFO] handle_hvc_ivc in kernel module: event is 0x00000000 [ 44.285932] [Shyper MOD INFO] [HVC_IVC_UPDATE_MQ] get vmid 0 [ 44.287175] [Shyper MOD INFO] start to register misc device for shared mem [E]>[core 0, rust_shyper::kernel::hvc, src\kernel\hvc.rs:332] not support vm migration and live update [E]>[core 0, rust_shyper::kernel::hvc, src\kernel\hvc.rs:332] not support vm migration and live update [E]>[core 0, rust_shyper::kernel::hvc, src\kernel\hvc.rs:332] not support vm migration and live update [E]>[core 0, rust_shyper::kernel::hvc, src\kernel\hvc.rs:332] not support vm migration and live update [E]>[core 0, rust_shyper::kernel::hvc, src\kernel\hvc.rs:332] not support vm migration and live update [E]>[core 0, rust_shyper::kernel::hvc, src\kernel\hvc.rs:332] not support vm migration and live update # [ 78.677775] random: fast init done # cat > tools/mediated-cfg.json << EOF > { > "mediated": [ > "/dev/vda" > ] > } > EOF # tools/shyper system daemon tools/mediated-cfg.json & # [1970-01-01T00:01:37Z INFO shyper_cli_rust::daemon] Start Shyper-cli daemon configure [1970-01-01T00:01:37Z INFO shyper_cli_rust::blk] Shyper daemon add blk /dev/vda with 0 sectors [1970-01-01T00:01:37Z INFO shyper_cli_rust::daemon] daemon configure 1 mediated disk(s) [1970-01-01T00:01:37Z INFO shyper_cli_rust::daemon] daemon configuration finished [1970-01-01T00:01:37Z INFO shyper_cli_rust::daemon] VM[0] start to init blk service [1970-01-01T00:01:37Z INFO shyper_cli_rust::blk] Shyper daemon init blk MEDBLK0 with cache size 33554432 [1970-01-01T00:01:37Z INFO shyper_cli_rust::blk] Shyper daemon init blk MEDBLK0 va 0x400000000000 with cache pa 0xc8000000 [I]>[core 0, rust_shyper::device::virtio::mediated, src\device\virtio\mediated.rs:196] mediated_dev_append: dev_ipa_reg 0xca203000, cache ipa 0xc8000000, cache_pa 0xc8000000, dma_block_max 0x10000 [1970-01-01T00:01:37Z INFO shyper_cli_rust::blk] Shyper daemon init blk MEDBLK0 success [1970-01-01T00:01:37Z INFO shyper_cli_rust::daemon] VM[0] daemon process init success [ 97.313757] random: shyper: uninitialized urandom read (16 bytes read) # ps aux | grep shyper 1128 root tools/shyper system daemon tools/mediated-cfg.json 1133 root grep shyper # tools/shyper vm config tools/vm1_config_console.json Parse VM config successfully, VM name [guest-os-1] [I]>[core 0, rust_shyper::config::config, src\config\config.rs:580] Start to prepare configuration for new VM [I]>[core 0, rust_shyper::config::config, src\config\config.rs:535] Successfully add GVM[1] name "guest-os-1", currently vm_num 2 [1970-01-01T00:12:59Z INFO shyper_cli_rust::config] Send VM [1] config successfully [I]>[core 0, rust_shyper::config::config, src\config\config.rs:631] VM[1] vm_cfg_add_mem_region: add region start_ipa 80000000 length 40000000 [I]>[core 0, rust_shyper::config::config, src\config\config.rs:644] VM[1] vm_cfg_set_cpu: num 1 allocate_bitmap 2 master Some(1) [I]>[core 0, rust_shyper::config::config, src\config\config.rs:698] VM[1] vm_cfg_add_emu_dev: ori emu dev num 0 name "intc@fe600000" cfg_list [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] base ipa fe600000 length 10000 irq_id 0 emu_type 1 [I]>[core 0, rust_shyper::config::config, src\config\config.rs:698] VM[1] vm_cfg_add_emu_dev: ori emu dev num 1 name "GICR@fe680000" cfg_list [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] base ipa fe680000 length 100000 irq_id 0 emu_type 11 [I]>[core 0, rust_shyper::config::config, src\config\config.rs:698] VM[1] vm_cfg_add_emu_dev: ori emu dev num 2 name "virtio_blk@f0020000" cfg_list [0, 8192000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] base ipa f0020000 length 1000 irq_id 498 emu_type 7 [I]>[core 0, rust_shyper::config::config, src\config\config.rs:698] VM[1] vm_cfg_add_emu_dev: ori emu dev num 3 name "virtio_net@f0000000" cfg_list [116, 86, 170, 15, 71, 209, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] base ipa f0000000 length 1000 irq_id 499 emu_type 4 [I]>[core 0, rust_shyper::config::config, src\config\config.rs:698] VM[1] vm_cfg_add_emu_dev: ori emu dev num 4 name "virtio_console@f0040000" cfg_list [0, 4026597376, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] base ipa f0040000 length 10000 irq_id 500 emu_type 5 [I]>[core 0, rust_shyper::config::config, src\config\config.rs:758] VM[1] vm_cfg_add_pt_dev: base_ipa feb50000 base_pa feb50000 length 1000 [I]>[core 0, rust_shyper::config::config, src\config\config.rs:773] VM[1] vm_cfg_add_pt_dev irqs: base_ipa ca20fbc0 length 1 [I]>[core 0, rust_shyper::config::config, src\config\config.rs:853] VM[1] vm_cfg_add_dtb_dev: dev_type 1 irq_list_length 0 addr_region_ipa fe600000 addr_region_length 2 [I]>[core 0, rust_shyper::config::config, src\config\config.rs:853] VM[1] vm_cfg_add_dtb_dev: dev_type 3 irq_list_length 0 addr_region_ipa fe680000 addr_region_length 2 [1970-01-01T00:12:59Z ERROR shyper_cli_rust::config] Config VM [1] failed: failed to copy device tree - to memory [ 780.103628] [Shyper MOD INFO] enter hvc_config_delete_vm() vm_id 1 [I]>[core 0, rust_shyper::config::config, src\config\config.rs:622] VM[1] delete config entry [ 780.106474] [Shyper MOD WARNING] failed to find VM[1] kernel image info in list [ 780.109081] [Shyper MOD WARNING] [hvc_fid: 0x00000011, event: 0x00000001]: handle hvc failed[1970-01-01T00:13:00Z ERROR shyper_cli_rust::config] Failed to delete VM[1] config [1970-01-01T00:13:00Z ERROR shyper_cli_rust] Add vm failed: failed to copy device tree - to memory 【p.s.】 我也尝试过向dev/vda写入镜像文件; 或者将mediated-cfg配置为另一个img,该img内含Image_vanilla; 这两个尝试均失败。
## 【问题】启动守护进程后应该如何操作以启动Guest VM? 以及是否需要将Guest VM的启动镜像装载到rust-shyper自身所使用的磁盘(在我这里是qemu所使用的vm0.img磁盘映像文件)中的特定位置,并在配置文件里指向该位置? ## 【详细描述】 在64位windows平台上编译 rust-shyper,使用`make qemu`指令编译。 所使用的rootfs是自己在WSL中编译得到的vm0.img。 在Windows Powershell中,按照`make run`中的qemu指令来启动rust-shyper,登录后依次执行以下代码 ``` insmod tools/shyper.ko tools/shyper system daemon tools/mediated-cfg.json & tools/shyper vm config tools/vm1_config_console.json ``` 结果最后一步出错。尝试将镜像放到各个位置,无果。 ## 【补充信息】 vm0.img中,`/tools/mediated-cfg.json`配置为`/dev/vda`; 所用的vm1_config_console.json`是项目根目录下的那个文件, 仅改动第六行为`"kernel_filename": "/image/Image_vanilla",`; 已经把`Image_vanilla`放在vm0.img的`/image/`下。 ## 【命令行输出】 ``` (base) PS D:\Documents\OS\rust_shyper-master> qemu-system-aarch64 -machine virt,virtualization=on,gic-version=2 ` >> -m 8g -cpu cortex-a57 -smp 4 ` >> -display none ` >> -global virtio-mmio.force-legacy=false ` >> -kernel target/aarch64/release/rust_shyper.bin ` >> -serial mon:stdio ` >> -netdev user,id=n0,hostfwd=tcp::5555-:22 ` >> -device virtio-net-device,bus=virtio-mmio-bus.24,netdev=n0 ` >> -drive file=vm0.img,if=none,format=raw,id=x0 ` >> -device virtio-blk-device,drive=x0,bus=virtio-mmio-bus.25 Welcome to qemu rust_shyper 0.1.0! Built at 2025-01-07 04:21:12 +08:00 by QuanQiuTong Compiler: rustc 1.75.0-nightly (fdaaaf9f9 2023-11-08) Features: "pl011, qemu" Commit: init buddy system, heap start from 412ce000 with size 4 MB [I]>[core 0, rust_shyper::kernel::mem, src\kernel\mem.rs:52] Memory VM regions: total 1 region, size 7936 MB / 2031616 pages [I]>[core 0, rust_shyper::kernel::mem, src\kernel\mem.rs:58] Memory VM regions init ok! [I]>[core 0, rust_shyper::kernel::mem, src\kernel\mem.rs:23] Mem init ok [I]>[core 0, rust_shyper::device::device_tree, src\device\device_tree.rs:72] fdt 0x48000000 has original size 1048576 [I]>[core 0, rust_shyper::device::device_tree, src\device\device_tree.rs:195] fdt patched size 12288 [W]>[core 0, rust_shyper::kernel::iommu, src\kernel\iommu.rs:23] Platform not support IOMMU [I]>[core 2, rust_shyper, src\lib.rs:215] secondary core 0x80000002 init [I]>[core 3, rust_shyper, src\lib.rs:215] secondary core 0x80000003 init [I]>[core 1, rust_shyper, src\lib.rs:215] secondary core 0x80000001 init [I]>[core 0, rust_shyper::kernel::cpu, src\kernel\cpu.rs:295] Bring up 4 cores [I]>[core 0, rust_shyper::kernel::cpu, src\kernel\cpu.rs:296] Cpu init ok [I]>[core 0, rust_shyper, src\lib.rs:189] cpu init ok [I]>[core 0, rust_shyper::kernel::interrupt, src\kernel\interrupt.rs:53] Interrupt init ok [I]>[core 1, rust_shyper, src\lib.rs:218] secondary core 0x80000001 interrupt init [I]>[core 2, rust_shyper, src\lib.rs:218] secondary core 0x80000002 interrupt init [I]>[core 0, rust_shyper, src\lib.rs:192] interrupt init ok [I]>[core 3, rust_shyper, src\lib.rs:218] secondary core 0x80000003 interrupt init [I]>[core 0, rust_shyper::kernel::timer, src\kernel\timer.rs:41] Timer frequency: 62500000Hz [I]>[core 1, rust_shyper::kernel::vcpu_array, src\kernel\vcpu_array.rs:98] cpu[1] init Round Robin Scheduler [I]>[core 3, rust_shyper::kernel::vcpu_array, src\kernel\vcpu_array.rs:98] cpu[3] init Round Robin Scheduler [I]>[core 2, rust_shyper::kernel::vcpu_array, src\kernel\vcpu_array.rs:98] cpu[2] init Round Robin Scheduler [I]>[core 0, rust_shyper::kernel::timer, src\kernel\timer.rs:42] Timer init ok [I]>[core 1, rust_shyper, src\lib.rs:222] [boot] sched init ok at core 0x80000001 [I]>[core 3, rust_shyper, src\lib.rs:222] [boot] sched init ok at core 0x80000003 [I]>[core 2, rust_shyper, src\lib.rs:222] [boot] sched init ok at core 0x80000002 [I]>[core 0, rust_shyper::kernel::vcpu_array, src\kernel\vcpu_array.rs:98] cpu[0] init Round Robin Scheduler [I]>[core 0, rust_shyper, src\lib.rs:196] sched init ok [I]>[core 1, rust_shyper::kernel::cpu, src\kernel\cpu.rs:307] [idle] prepare to idle... [I]>[core 2, rust_shyper::kernel::cpu, src\kernel\cpu.rs:307] [idle] prepare to idle... [I]>[core 3, rust_shyper::kernel::cpu, src\kernel\cpu.rs:307] [idle] prepare to idle... [I]>[core 0, rust_shyper::config::config, src\config\config.rs:535] Successfully add MVM[0] name "supervisor", currently vm_num 1 [I]>[core 0, rust_shyper::vmm::manager, src\vmm\manager.rs:56] vmm_push_vm: add vm 0 on cpu 0 [I]>[core 0, rust_shyper::kernel::vm, src\kernel\vm.rs:207] VM[0] phys_id_list [0] [I]>[core 0, rust_shyper::kernel::vm, src\kernel\vm.rs:302] VM 0 registers emulated device: id=<0>, name="EmuDeviceTGicd", ipa=<0x8000000> [I]>[core 0, rust_shyper::kernel::vm, src\kernel\vm.rs:302] VM 0 registers emulated device: id=<1>, name="EmuDeviceTVirtioNet", ipa=<0xa001000> [I]>[core 0, rust_shyper::kernel::vm, src\kernel\vm.rs:302] VM 0 registers emulated device: id=<2>, name="EmuDeviceTVirtioConsole", ipa=<0xa002000> [I]>[core 0, rust_shyper::kernel::ivc, src\kernel\ivc.rs:62] vm shyper base ipa 0, len 0 [I]>[core 0, rust_shyper::kernel::vm, src\kernel\vm.rs:302] VM 0 registers emulated device: id=<3>, name="EmuDeviceTShyper", ipa=<0x0> [I]>[core 0, rust_shyper::vmm::init, src\vmm\init.rs:647] VM 0 init cpu: cores=<1>, allocat_bits=<0b1> [I]>[core 0, rust_shyper::vmm::init, src\vmm\init.rs:681] * Core 0 is assigned => vm 0, vcpu 0 [I]>[core 0, rust_shyper::vmm::init, src\vmm\init.rs:669] vmm_init_cpu: VM [0] is ready [I]>[core 0, rust_shyper::vmm::init, src\vmm\init.rs:76] VM 0 memory region: ipa=<0x50000000>, pa=<0x50000000>, size=<0x80000000> [I]>[core 0, rust_shyper::vmm::init, src\vmm\init.rs:86] successfully add a region! [I]>[core 0, rust_shyper::vmm::init, src\vmm\init.rs:190] MVM 0 loading Image [I]>[core 0, rust_shyper::vmm::init, src\vmm\init.rs:102] VM 0 loads kernel: ipa=<0x80080000>, pa=<0x80080000>, size=<14180K> [I]>[core 0, rust_shyper::vmm::init, src\vmm\init.rs:555] apply aarch64 [I]>[core 0, rust_shyper::vmm::init, src\vmm\init.rs:555] apply aarch64 [I]>[core 0, rust_shyper::vmm::init, src\vmm\init.rs:569] fdt add vm_service irq = 64 [I]>[core 0, rust_shyper::vmm::init, src\vmm\init.rs:642] VM 0 id supervisor init ok [I]>[core 0, rust_shyper, src\lib.rs:202] rust_shyper Hypervisor init ok Start booting Monitor VM ... ...(省略)... OK Welcome to Buildroot buildroot login: root Password: # cd / # insmod tools/ mediated-cfg.json shyper.ko vm1_config_console.json shyper vm1.img # insmod tools/shyper.ko [ 44.268273] shyper: loading out-of-tree module taints kernel. [ 44.275910] [Shyper MOD INFO] Init shyper service [ 44.277133] [Shyper MOD INFO] major 240 minor 0[ 44.279652] [Shyper MOD INFO] VM [0] is installing kernel module [ 44.280632] [Shyper MOD INFO] register irq success, irq_id is 5 [ 44.282171] [Shyper MOD INFO] handle_hvc_ivc in kernel module: event is 0x00000000 [ 44.285932] [Shyper MOD INFO] [HVC_IVC_UPDATE_MQ] get vmid 0 [ 44.287175] [Shyper MOD INFO] start to register misc device for shared mem [E]>[core 0, rust_shyper::kernel::hvc, src\kernel\hvc.rs:332] not support vm migration and live update [E]>[core 0, rust_shyper::kernel::hvc, src\kernel\hvc.rs:332] not support vm migration and live update [E]>[core 0, rust_shyper::kernel::hvc, src\kernel\hvc.rs:332] not support vm migration and live update [E]>[core 0, rust_shyper::kernel::hvc, src\kernel\hvc.rs:332] not support vm migration and live update [E]>[core 0, rust_shyper::kernel::hvc, src\kernel\hvc.rs:332] not support vm migration and live update [E]>[core 0, rust_shyper::kernel::hvc, src\kernel\hvc.rs:332] not support vm migration and live update # [ 78.677775] random: fast init done # cat > tools/mediated-cfg.json << EOF > { > "mediated": [ > "/dev/vda" > ] > } > EOF # tools/shyper system daemon tools/mediated-cfg.json & # [1970-01-01T00:01:37Z INFO shyper_cli_rust::daemon] Start Shyper-cli daemon configure [1970-01-01T00:01:37Z INFO shyper_cli_rust::blk] Shyper daemon add blk /dev/vda with 0 sectors [1970-01-01T00:01:37Z INFO shyper_cli_rust::daemon] daemon configure 1 mediated disk(s) [1970-01-01T00:01:37Z INFO shyper_cli_rust::daemon] daemon configuration finished [1970-01-01T00:01:37Z INFO shyper_cli_rust::daemon] VM[0] start to init blk service [1970-01-01T00:01:37Z INFO shyper_cli_rust::blk] Shyper daemon init blk MEDBLK0 with cache size 33554432 [1970-01-01T00:01:37Z INFO shyper_cli_rust::blk] Shyper daemon init blk MEDBLK0 va 0x400000000000 with cache pa 0xc8000000 [I]>[core 0, rust_shyper::device::virtio::mediated, src\device\virtio\mediated.rs:196] mediated_dev_append: dev_ipa_reg 0xca203000, cache ipa 0xc8000000, cache_pa 0xc8000000, dma_block_max 0x10000 [1970-01-01T00:01:37Z INFO shyper_cli_rust::blk] Shyper daemon init blk MEDBLK0 success [1970-01-01T00:01:37Z INFO shyper_cli_rust::daemon] VM[0] daemon process init success [ 97.313757] random: shyper: uninitialized urandom read (16 bytes read) # ps aux | grep shyper 1128 root tools/shyper system daemon tools/mediated-cfg.json 1133 root grep shyper # tools/shyper vm config tools/vm1_config_console.json Parse VM config successfully, VM name [guest-os-1] [I]>[core 0, rust_shyper::config::config, src\config\config.rs:580] Start to prepare configuration for new VM [I]>[core 0, rust_shyper::config::config, src\config\config.rs:535] Successfully add GVM[1] name "guest-os-1", currently vm_num 2 [1970-01-01T00:12:59Z INFO shyper_cli_rust::config] Send VM [1] config successfully [I]>[core 0, rust_shyper::config::config, src\config\config.rs:631] VM[1] vm_cfg_add_mem_region: add region start_ipa 80000000 length 40000000 [I]>[core 0, rust_shyper::config::config, src\config\config.rs:644] VM[1] vm_cfg_set_cpu: num 1 allocate_bitmap 2 master Some(1) [I]>[core 0, rust_shyper::config::config, src\config\config.rs:698] VM[1] vm_cfg_add_emu_dev: ori emu dev num 0 name "intc@fe600000" cfg_list [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] base ipa fe600000 length 10000 irq_id 0 emu_type 1 [I]>[core 0, rust_shyper::config::config, src\config\config.rs:698] VM[1] vm_cfg_add_emu_dev: ori emu dev num 1 name "GICR@fe680000" cfg_list [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] base ipa fe680000 length 100000 irq_id 0 emu_type 11 [I]>[core 0, rust_shyper::config::config, src\config\config.rs:698] VM[1] vm_cfg_add_emu_dev: ori emu dev num 2 name "virtio_blk@f0020000" cfg_list [0, 8192000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] base ipa f0020000 length 1000 irq_id 498 emu_type 7 [I]>[core 0, rust_shyper::config::config, src\config\config.rs:698] VM[1] vm_cfg_add_emu_dev: ori emu dev num 3 name "virtio_net@f0000000" cfg_list [116, 86, 170, 15, 71, 209, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] base ipa f0000000 length 1000 irq_id 499 emu_type 4 [I]>[core 0, rust_shyper::config::config, src\config\config.rs:698] VM[1] vm_cfg_add_emu_dev: ori emu dev num 4 name "virtio_console@f0040000" cfg_list [0, 4026597376, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] base ipa f0040000 length 10000 irq_id 500 emu_type 5 [I]>[core 0, rust_shyper::config::config, src\config\config.rs:758] VM[1] vm_cfg_add_pt_dev: base_ipa feb50000 base_pa feb50000 length 1000 [I]>[core 0, rust_shyper::config::config, src\config\config.rs:773] VM[1] vm_cfg_add_pt_dev irqs: base_ipa ca20fbc0 length 1 [I]>[core 0, rust_shyper::config::config, src\config\config.rs:853] VM[1] vm_cfg_add_dtb_dev: dev_type 1 irq_list_length 0 addr_region_ipa fe600000 addr_region_length 2 [I]>[core 0, rust_shyper::config::config, src\config\config.rs:853] VM[1] vm_cfg_add_dtb_dev: dev_type 3 irq_list_length 0 addr_region_ipa fe680000 addr_region_length 2 [1970-01-01T00:12:59Z ERROR shyper_cli_rust::config] Config VM [1] failed: failed to copy device tree - to memory [ 780.103628] [Shyper MOD INFO] enter hvc_config_delete_vm() vm_id 1 [I]>[core 0, rust_shyper::config::config, src\config\config.rs:622] VM[1] delete config entry [ 780.106474] [Shyper MOD WARNING] failed to find VM[1] kernel image info in list [ 780.109081] [Shyper MOD WARNING] [hvc_fid: 0x00000011, event: 0x00000001]: handle hvc failed[1970-01-01T00:13:00Z ERROR shyper_cli_rust::config] Failed to delete VM[1] config [1970-01-01T00:13:00Z ERROR shyper_cli_rust] Add vm failed: failed to copy device tree - to memory 【p.s.】 我也尝试过向dev/vda写入镜像文件; 或者将mediated-cfg配置为另一个img,该img内含Image_vanilla; 这两个尝试均失败。
评论 (
1
)
登录
后才可以发表评论
状态
待办的
待办的
进行中
已完成
已拒绝
负责人
未设置
标签
sig/Virt
未设置
项目
未立项任务
未立项任务
里程碑
未关联里程碑
未关联里程碑
Pull Requests
未关联
未关联
关联的 Pull Requests 被合并后可能会关闭此 issue
分支
未关联
未关联
master
riscv_ko_fix
FEAT_MediatedDiskBugFix
fix-compile-gicv3-bug
zrp--fix-cli-arg-bug
OpenSource
patch-upstream
async-prio
开始日期   -   截止日期
-
置顶选项
不置顶
置顶等级:高
置顶等级:中
置顶等级:低
优先级
不指定
严重
主要
次要
不重要
预计工期
(小时)
参与者(1)
1
https://gitee.com/openeuler/rust_shyper.git
git@gitee.com:openeuler/rust_shyper.git
openeuler
rust_shyper
rust_shyper
点此查找更多帮助
搜索帮助
Git 命令在线学习
如何在 Gitee 导入 GitHub 仓库
Git 仓库基础操作
企业版和社区版功能对比
SSH 公钥设置
如何处理代码冲突
仓库体积过大,如何减小?
如何找回被删除的仓库数据
Gitee 产品配额说明
GitHub仓库快速导入Gitee及同步更新
什么是 Release(发行版)
将 PHP 项目自动发布到 packagist.org
仓库举报
回到顶部
登录提示
该操作需登录 Gitee 帐号,请先登录后再操作。
立即登录
没有帐号,去注册