mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
misc: Remove unnecessary literal casts
Signed-off-by: Rob Bradford <robert.bradford@intel.com>
This commit is contained in:
committed by
Sebastien Boeuf
parent
05cdef17f4
commit
fabd63072b
@@ -508,7 +508,7 @@ mod tests {
|
||||
// Only run the first instruction.
|
||||
assert!(vmm.emulate_first_insn(cpu_id, &insn).is_ok());
|
||||
|
||||
assert_eq!(ip + 7 as u64, vmm.cpu_state(cpu_id).unwrap().ip());
|
||||
assert_eq!(ip + 7, vmm.cpu_state(cpu_id).unwrap().ip());
|
||||
|
||||
let new_rax: u64 = vmm
|
||||
.cpu_state(cpu_id)
|
||||
@@ -541,7 +541,7 @@ mod tests {
|
||||
// Run the 2 first instructions.
|
||||
assert!(vmm.emulate_insn(cpu_id, &insn, Some(2)).is_ok());
|
||||
|
||||
assert_eq!(ip + 7 + 4 as u64, vmm.cpu_state(cpu_id).unwrap().ip());
|
||||
assert_eq!(ip + 7 + 4, vmm.cpu_state(cpu_id).unwrap().ip());
|
||||
|
||||
let rbx: u64 = vmm
|
||||
.cpu_state(cpu_id)
|
||||
|
||||
@@ -307,7 +307,7 @@ impl hypervisor::Hypervisor for MshvHypervisor {
|
||||
/// Get the supported CpuID
|
||||
///
|
||||
fn get_cpuid(&self) -> hypervisor::Result<CpuId> {
|
||||
Ok(CpuId::new(1 as usize))
|
||||
Ok(CpuId::new(1))
|
||||
}
|
||||
#[cfg(target_arch = "x86_64")]
|
||||
///
|
||||
@@ -601,7 +601,7 @@ impl cpu::Vcpu for MshvVcpu {
|
||||
}
|
||||
hv_message_type_HVMSG_X64_MSR_INTERCEPT => {
|
||||
let info = x.to_msr_info().unwrap();
|
||||
if info.header.intercept_access_type == 0 as u8 {
|
||||
if info.header.intercept_access_type == 0 {
|
||||
debug!("msr read: {:x}", info.msr_number);
|
||||
} else {
|
||||
debug!("msr write: {:x}", info.msr_number);
|
||||
@@ -935,7 +935,7 @@ impl vm::Vm for MshvVm {
|
||||
let vcpu = MshvVcpu {
|
||||
fd: vcpu_fd,
|
||||
vp_index: id,
|
||||
cpuid: CpuId::new(1 as usize),
|
||||
cpuid: CpuId::new(1),
|
||||
msrs: self.msrs.clone(),
|
||||
ioeventfds: self.ioeventfds.clone(),
|
||||
gsi_routes: self.gsi_routes.clone(),
|
||||
|
||||
Reference in New Issue
Block a user