mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
vmm: Allow the DeviceManager to inject extra kernel commandline entries
This is useful for virtio-mmio to be able to provide the commandline entries for the devices. Signed-off-by: Rob Bradford <robert.bradford@intel.com>
This commit is contained in:
@@ -752,8 +752,12 @@ impl<'a> Vm<'a> {
|
||||
}
|
||||
|
||||
pub fn load_kernel(&mut self) -> Result<GuestAddress> {
|
||||
let cmdline_cstring =
|
||||
CString::new(self.config.cmdline.args.clone()).map_err(|_| Error::CmdLine)?;
|
||||
let mut cmdline = self.config.cmdline.args.clone();
|
||||
for entry in self.devices.cmdline_additions() {
|
||||
cmdline.insert_str(entry).map_err(|_| Error::CmdLine)?;
|
||||
}
|
||||
|
||||
let cmdline_cstring = CString::new(cmdline).map_err(|_| Error::CmdLine)?;
|
||||
let mem = self.memory.read().unwrap();
|
||||
let entry_addr = match linux_loader::loader::Elf::load(
|
||||
mem.deref(),
|
||||
|
||||
Reference in New Issue
Block a user