@@ -49,52 +49,57 @@ pub enum Error {
4949 #[ cfg( target_arch = "x86_64" ) ]
5050 /// A call to cpuid instruction failed.
5151 CpuId ( cpuid:: Error ) ,
52+ #[ cfg( target_arch = "x86_64" ) ]
53+ /// Error configuring the floating point related registers
54+ FPUConfiguration ( arch:: x86_64:: regs:: Error ) ,
5255 /// Invalid guest memory configuration.
5356 GuestMemoryMmap ( GuestMemoryError ) ,
5457 /// Hyperthreading flag is not initialized.
5558 HTNotInitialized ,
59+ /// Cannot configure the IRQ.
60+ Irq ( kvm_ioctls:: Error ) ,
5661 /// The host kernel reports an invalid KVM API version.
5762 KvmApiVersion ( i32 ) ,
5863 /// Cannot initialize the KVM context due to missing capabilities.
5964 KvmCap ( kvm_ioctls:: Cap ) ,
60- /// vCPU count is not initialized.
61- VcpuCountNotInitialized ,
62- /// Cannot open the VM file descriptor.
63- VmFd ( kvm_ioctls:: Error ) ,
64- /// Cannot open the VCPU file descriptor.
65- VcpuFd ( kvm_ioctls:: Error ) ,
66- /// Cannot configure the microvm.
67- VmSetup ( kvm_ioctls:: Error ) ,
68- /// Cannot run the VCPUs.
69- VcpuRun ( kvm_ioctls:: Error ) ,
70- /// The call to KVM_SET_CPUID2 failed.
71- SetSupportedCpusFailed ( kvm_ioctls:: Error ) ,
72- /// The number of configured slots is bigger than the maximum reported by KVM.
73- NotEnoughMemorySlots ,
7465 #[ cfg( target_arch = "x86_64" ) ]
7566 /// Cannot set the local interruption due to bad configuration.
7667 LocalIntConfiguration ( arch:: x86_64:: interrupts:: Error ) ,
77- /// Cannot set the memory regions.
78- SetUserMemoryRegion ( kvm_ioctls:: Error ) ,
7968 #[ cfg( target_arch = "x86_64" ) ]
8069 /// Error configuring the MSR registers
8170 MSRSConfiguration ( arch:: x86_64:: msr:: Error ) ,
71+ /// The number of configured slots is bigger than the maximum reported by KVM.
72+ NotEnoughMemorySlots ,
8273 #[ cfg( target_arch = "aarch64" ) ]
8374 /// Error configuring the general purpose aarch64 registers.
8475 REGSConfiguration ( arch:: aarch64:: regs:: Error ) ,
8576 #[ cfg( target_arch = "x86_64" ) ]
8677 /// Error configuring the general purpose registers
8778 REGSConfiguration ( arch:: x86_64:: regs:: Error ) ,
79+ /// The call to KVM_SET_CPUID2 failed.
80+ SetSupportedCpusFailed ( kvm_ioctls:: Error ) ,
81+ #[ cfg( target_arch = "aarch64" ) ]
82+ /// Error setting up the global interrupt controller.
83+ SetupGIC ( arch:: aarch64:: gic:: Error ) ,
84+ /// Cannot set the memory regions.
85+ SetUserMemoryRegion ( kvm_ioctls:: Error ) ,
86+ /// Failed to signal Vcpu.
87+ SignalVcpu ( utils:: errno:: Error ) ,
8888 #[ cfg( target_arch = "x86_64" ) ]
8989 /// Error configuring the special registers
9090 SREGSConfiguration ( arch:: x86_64:: regs:: Error ) ,
91- #[ cfg( target_arch = "x86_64" ) ]
92- /// Error configuring the floating point related registers
93- FPUConfiguration ( arch:: x86_64:: regs:: Error ) ,
94- /// Cannot configure the IRQ.
95- Irq ( kvm_ioctls:: Error ) ,
96- /// Failed to signal Vcpu.
97- SignalVcpu ( utils:: errno:: Error ) ,
91+ #[ cfg( target_arch = "aarch64" ) ]
92+ /// Error doing Vcpu Init on Arm.
93+ VcpuArmInit ( kvm_ioctls:: Error ) ,
94+ #[ cfg( target_arch = "aarch64" ) ]
95+ /// Error getting the Vcpu preferred target on Arm.
96+ VcpuArmPreferredTarget ( kvm_ioctls:: Error ) ,
97+ /// vCPU count is not initialized.
98+ VcpuCountNotInitialized ,
99+ /// Cannot open the VCPU file descriptor.
100+ VcpuFd ( kvm_ioctls:: Error ) ,
101+ /// Cannot run the VCPUs.
102+ VcpuRun ( kvm_ioctls:: Error ) ,
98103 /// Cannot spawn a new vCPU thread.
99104 VcpuSpawn ( io:: Error ) ,
100105 /// Cannot cleanly initialize vcpu TLS.
@@ -103,15 +108,10 @@ pub enum Error {
103108 VcpuTlsNotPresent ,
104109 /// Unexpected KVM_RUN exit reason
105110 VcpuUnhandledKvmExit ,
106- #[ cfg( target_arch = "aarch64" ) ]
107- /// Error setting up the global interrupt controller.
108- SetupGIC ( arch:: aarch64:: gic:: Error ) ,
109- #[ cfg( target_arch = "aarch64" ) ]
110- /// Error getting the Vcpu preferred target on Arm.
111- VcpuArmPreferredTarget ( kvm_ioctls:: Error ) ,
112- #[ cfg( target_arch = "aarch64" ) ]
113- /// Error doing Vcpu Init on Arm.
114- VcpuArmInit ( kvm_ioctls:: Error ) ,
111+ /// Cannot open the VM file descriptor.
112+ VmFd ( kvm_ioctls:: Error ) ,
113+ /// Cannot configure the microvm.
114+ VmSetup ( kvm_ioctls:: Error ) ,
115115}
116116pub type Result < T > = result:: Result < T , Error > ;
117117
0 commit comments