@@ -18,7 +18,7 @@ use versionize::{VersionMap, Versionize, VersionizeError, VersionizeResult};
18
18
use versionize_derive:: Versionize ;
19
19
20
20
use crate :: arch:: x86_64:: interrupts;
21
- use crate :: arch:: x86_64:: msr:: { SetMSRsError , MSR_IA32_ARCH_CAPABILITIES } ;
21
+ use crate :: arch:: x86_64:: msr:: { SetMsrsError , MSR_IA32_ARCH_CAPABILITIES } ;
22
22
use crate :: arch:: x86_64:: regs:: { SetupFpuError , SetupRegistersError , SetupSpecialRegistersError } ;
23
23
use crate :: vstate:: vcpu:: { VcpuConfig , VcpuEmulation } ;
24
24
use crate :: vstate:: vm:: Vm ;
@@ -47,19 +47,19 @@ pub enum Error {
47
47
Fam ( utils:: fam:: Error ) ,
48
48
/// Error configuring the floating point related registers
49
49
#[ error( "Error configuring the floating point related registers: {0:?}" ) ]
50
- FPUConfiguration ( crate :: arch:: x86_64:: regs:: Error ) ,
50
+ FpuConfiguration ( crate :: arch:: x86_64:: regs:: Error ) ,
51
51
/// Cannot set the local interruption due to bad configuration.
52
52
#[ error( "Cannot set the local interruption due to bad configuration: {0:?}" ) ]
53
53
LocalIntConfiguration ( crate :: arch:: x86_64:: interrupts:: Error ) ,
54
54
/// Error configuring the MSR registers
55
55
#[ error( "Error configuring the MSR registers: {0:?}" ) ]
56
- MSRSConfiguration ( crate :: arch:: x86_64:: msr:: Error ) ,
56
+ MsrsConfiguration ( crate :: arch:: x86_64:: msr:: Error ) ,
57
57
/// Error configuring the general purpose registers
58
58
#[ error( "Error configuring the general purpose registers: {0:?}" ) ]
59
- REGSConfiguration ( crate :: arch:: x86_64:: regs:: Error ) ,
59
+ RegsConfiguration ( crate :: arch:: x86_64:: regs:: Error ) ,
60
60
/// Error configuring the special registers
61
61
#[ error( "Error configuring the special registers: {0:?}" ) ]
62
- SREGSConfiguration ( crate :: arch:: x86_64:: regs:: Error ) ,
62
+ SregsConfiguration ( crate :: arch:: x86_64:: regs:: Error ) ,
63
63
/// Cannot open the VCPU file descriptor.
64
64
#[ error( "Cannot open the VCPU file descriptor: {0}" ) ]
65
65
VcpuFd ( kvm_ioctls:: Error ) ,
@@ -74,7 +74,7 @@ pub enum Error {
74
74
VcpuGetMpState ( kvm_ioctls:: Error ) ,
75
75
/// The number of MSRS returned by the kernel is unexpected.
76
76
#[ error( "Unexpected number of MSRS reported by the kernel" ) ]
77
- VcpuGetMSRSIncomplete ,
77
+ VcpuGetMsrsIncomplete ,
78
78
/// Failed to get KVM vcpu msrs.
79
79
#[ error( "Failed to get KVM vcpu msrs: {0}" ) ]
80
80
VcpuGetMsrs ( kvm_ioctls:: Error ) ,
@@ -98,7 +98,7 @@ pub enum Error {
98
98
VcpuGetCpuid ( kvm_ioctls:: Error ) ,
99
99
/// Failed to get KVM TSC freq.
100
100
#[ error( "Failed to get KVM TSC frequency: {0}" ) ]
101
- VcpuGetTSC ( kvm_ioctls:: Error ) ,
101
+ VcpuGetTsc ( kvm_ioctls:: Error ) ,
102
102
/// Failed to set KVM vcpu cpuid.
103
103
#[ error( "Failed to set KVM vcpu cpuid: {0}" ) ]
104
104
VcpuSetCpuid ( kvm_ioctls:: Error ) ,
@@ -116,7 +116,7 @@ pub enum Error {
116
116
VcpuSetMsrs ( kvm_ioctls:: Error ) ,
117
117
/// Failed to set all KVM vcpu MSRs. Only a partial set was done.
118
118
#[ error( "Failed to set all KVM MSRs for this vCPU. Only a partial write was done." ) ]
119
- VcpuSetMSRSIncomplete ,
119
+ VcpuSetMsrsIncomplete ,
120
120
/// Failed to set KVM vcpu regs.
121
121
#[ error( "Failed to set KVM vcpu regs: {0}" ) ]
122
122
VcpuSetRegs ( kvm_ioctls:: Error ) ,
@@ -134,7 +134,7 @@ pub enum Error {
134
134
VcpuSetXsave ( kvm_ioctls:: Error ) ,
135
135
/// Failed to set KVM TSC freq.
136
136
#[ error( "Failed to set KVM TSC frequency: {0}" ) ]
137
- VcpuSetTSC ( kvm_ioctls:: Error ) ,
137
+ VcpuSetTsc ( kvm_ioctls:: Error ) ,
138
138
/// Failed to apply CPU template.
139
139
#[ error( "Failed to apply CPU template" ) ]
140
140
VcpuTemplateError ,
@@ -172,7 +172,7 @@ pub enum KvmVcpuConfigureError {
172
172
#[ error( "Failed to get MSRs to save from CPUID: {0}" ) ]
173
173
MsrsToSaveByCpuid ( crate :: guest_config:: cpuid:: common:: Leaf0NotFoundInCpuid ) ,
174
174
#[ error( "Failed to set MSRs: {0}" ) ]
175
- SetMsrs ( #[ from] SetMSRsError ) ,
175
+ SetMsrs ( #[ from] SetMsrsError ) ,
176
176
#[ error( "Failed to setup registers: {0}" ) ]
177
177
SetupRegisters ( #[ from] SetupRegistersError ) ,
178
178
#[ error( "Failed to setup FPU: {0}" ) ]
@@ -353,7 +353,7 @@ impl KvmVcpu {
353
353
let expected_nmsrs = msrs. as_slice ( ) . len ( ) ;
354
354
let nmsrs = self . fd . get_msrs ( msrs) . map_err ( Error :: VcpuGetMsrs ) ?;
355
355
if nmsrs != expected_nmsrs {
356
- return Err ( Error :: VcpuGetMSRSIncomplete ) ;
356
+ return Err ( Error :: VcpuGetMsrsIncomplete ) ;
357
357
}
358
358
}
359
359
let vcpu_events = self
@@ -450,7 +450,7 @@ impl KvmVcpu {
450
450
for msrs in & state. saved_msrs {
451
451
let nmsrs = self . fd . set_msrs ( msrs) . map_err ( Error :: VcpuSetMsrs ) ?;
452
452
if nmsrs < msrs. as_fam_struct_ref ( ) . nmsrs as usize {
453
- return Err ( Error :: VcpuSetMSRSIncomplete ) ;
453
+ return Err ( Error :: VcpuSetMsrsIncomplete ) ;
454
454
}
455
455
}
456
456
self . fd
0 commit comments