diff options
author | Johannes Stoelp <johannes.stoelp@gmail.com> | 2023-05-24 23:49:41 +0200 |
---|---|---|
committer | Johannes Stoelp <johannes.stoelp@gmail.com> | 2023-05-25 00:49:00 +0200 |
commit | 3d2ddaeb9bd57095cd1990d9a701fe48bcbeb985 (patch) | |
tree | c8ef20a0248bfb91ec422545a52aa568dd2e0299 /content | |
parent | 9f3c99f6e966c2571183c160d2b22bae5df8b1cd (diff) | |
download | blog-3d2ddaeb9bd57095cd1990d9a701fe48bcbeb985.tar.gz blog-3d2ddaeb9bd57095cd1990d9a701fe48bcbeb985.zip |
xpost: mini kvm
Diffstat (limited to 'content')
-rw-r--r-- | content/2023-01-15-xpost-mini-kvm-rs.md | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/content/2023-01-15-xpost-mini-kvm-rs.md b/content/2023-01-15-xpost-mini-kvm-rs.md new file mode 100644 index 0000000..709050d --- /dev/null +++ b/content/2023-01-15-xpost-mini-kvm-rs.md @@ -0,0 +1,51 @@ ++++ +title = "xpost: KVM studies in rust (mini-kvm-rs)" + +[taxonomies] +tags = ["kvm", "linux", "x86"] ++++ + +This is a cross post to a **KVM playground** in rust that I created in the past +and hosted on github [>> mini-kvm-rs <<][mini-kvm]. + +The [README][mini-kvm-readme] in the root of the repository gives an overview +over the project organization. Additionally, it shows instructions for how to +run two examples provided in the project, a guest running in [16 bit real +mode][mini-kvm-16bit] and a guest running in [64 bit long +mode][mini-kvm-64bit]. + +The rustdoc is [here][mini-kvm-doc]. + +## Example: 16 bit real mode + +The following shows the 16 bit guest code example. + +```nasm +{{ fetch_url(url="https://raw.githubusercontent.com/johannst/mini-kvm-rs/main/guest/guest16.S") }} +``` + +The following creates a VM and runs the 16 bit example guest image. + +```rust +{{ fetch_url(url="https://raw.githubusercontent.com/johannst/mini-kvm-rs/main/examples/real_mode.rs") }} +``` + +## Example: 64 bit long mode + +The following shows the 64 bit guest code example. + +```nasm +{{ fetch_url(url="https://raw.githubusercontent.com/johannst/mini-kvm-rs/main/guest/guest64.S") }} +``` + +The following creates a VM and runs the 64 bit example guest image. + +```rust +{{ fetch_url(url="https://raw.githubusercontent.com/johannst/mini-kvm-rs/main/examples/long_mode.rs") }} +``` + +[mini-kvm]: https://github.com/johannst/mini-kvm-rs +[mini-kvm-readme]: https://github.com/johannst/mini-kvm-rs/blob/main/README.md +[mini-kvm-doc]: https://johannst.github.io/mini-kvm-rs/kvm_rs/index.html +[mini-kvm-16bit]: https://github.com/johannst/mini-kvm-rs#real-mode-16bit-example +[mini-kvm-64bit]: https://github.com/johannst/mini-kvm-rs#long-mode-64bit-example |