diff options
Diffstat (limited to 'src/kvm_rs/vcpu.rs.html')
-rw-r--r-- | src/kvm_rs/vcpu.rs.html | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/src/kvm_rs/vcpu.rs.html b/src/kvm_rs/vcpu.rs.html index 1bfda1f..a2a6eb8 100644 --- a/src/kvm_rs/vcpu.rs.html +++ b/src/kvm_rs/vcpu.rs.html @@ -1,4 +1,5 @@ -<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="Source of the Rust file `src/vcpu.rs`."><title>vcpu.rs - source</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceSerif4-Regular-46f98efaafac5295.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/FiraSans-Regular-018c141bf0843ffd.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/FiraSans-Medium-8f9a781e4970d388.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceSerif4-Bold-a2c9cd1067f8b328.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2"><link rel="stylesheet" href="../../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../../static.files/rustdoc-cb6f1f67f1bcd037.css" id="mainThemeStyle"><meta name="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="kvm_rs" data-themes="" data-resource-suffix="" data-rustdoc-version="1.73.0 (cc66ad468 2023-10-03)" data-channel="1.73.0" data-search-js="search-6dfdfced5eff6596.js" data-settings-js="settings-de11bff964e9d4e5.js" data-settings-css="settings-8c76f75bfb6bd192.css" data-theme-light-css="light-1596385f77d47ef2.css" data-theme-dark-css="dark-0a43001d3fc2282c.css" data-theme-ayu-css="ayu-fd19013d6ce078bf.css" ><script src="../../static.files/storage-db41da1a38ea3cb8.js"></script><script defer src="../../static.files/src-script-3280b574d94e47b4.js"></script><script defer src="../../src-files.js"></script><script defer src="../../static.files/main-0795b7d26be81095.js"></script><noscript><link rel="stylesheet" media="(prefers-color-scheme:light)" href="../../static.files/light-1596385f77d47ef2.css"><link rel="stylesheet" media="(prefers-color-scheme:dark)" href="../../static.files/dark-0a43001d3fc2282c.css"><link rel="stylesheet" href="../../static.files/noscript-cffde32267a19fd6.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-16x16-8b506e7a72182f1c.png"><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-422f7d1d52889060.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-2c020d218678b618.svg"></head><body class="rustdoc src"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"></nav><main><nav class="sub"><a class="sub-logo-container" href="../../kvm_rs/index.html"><img class="rust-logo" src="../../static.files/rust-logo-151179464ae7ed46.svg" alt="logo"></a><form class="search-form"><span></span><input class="search-input" name="search" aria-label="Run search in the documentation" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><div id="help-button" title="help" tabindex="-1"><a href="../../help.html">?</a></div><div id="settings-menu" tabindex="-1"><a href="../../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../../static.files/wheel-7b819b6101059cd0.svg"></a></div></form></nav><section id="main-content" class="content"><div class="example-wrap"><div data-nosnippet><pre class="src-line-numbers"><a href="#1" id="1">1</a> +<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="Source of the Rust file `src/vcpu.rs`."><title>vcpu.rs - source</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../static.files/rustdoc-46132b98.css"><meta name="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="kvm_rs" data-themes="" data-resource-suffix="" data-rustdoc-version="1.85.0 (4d91de4e4 2025-02-17)" data-channel="1.85.0" data-search-js="search-75f5ac3e.js" data-settings-js="settings-0f613d39.js" ><script src="../../static.files/storage-59e33391.js"></script><script defer src="../../static.files/src-script-56102188.js"></script><script defer src="../../src-files.js"></script><script defer src="../../static.files/main-5f194d8c.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-893ab5e7.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-6580c154.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-044be391.svg"></head><body class="rustdoc src"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="src-sidebar-title"><h2>Files</h2></div></nav><div class="sidebar-resizer"></div><main><rustdoc-search></rustdoc-search><section id="main-content" class="content"><div class="main-heading"><h1><div class="sub-heading">kvm_rs/</div>vcpu.rs</h1><rustdoc-toolbar></rustdoc-toolbar></div><div class="example-wrap"><div data-nosnippet><pre class="src-line-numbers"> +<a href="#1" id="1">1</a> <a href="#2" id="2">2</a> <a href="#3" id="3">3</a> <a href="#4" id="4">4</a> @@ -199,8 +200,7 @@ <a href="#199" id="199">199</a> <a href="#200" id="200">200</a> <a href="#201" id="201">201</a> -<a href="#202" id="202">202</a> -</pre></div><pre class="rust"><code><span class="doccomment">//! VCPU system ioctls. +<a href="#202" id="202">202</a></pre></div><pre class="rust"><code><span class="doccomment">//! VCPU system ioctls. </span><span class="kw">use </span>std::fs; <span class="kw">use </span>std::io; @@ -214,12 +214,12 @@ /// /// [kvm-run]: https://www.kernel.org/doc/html/latest/virt/kvm/api.html#kvm-run /// [kvm-run-struct]: https://www.kernel.org/doc/html/latest/virt/kvm/api.html#the-kvm-run-structure -</span><span class="kw">pub enum </span>KvmExit<<span class="lifetime">'cpu</span>> { +</span><span class="kw">pub enum </span>KvmExit<<span class="lifetime">'cpu</span>> { Halt, - IoIn(u16, <span class="kw-2">&</span><span class="lifetime">'cpu </span><span class="kw-2">mut </span>[u8]), - IoOut(u16, <span class="kw-2">&</span><span class="lifetime">'cpu </span>[u8]), - MmioRead(u64, <span class="kw-2">&</span><span class="lifetime">'cpu </span><span class="kw-2">mut </span>[u8]), - MmioWrite(u64, <span class="kw-2">&</span><span class="lifetime">'cpu </span>[u8]), + IoIn(u16, <span class="kw-2">&</span><span class="lifetime">'cpu </span><span class="kw-2">mut </span>[u8]), + IoOut(u16, <span class="kw-2">&</span><span class="lifetime">'cpu </span>[u8]), + MmioRead(u64, <span class="kw-2">&</span><span class="lifetime">'cpu </span><span class="kw-2">mut </span>[u8]), + MmioWrite(u64, <span class="kw-2">&</span><span class="lifetime">'cpu </span>[u8]), Debug(u64), } @@ -294,7 +294,7 @@ /// /// [kvm-get-debugregs]: /// https://www.kernel.org/doc/html/latest/virt/kvm/api.html#kvm-get-debugregs - </span><span class="attr">#[cfg(target_arch = <span class="string">"x86_64"</span>)] + </span><span class="attr">#[cfg(target_arch = <span class="string">"x86_64"</span>)] </span><span class="kw">pub fn </span>get_debugregs(<span class="kw-2">&</span><span class="self">self</span>) -> io::Result<kvm_sys::kvm_debugregs> { <span class="kw">let </span><span class="kw-2">mut </span>dregs = kvm_sys::kvm_debugregs::default(); ioctl( @@ -310,7 +310,7 @@ /// /// [kvm-set-debugregs]: /// https://www.kernel.org/doc/html/latest/virt/kvm/api.html#kvm-set-debugregs - </span><span class="attr">#[cfg(target_arch = <span class="string">"x86_64"</span>)] + </span><span class="attr">#[cfg(target_arch = <span class="string">"x86_64"</span>)] </span><span class="kw">pub fn </span>set_debugregs(<span class="kw-2">&</span><span class="self">self</span>, dregs: kvm_sys::kvm_debugregs) -> io::Result<()> { ioctl( <span class="kw-2">&</span><span class="self">self</span>.vcpu, @@ -324,7 +324,7 @@ /// [`KVM_GUESTDBG_ENABLE`][kvm-guest-debug] ioctl. /// /// [kvm-guest-debug]: https://www.kernel.org/doc/html/latest/virt/kvm/api.html#kvm-set-guest-debug - </span><span class="attr">#[cfg(target_arch = <span class="string">"x86_64"</span>)] + </span><span class="attr">#[cfg(target_arch = <span class="string">"x86_64"</span>)] </span><span class="kw">pub fn </span>set_single_step(<span class="kw-2">&</span><span class="self">self</span>, enable: bool) -> io::Result<()> { <span class="kw">let </span><span class="kw-2">mut </span>dbg = kvm_sys::kvm_guest_debug::default(); @@ -352,7 +352,7 @@ /// reasons described in [`KvmExit`](crate::vcpu::KvmExit). /// /// [kvm-run]: https://www.kernel.org/doc/html/latest/virt/kvm/api.html#kvm-run - </span><span class="kw">pub fn </span>run(<span class="kw-2">&mut </span><span class="self">self</span>) -> io::Result<KvmExit<<span class="lifetime">'_</span>>> { + </span><span class="kw">pub fn </span>run(<span class="kw-2">&mut </span><span class="self">self</span>) -> io::Result<KvmExit<<span class="lifetime">'_</span>>> { ioctl(<span class="kw-2">&</span><span class="self">self</span>.vcpu, kvm_sys::KVM_RUN, <span class="number">0</span>)<span class="question-mark">?</span>; <span class="kw">let </span>kvm_run = <span class="self">self</span>.kvm_run.as_mut(); @@ -397,7 +397,7 @@ <span class="prelude-val">Ok</span>(KvmExit::Debug(debug.pc)) } r @ <span class="kw">_ </span>=> { - <span class="macro">todo!</span>(<span class="string">"KVM_EXIT_... (exit_reason={}) not implemented!"</span>, r) + <span class="macro">todo!</span>(<span class="string">"KVM_EXIT_... (exit_reason={}) not implemented!"</span>, r) } } } |