(
&mut self,
rsdp_addr: Option<GuestAddress>,
entry_addr: EntryPoint,
)
| 1823 | |
| 1824 | #[cfg(target_arch = "x86_64")] |
| 1825 | fn configure_system( |
| 1826 | &mut self, |
| 1827 | rsdp_addr: Option<GuestAddress>, |
| 1828 | entry_addr: EntryPoint, |
| 1829 | ) -> Result<()> { |
| 1830 | trace_scoped!("configure_system"); |
| 1831 | info!("Configuring system"); |
| 1832 | let mem = self.memory_manager.lock().unwrap().boot_guest_memory(); |
| 1833 | |
| 1834 | let initramfs_config = match self.initramfs { |
| 1835 | Some(_) => Some(self.load_initramfs(&mem)?), |
| 1836 | None => None, |
| 1837 | }; |
| 1838 | |
| 1839 | let boot_vcpus = self.cpu_manager.lock().unwrap().boot_vcpus(); |
| 1840 | |
| 1841 | let serial_number = self |
| 1842 | .config |
| 1843 | .lock() |
| 1844 | .unwrap() |
| 1845 | .platform |
| 1846 | .as_ref() |
| 1847 | .and_then(|p| p.serial_number.clone()); |
| 1848 | |
| 1849 | let uuid = self |
| 1850 | .config |
| 1851 | .lock() |
| 1852 | .unwrap() |
| 1853 | .platform |
| 1854 | .as_ref() |
| 1855 | .and_then(|p| p.uuid.clone()); |
| 1856 | |
| 1857 | let oem_strings = self |
| 1858 | .config |
| 1859 | .lock() |
| 1860 | .unwrap() |
| 1861 | .platform |
| 1862 | .as_ref() |
| 1863 | .and_then(|p| p.oem_strings.clone()); |
| 1864 | |
| 1865 | let oem_strings = oem_strings |
| 1866 | .as_deref() |
| 1867 | .map(|strings| strings.iter().map(|s| s.as_ref()).collect::<Vec<&str>>()); |
| 1868 | |
| 1869 | let topology = self.cpu_manager.lock().unwrap().get_vcpu_topology(); |
| 1870 | |
| 1871 | arch::configure_system( |
| 1872 | &mem, |
| 1873 | arch::layout::CMDLINE_START, |
| 1874 | arch::layout::CMDLINE_MAX_SIZE, |
| 1875 | &initramfs_config, |
| 1876 | boot_vcpus, |
| 1877 | entry_addr.setup_header, |
| 1878 | rsdp_addr, |
| 1879 | serial_number.as_deref(), |
| 1880 | uuid.as_deref(), |
| 1881 | oem_strings.as_deref(), |
| 1882 | topology, |
no test coverage detected