rust-vmm 学习 KVM内核文档阅读笔记 :第二章 KVM内部原理

base knowledge:

Architecture of the Kernel-based Virtual Machine (KVM)html

用rust-vmm打造将来的虚拟化架构node

KVM内核文档阅读笔记linux

<Mastering KVM Virtualization>:第二章 KVM内部原理git

Using the KVM API (org

 

kvm-ioctls (github)

run test:  github

cd vmm
FILE_LINE=`git grep -n "pub fn test_vm"` && echo ${FILE_LINE%:*}
cargo test test_vm
FILE_LINE=`git grep -n "pub fn test_vm"` && echo ${FILE_LINE%:*}
src/vm.rs:854
cargo test test_vm |grep "Running target/debug/deps/" Finished dev [unoptimized + debuginfo] target(s) in 0.16s Running target/debug/deps/vmm-5f7f458cb725298f

rust-gdb target/debug/deps/vmm-5f7f458cb725298f
(gdb) info functions test_vm
All functions matching regular expression "test_vm":express

(gdb) help infovim

(gdb) info sources架构

(gdb) b src/vm.rs:854
No source file named src/vm.rs.
Make breakpoint pending on future shared library load? (y or [n]) n
(gdb) run --test test_vmide

 

# note: Run with `RUST_BACKTRACE=1` environment variable to display a backtrace.

RUST_BACKTRACE=1 cargo run

vim ./cloud-hypervisor/src/main.rs
:ConqueGdbExe rust
-gdb :ConqueGdb target/debug/cloud-hypervisor

(gdb) info functions main
All functions matching regular expression "main":post

File cloud-hypervisor/src/main.rs:

static void cloud_hypervisor::main::h9d806d3576285a29(void);

(gdb) b cloud_hypervisor::main::h9d806d3576285a29 
(gdb) run --kernel ./hypervisor-fw \
    --disk ./clear-29160-kvm.img \
    --cpus 4 \
    --memory 512 \
    --net "tap=,mac=,ip=,mask=" \
    --rng

(gdb) run target/debug/cloud-hypervisor \
    --kernel ./linux-cloud-hypervisor/arch/x86/boot/compressed/vmlinux.bin \
    --disk ./clear-29160-kvm.img \
    --cmdline "console=ttyS0 reboot=k panic=1 nomodules i8042.noaux i8042.nomux i8042.nopnp i8042.dumbkbd root=/dev/vda3" \
    --cpus 4 \
    --memory 512 \
    --net "tap=,mac=,ip=,mask=" \
    --rng

 

GDB commands by function  

Print settings 

相关文章
相关标签/搜索