Skip to content

Commit 9ae59c8

Browse files
committed
Update rust-vmm/vmm-sys-util to 0.11.0
See #3249 and #3248. rust-vmm/event-manager still uses comparision requirements, so we have to play catch up with any new rust-vmm version for now Changes: - rust-vmm renamed a method, so propagated that - rust-vmm added an Eq implementation for kvm_ioctl::Error, causing clippy to complain that a lot of our types now only impl PartialEq although they could impl Eq too. Signed-off-by: Patrick Roy <[email protected]>
1 parent 1d70063 commit 9ae59c8

File tree

10 files changed

+19
-19
lines changed

10 files changed

+19
-19
lines changed

Cargo.lock

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/arch/src/x86_64/interrupts.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ use kvm_bindings::kvm_lapic_state;
99
use kvm_ioctls::VcpuFd;
1010
use utils::byte_order;
1111
/// Errors thrown while configuring the LAPIC.
12-
#[derive(Debug, thiserror::Error, PartialEq)]
12+
#[derive(Debug, thiserror::Error, PartialEq, Eq)]
1313
pub enum Error {
1414
/// Failure in getting the LAPIC configuration.
1515
#[error("Failure in getting the LAPIC configuration: {0}")]
@@ -92,7 +92,7 @@ mod tests {
9292

9393
#[test]
9494
fn test_apic_delivery_mode() {
95-
let mut v: Vec<u32> = (0..20).map(|_| utils::rand::xor_psuedo_rng_u32()).collect();
95+
let mut v: Vec<u32> = (0..20).map(|_| utils::rand::xor_pseudo_rng_u32()).collect();
9696

9797
v.iter_mut()
9898
.for_each(|x| *x = set_apic_delivery_mode(*x, 2));

src/arch/src/x86_64/regs.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ const PDPTE_START: u64 = 0xa000;
1919
const PDE_START: u64 = 0xb000;
2020

2121
/// Errors thrown while setting up x86_64 registers.
22-
#[derive(Debug, thiserror::Error, PartialEq)]
22+
#[derive(Debug, thiserror::Error, PartialEq, Eq)]
2323
pub enum Error {
2424
/// Failed to get SREGs for this CPU.
2525
#[error("Failed to get SREGs for this CPU: {0}")]
@@ -52,7 +52,7 @@ pub enum Error {
5252
type Result<T> = std::result::Result<T, Error>;
5353

5454
/// Error type for [`setup_fpu`].
55-
#[derive(Debug, derive_more::From, PartialEq)]
55+
#[derive(Debug, derive_more::From, PartialEq, Eq)]
5656
pub struct SetupFpuError(utils::errno::Error);
5757
impl std::error::Error for SetupFpuError {}
5858
impl fmt::Display for SetupFpuError {
@@ -81,7 +81,7 @@ pub fn setup_fpu(vcpu: &VcpuFd) -> std::result::Result<(), SetupFpuError> {
8181
}
8282

8383
/// Error type of [`setup_regs`].
84-
#[derive(Debug, derive_more::From, PartialEq)]
84+
#[derive(Debug, derive_more::From, PartialEq, Eq)]
8585
pub struct SetupRegistersError(utils::errno::Error);
8686
impl std::error::Error for SetupRegistersError {}
8787
impl fmt::Display for SetupRegistersError {
@@ -120,7 +120,7 @@ pub fn setup_regs(vcpu: &VcpuFd, boot_ip: u64) -> std::result::Result<(), SetupR
120120
}
121121

122122
/// Error type for [`setup_sregs`].
123-
#[derive(Debug, thiserror::Error, PartialEq)]
123+
#[derive(Debug, thiserror::Error, PartialEq, Eq)]
124124
pub enum SetupSpecialRegistersError {
125125
/// Failed to get special registers
126126
#[error("Failed to get special registers: {0}")]

src/devices/src/virtio/net/test_utils.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -437,7 +437,7 @@ pub mod test {
437437
addr += len as u64;
438438
// Add small random gaps between descriptor addresses in order to make sure we
439439
// don't blindly read contiguous memory.
440-
addr += utils::rand::xor_psuedo_rng_u32() as u64 % 10;
440+
addr += utils::rand::xor_pseudo_rng_u32() as u64 % 10;
441441
}
442442

443443
// Mark the chain as available.

src/dumbo/src/tcp/connection.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
use std::num::{NonZeroU16, NonZeroU64, NonZeroUsize, Wrapping};
1010

1111
use bitflags::bitflags;
12-
use utils::rand::xor_psuedo_rng_u32;
12+
use utils::rand::xor_pseudo_rng_u32;
1313

1414
use crate::pdu::bytes::NetworkBytes;
1515
use crate::pdu::tcp::{Error as TcpSegmentError, Flags as TcpFlags, TcpSegment};
@@ -240,7 +240,7 @@ impl Connection {
240240
let ack_to_send = Wrapping(segment.sequence_number()) + Wrapping(1);
241241

242242
// Let's pick the initial sequence number.
243-
let isn = Wrapping(xor_psuedo_rng_u32());
243+
let isn = Wrapping(xor_pseudo_rng_u32());
244244
let first_not_sent = isn + Wrapping(1);
245245
let remote_rwnd_edge = first_not_sent + Wrapping(u32::from(segment.window_size()));
246246

src/utils/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,5 +60,5 @@ fn rand_bytes_impl(rand_fn: &dyn Fn() -> u32, len: usize) -> Vec<u8> {
6060

6161
/// Get a pseudo random vector of length `len` with bytes.
6262
pub fn rand_bytes(len: usize) -> Vec<u8> {
63-
rand_bytes_impl(&rand::xor_psuedo_rng_u32, len)
63+
rand_bytes_impl(&rand::xor_pseudo_rng_u32, len)
6464
}

src/vmm/src/vstate/vcpu/x86_64.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ impl Display for Error {
166166
type Result<T> = result::Result<T, Error>;
167167

168168
/// Error type for [`KvmVcpu::get_tsc_khz`] and [`KvmVcpu::is_tsc_scaling_required`].
169-
#[derive(Debug, derive_more::From, PartialEq)]
169+
#[derive(Debug, derive_more::From, PartialEq, Eq)]
170170
pub struct GetTscError(utils::errno::Error);
171171
impl fmt::Display for GetTscError {
172172
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
@@ -175,7 +175,7 @@ impl fmt::Display for GetTscError {
175175
}
176176
impl std::error::Error for GetTscError {}
177177
/// Error type for [`KvmVcpu::set_tsc_khz`].
178-
#[derive(Debug, derive_more::From, PartialEq)]
178+
#[derive(Debug, derive_more::From, PartialEq, Eq)]
179179
pub struct SetTscError(kvm_ioctls::Error);
180180
impl fmt::Display for SetTscError {
181181
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {

src/vmm/src/vstate/vm.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ pub enum Error {
6767

6868
/// Error type for [`Vm::restore_state`]
6969
#[cfg(target_arch = "x86_64")]
70-
#[derive(Debug, thiserror::Error, PartialEq)]
70+
#[derive(Debug, thiserror::Error, PartialEq, Eq)]
7171
pub enum RestoreStateError {
7272
#[error("{0}")]
7373
SetPit2(kvm_ioctls::Error),

tests/host_tools/uffd/Cargo.lock

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tests/integration_tests/security/demo_seccomp/Cargo.lock

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)