mirror of
https://github.com/edera-dev/krata.git
synced 2025-08-03 21:21:32 +00:00
pvh works!
This commit is contained in:
@ -231,7 +231,7 @@ impl GuestReconciler {
|
||||
let start_status = guest.state.as_ref().map(|x| x.status()).unwrap_or_default();
|
||||
let result = match start_status {
|
||||
GuestStatus::Starting => self.start(uuid, &mut guest).await,
|
||||
// GuestStatus::Exited => self.exited(&mut guest).await,
|
||||
GuestStatus::Exited => self.exited(&mut guest).await,
|
||||
GuestStatus::Destroying => self.destroy(uuid, &mut guest).await,
|
||||
_ => Ok(GuestReconcilerResult::Unchanged),
|
||||
};
|
||||
@ -289,7 +289,7 @@ impl GuestReconciler {
|
||||
starter.start(uuid, guest).await
|
||||
}
|
||||
|
||||
async fn _exited(&self, guest: &mut Guest) -> Result<GuestReconcilerResult> {
|
||||
async fn exited(&self, guest: &mut Guest) -> Result<GuestReconcilerResult> {
|
||||
if let Some(ref mut state) = guest.state {
|
||||
state.set_status(GuestStatus::Destroying);
|
||||
Ok(GuestReconcilerResult::Changed { rerun: true })
|
||||
|
@ -375,6 +375,10 @@ impl KrataChannelBackendProcessor {
|
||||
};
|
||||
|
||||
ring_ref = self.use_reserved_ref.unwrap_or(ring_ref);
|
||||
debug!(
|
||||
"channel backend for domain {} channel {}: ring-ref={} port={}",
|
||||
self.domid, self.id, ring_ref, port,
|
||||
);
|
||||
break (ring_ref, port);
|
||||
}
|
||||
}
|
||||
@ -388,14 +392,24 @@ impl KrataChannelBackendProcessor {
|
||||
self.store
|
||||
.write_string(format!("{}/state", self.backend), "4")
|
||||
.await?;
|
||||
let memory = self.gnttab.map_grant_refs(
|
||||
vec![GrantRef {
|
||||
domid: self.domid,
|
||||
reference: ring_ref as u32,
|
||||
}],
|
||||
true,
|
||||
true,
|
||||
)?;
|
||||
let memory = self
|
||||
.gnttab
|
||||
.map_grant_refs(
|
||||
vec![GrantRef {
|
||||
domid: self.domid,
|
||||
reference: ring_ref as u32,
|
||||
}],
|
||||
true,
|
||||
true,
|
||||
)
|
||||
.map_err(|e| {
|
||||
anyhow!(
|
||||
"failed to map grant ref {} for domid {}: {}",
|
||||
ring_ref,
|
||||
self.domid,
|
||||
e
|
||||
)
|
||||
})?;
|
||||
let mut channel = self.evtchn.bind(self.domid, port).await?;
|
||||
unsafe {
|
||||
let buffer = self.read_output_buffer(channel.local_port, &memory).await?;
|
||||
|
@ -138,7 +138,7 @@ impl GuestLauncher {
|
||||
} else {
|
||||
None
|
||||
};
|
||||
let cmdline_options = ["earlyprintk=xen,keep", "console=hvc0", "debug"];
|
||||
let cmdline_options = ["console=hvc0", "quiet"];
|
||||
let cmdline = cmdline_options.join(" ");
|
||||
|
||||
let guest_mac_string = container_mac.to_string().replace('-', ":");
|
||||
|
@ -138,7 +138,7 @@ pub const HVM_PARAM_STORE_EVTCHN: u32 = 2;
|
||||
pub const HVM_PARAM_IOREQ_PFN: u32 = 5;
|
||||
pub const HVM_PARAM_BUFIOREQ_PFN: u32 = 6;
|
||||
pub const HVM_PARAM_CONSOLE_PFN: u32 = 17;
|
||||
pub const HVM_PARAM_CONSOLE_EVTCHN: u32 = 8;
|
||||
pub const HVM_PARAM_CONSOLE_EVTCHN: u32 = 18;
|
||||
pub const HVM_PARAM_PAGING_RING_PFN: u32 = 27;
|
||||
pub const HVM_PARAM_MONITOR_RING_PFN: u32 = 28;
|
||||
pub const HVM_PARAM_SHARING_RING_PFN: u32 = 29;
|
||||
|
Reference in New Issue
Block a user