partially working pvh support

This commit is contained in:
Alex Zenla
2024-05-14 02:31:16 -07:00
parent 2ce3a01a6f
commit 620c3a1b2f
6 changed files with 13 additions and 14 deletions

View File

@ -231,7 +231,7 @@ impl GuestReconciler {
let start_status = guest.state.as_ref().map(|x| x.status()).unwrap_or_default(); let start_status = guest.state.as_ref().map(|x| x.status()).unwrap_or_default();
let result = match start_status { let result = match start_status {
GuestStatus::Starting => self.start(uuid, &mut guest).await, 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, GuestStatus::Destroying => self.destroy(uuid, &mut guest).await,
_ => Ok(GuestReconcilerResult::Unchanged), _ => Ok(GuestReconcilerResult::Unchanged),
}; };
@ -289,7 +289,7 @@ impl GuestReconciler {
starter.start(uuid, guest).await 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 { if let Some(ref mut state) = guest.state {
state.set_status(GuestStatus::Destroying); state.set_status(GuestStatus::Destroying);
Ok(GuestReconcilerResult::Changed { rerun: true }) Ok(GuestReconcilerResult::Changed { rerun: true })

View File

@ -375,7 +375,6 @@ impl KrataChannelBackendProcessor {
}; };
ring_ref = self.use_reserved_ref.unwrap_or(ring_ref); ring_ref = self.use_reserved_ref.unwrap_or(ring_ref);
break (ring_ref, port); break (ring_ref, port);
} }
} }

View File

@ -138,12 +138,7 @@ impl GuestLauncher {
} else { } else {
None None
}; };
let cmdline_options = [ let cmdline_options = ["earlyprintk=xen,keep", "console=hvc0", "debug"];
"earlycon=xen,keep",
"earlyprintk=xen,keep",
"debug",
"elevator=noop",
];
let cmdline = cmdline_options.join(" "); let cmdline = cmdline_options.join(" ");
let guest_mac_string = container_mac.to_string().replace('-', ":"); let guest_mac_string = container_mac.to_string().replace('-', ":");

View File

@ -493,7 +493,7 @@ impl XenClient {
("virtual-device", id.to_string()), ("virtual-device", id.to_string()),
("device-type", "disk".to_string()), ("device-type", "disk".to_string()),
("trusted", "1".to_string()), ("trusted", "1".to_string()),
("protocol", "x86_32-abi".to_string()), ("protocol", "x86_64-abi".to_string()),
]; ];
self.device_add( self.device_add(

View File

@ -670,7 +670,15 @@ impl BootSetupPlatform for X86PvhPlatform {
domain domain
.consoles .consoles
.push((evtchn, special_pfn(SPECIALPAGE_CONSOLE))); .push((evtchn, special_pfn(SPECIALPAGE_CONSOLE)));
domain
.phys
.clear_pages(special_pfn(SPECIALPAGE_CONSOLE), 1)
.await?;
domain.store_mfn = special_pfn(SPECIALPAGE_XENSTORE); domain.store_mfn = special_pfn(SPECIALPAGE_XENSTORE);
domain
.phys
.clear_pages(special_pfn(SPECIALPAGE_XENSTORE), 1)
.await?;
Ok(()) Ok(())
} }

View File

@ -16,10 +16,7 @@ done
apk add xen xen-hypervisor apk add xen xen-hypervisor
for SERVICE in xenconsoled xenstored rc-update add xenstored default
do
rc-update add "${SERVICE}" default
done
for MODULE in xen-netblock xen-blkback tun tap for MODULE in xen-netblock xen-blkback tun tap
do do