krata: reimplement console to utilize channels, and provide logs support

This commit is contained in:
Alex Zenla
2024-04-02 08:57:34 +00:00
parent 0fd6318c5f
commit 5ad2e40a7b
17 changed files with 309 additions and 31 deletions

View File

@ -22,6 +22,7 @@ async fn main() -> Result<()> {
kernel_path: kernel_image_path.as_str(),
initrd_path: initrd_path.as_str(),
cmdline: "debug elevator=noop",
use_console_backend: None,
disks: vec![],
channels: vec![],
vifs: vec![],

View File

@ -89,6 +89,7 @@ pub struct DomainConfig<'a> {
pub initrd_path: &'a str,
pub cmdline: &'a str,
pub disks: Vec<DomainDisk<'a>>,
pub use_console_backend: Option<&'a str>,
pub channels: Vec<DomainChannel>,
pub vifs: Vec<DomainNetworkInterface<'a>>,
pub filesystems: Vec<DomainFilesystem<'a>>,
@ -349,7 +350,10 @@ impl XenClient {
}
self.console_device_add(
&DomainChannel {
typ: "xenconsoled".to_string(),
typ: config
.use_console_backend
.unwrap_or("xenconsoled")
.to_string(),
initialized: true,
},
&p2m,