diff options
author | David Tolnay <dtolnay@chromium.org> | 2018-12-12 14:33:42 -0800 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2018-12-13 19:28:04 -0800 |
commit | 2bac1e7a9c710d6ad3e50a10463f758a1b5db40a (patch) | |
tree | fefb6ff3f38f84698b5e558f2692af15793bdde0 /x86_64 | |
parent | 3397126b3c862fbd58c7fd31e90eb64c524d27ec (diff) | |
download | crosvm-2bac1e7a9c710d6ad3e50a10463f758a1b5db40a.tar crosvm-2bac1e7a9c710d6ad3e50a10463f758a1b5db40a.tar.gz crosvm-2bac1e7a9c710d6ad3e50a10463f758a1b5db40a.tar.bz2 crosvm-2bac1e7a9c710d6ad3e50a10463f758a1b5db40a.tar.lz crosvm-2bac1e7a9c710d6ad3e50a10463f758a1b5db40a.tar.xz crosvm-2bac1e7a9c710d6ad3e50a10463f758a1b5db40a.tar.zst crosvm-2bac1e7a9c710d6ad3e50a10463f758a1b5db40a.zip |
toolchain: Update to Rust 1.31.0
We updated the production toolchain from 1.30 to 1.31 in CL:1366446. This CL does the same upgrade for the local developer toolchain and Kokoro. The relevant changes are in rust-toolchain and kokoro/Dockerfile. The rest are from rustfmt. TEST=cargo fmt --all -- --check TEST=as described in kokoro/README.md Change-Id: I3b4913f3e237baa36c664b4953be360c09efffd4 Reviewed-on: https://chromium-review.googlesource.com/1374376 Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com> Tested-by: David Tolnay <dtolnay@chromium.org> Reviewed-by: Zach Reizner <zachr@chromium.org>
Diffstat (limited to 'x86_64')
-rw-r--r-- | x86_64/src/lib.rs | 18 | ||||
-rw-r--r-- | x86_64/src/mptable.rs | 26 |
2 files changed, 28 insertions, 16 deletions
diff --git a/x86_64/src/lib.rs b/x86_64/src/lib.rs index 861e1be..524013c 100644 --- a/x86_64/src/lib.rs +++ b/x86_64/src/lib.rs @@ -266,8 +266,10 @@ fn arch_memory_regions(size: u64) -> Vec<(GuestAddress, u64)> { impl arch::LinuxArch for X8664arch { fn build_vm<F>(mut components: VmComponents, virtio_devs: F) -> Result<RunnableLinuxVm> where - F: FnOnce(&GuestMemory, &EventFd) - -> Result<Vec<(Box<PciDevice + 'static>, Option<Minijail>)>>, + F: FnOnce( + &GuestMemory, + &EventFd, + ) -> Result<Vec<(Box<PciDevice + 'static>, Option<Minijail>)>>, { let mut resources = Self::get_resource_allocator(components.memory_mb, components.wayland_dmabuf); @@ -483,7 +485,8 @@ impl X8664arch { 0x2f8, 0x8, false, - ).unwrap(); + ) + .unwrap(); io_bus .insert( Arc::new(Mutex::new(devices::Serial::new_sink( @@ -492,7 +495,8 @@ impl X8664arch { 0x3e8, 0x8, false, - ).unwrap(); + ) + .unwrap(); io_bus .insert( Arc::new(Mutex::new(devices::Serial::new_sink( @@ -501,7 +505,8 @@ impl X8664arch { 0x2e8, 0x8, false, - ).unwrap(); + ) + .unwrap(); io_bus .insert(Arc::new(Mutex::new(devices::Cmos::new())), 0x70, 0x2, false) .unwrap(); @@ -513,7 +518,8 @@ impl X8664arch { 0x061, 0x4, false, - ).unwrap(); + ) + .unwrap(); io_bus .insert(nul_device.clone(), 0x040, 0x8, false) .unwrap(); // ignore pit diff --git a/x86_64/src/mptable.rs b/x86_64/src/mptable.rs index 1421c2c..4c3bae4 100644 --- a/x86_64/src/mptable.rs +++ b/x86_64/src/mptable.rs @@ -166,11 +166,12 @@ pub fn setup_mptable( mpc_cpu.type_ = MP_PROCESSOR as u8; mpc_cpu.apicid = cpu_id; mpc_cpu.apicver = APIC_VERSION; - mpc_cpu.cpuflag = CPU_ENABLED as u8 | if cpu_id == 0 { - CPU_BOOTPROCESSOR as u8 - } else { - 0 - }; + mpc_cpu.cpuflag = CPU_ENABLED as u8 + | if cpu_id == 0 { + CPU_BOOTPROCESSOR as u8 + } else { + 0 + }; mpc_cpu.cpufeature = CPU_STEPPING; mpc_cpu.featureflag = CPU_FEATURE_APIC | CPU_FEATURE_FPU; mem.write_obj_at_addr(mpc_cpu, base_mp) @@ -348,7 +349,8 @@ mod tests { let mem = GuestMemory::new(&[( GuestAddress(MPTABLE_START), compute_mp_size(num_cpus) as u64, - )]).unwrap(); + )]) + .unwrap(); setup_mptable(&mem, num_cpus, Vec::new()).unwrap(); } @@ -359,7 +361,8 @@ mod tests { let mem = GuestMemory::new(&[( GuestAddress(MPTABLE_START), (compute_mp_size(num_cpus) - 1) as u64, - )]).unwrap(); + )]) + .unwrap(); assert!(setup_mptable(&mem, num_cpus, Vec::new()).is_err()); } @@ -370,7 +373,8 @@ mod tests { let mem = GuestMemory::new(&[( GuestAddress(MPTABLE_START), compute_mp_size(num_cpus) as u64, - )]).unwrap(); + )]) + .unwrap(); setup_mptable(&mem, num_cpus, Vec::new()).unwrap(); @@ -385,7 +389,8 @@ mod tests { let mem = GuestMemory::new(&[( GuestAddress(MPTABLE_START), compute_mp_size(num_cpus) as u64, - )]).unwrap(); + )]) + .unwrap(); setup_mptable(&mem, num_cpus, Vec::new()).unwrap(); @@ -418,7 +423,8 @@ mod tests { let mem = GuestMemory::new(&[( GuestAddress(MPTABLE_START), compute_mp_size(MAX_CPUS) as u64, - )]).unwrap(); + )]) + .unwrap(); for i in 0..MAX_CPUS { setup_mptable(&mem, i, Vec::new()).unwrap(); |