@@ -40,15 +40,15 @@ pub enum ConfigurationError {
40
40
/// Failed to create a Flattened Device Tree for this aarch64 microVM: {0}
41
41
SetupFDT ( #[ from] fdt:: FdtError ) ,
42
42
/// Failed to write to guest memory.
43
- MemoryError ( GuestMemoryError ) ,
43
+ MemoryError ( # [ from ] GuestMemoryError ) ,
44
44
/// Cannot copy kernel file fd
45
45
KernelFile ,
46
46
/// Cannot load kernel due to invalid memory configuration or invalid kernel image: {0}
47
47
KernelLoader ( #[ from] linux_loader:: loader:: Error ) ,
48
48
/// Error creating vcpu configuration: {0}
49
49
VcpuConfig ( #[ from] CpuConfigurationError ) ,
50
50
/// Error configuring the vcpu: {0}
51
- VcpuConfigure ( KvmVcpuError ) ,
51
+ VcpuConfigure ( # [ from ] KvmVcpuError ) ,
52
52
}
53
53
54
54
/// The start of the memory area reserved for MMIO devices.
@@ -88,14 +88,12 @@ pub fn configure_system_for_boot(
88
88
let optional_capabilities = vmm. kvm . optional_capabilities ( ) ;
89
89
// Configure vCPUs with normalizing and setting the generated CPU configuration.
90
90
for vcpu in vcpus. iter_mut ( ) {
91
- vcpu. kvm_vcpu
92
- . configure (
93
- & vmm. guest_memory ,
94
- entry_point,
95
- & vcpu_config,
96
- & optional_capabilities,
97
- )
98
- . map_err ( ConfigurationError :: VcpuConfigure ) ?;
91
+ vcpu. kvm_vcpu . configure (
92
+ & vmm. guest_memory ,
93
+ entry_point,
94
+ & vcpu_config,
95
+ & optional_capabilities,
96
+ ) ?;
99
97
}
100
98
let vcpu_mpidr = vcpus
101
99
. iter_mut ( )
@@ -116,9 +114,7 @@ pub fn configure_system_for_boot(
116
114
) ?;
117
115
118
116
let fdt_address = GuestAddress ( get_fdt_addr ( & vmm. guest_memory ) ) ;
119
- vmm. guest_memory
120
- . write_slice ( fdt. as_slice ( ) , fdt_address)
121
- . map_err ( ConfigurationError :: MemoryError ) ?;
117
+ vmm. guest_memory . write_slice ( fdt. as_slice ( ) , fdt_address) ?;
122
118
123
119
Ok ( ( ) )
124
120
}
0 commit comments