Skip to content

Commit 668cd66

Browse files
author
Sam Jackson
committed
Changed references to *_sys crates with corresponding *_gen names
1 parent b14174f commit 668cd66

36 files changed

+107
-107
lines changed

Cargo.lock

+12-12
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

cpuid/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,5 @@ authors = ["Amazon firecracker team <[email protected]>"]
55

66
[dependencies]
77
kvm = { path = "../kvm" }
8-
kvm_sys = { path = "../kvm_sys" }
8+
kvm_gen = { path = "../kvm_gen" }
99
logger = { path = "../logger" }

cpuid/src/c3_template.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// SPDX-License-Identifier: Apache-2.0
33

44
use cpu_leaf::*;
5-
use kvm_sys::kvm_cpuid_entry2;
5+
use kvm_gen::kvm_cpuid_entry2;
66

77
/// Sets up the cpuid entries for a given VCPU following a C3 template.
88
pub fn set_cpuid_entries(entries: &mut [kvm_cpuid_entry2]) {

cpuid/src/lib.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
//! Utility for configuring the CPUID (CPU identification) for the guest microVM.
1010
1111
extern crate kvm;
12-
extern crate kvm_sys;
12+
extern crate kvm_gen;
1313
#[macro_use]
1414
extern crate logger;
1515

@@ -278,7 +278,7 @@ fn get_brand_string() -> BrandString {
278278
mod tests {
279279
use super::*;
280280
use kvm::{Kvm, MAX_KVM_CPUID_ENTRIES};
281-
use kvm_sys::kvm_cpuid_entry2;
281+
use kvm_gen::kvm_cpuid_entry2;
282282

283283
#[cfg(any(target_arch = "x86", target_arch = "x86_64"))]
284284
#[test]

cpuid/src/t2_template.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// SPDX-License-Identifier: Apache-2.0
33

44
use cpu_leaf::*;
5-
use kvm_sys::kvm_cpuid_entry2;
5+
use kvm_gen::kvm_cpuid_entry2;
66

77
/// Sets up the cpuid entries for a given VCPU following a T2 template.
88
pub fn set_cpuid_entries(entries: &mut [kvm_cpuid_entry2]) {

devices/Cargo.toml

+4-4
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,15 @@ dumbo = { path = "../dumbo" }
1212
logger = { path = "../logger" }
1313
memory_model = { path = "../memory_model" }
1414
net_util = { path = "../net_util" }
15-
net_sys = { path = "../net_sys" }
15+
net_gen = { path = "../net_gen" }
1616
rate_limiter = { path = "../rate_limiter" }
1717
sys_util = { path = "../sys_util" }
18-
virtio_sys = { path = "../virtio_sys" }
19-
vhost_sys = { path = "../vhost_sys" , optional = true}
18+
virtio_gen = { path = "../virtio_gen" }
19+
vhost_gen = { path = "../vhost_gen" , optional = true}
2020
vhost_backend = { path = "../vhost_backend", optional = true}
2121

2222
[dev-dependencies]
2323
tempfile = ">=3.0.2"
2424

2525
[features]
26-
vsock = ["vhost_sys", "vhost_backend"]
26+
vsock = ["vhost_gen", "vhost_backend"]

devices/src/lib.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,15 @@ extern crate dumbo;
1414
#[macro_use]
1515
extern crate logger;
1616
extern crate memory_model;
17-
extern crate net_sys;
17+
extern crate net_gen;
1818
extern crate net_util;
1919
extern crate rate_limiter;
2020
extern crate sys_util;
2121
#[cfg(feature = "vsock")]
2222
extern crate vhost_backend;
2323
#[cfg(feature = "vsock")]
24-
extern crate vhost_sys;
25-
extern crate virtio_sys;
24+
extern crate vhost_gen;
25+
extern crate virtio_gen;
2626

2727
use std::fs::File;
2828

devices/src/virtio/block.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ use memory_model::{GuestAddress, GuestMemory, GuestMemoryError};
2525
use rate_limiter::{RateLimiter, TokenType};
2626
use sys_util::EventFd;
2727
use sys_util::Result as SysResult;
28-
use virtio_sys::virtio_blk::*;
29-
use virtio_sys::virtio_config::*;
28+
use virtio_gen::virtio_blk::*;
29+
use virtio_gen::virtio_config::*;
3030
use {DeviceEventT, EpollHandler};
3131

3232
const CONFIG_SPACE_SIZE: usize = 8;

devices/src/virtio/net.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,12 @@ use super::{
2727
use dumbo::ns::MmdsNetworkStack;
2828
use logger::{Metric, METRICS};
2929
use memory_model::{GuestAddress, GuestMemory};
30-
use net_sys;
30+
use net_gen;
3131
use net_util::{MacAddr, Tap, TapError, MAC_ADDR_LEN};
3232
use rate_limiter::{RateLimiter, TokenType};
3333
use sys_util::EventFd;
34-
use virtio_sys::virtio_config::*;
35-
use virtio_sys::virtio_net::*;
34+
use virtio_gen::virtio_config::*;
35+
use virtio_gen::virtio_net::*;
3636
use {DeviceEventT, EpollHandler};
3737

3838
/// The maximum buffer size when segmentation offload is enabled. This
@@ -626,7 +626,7 @@ impl Net {
626626
) -> Result<Self> {
627627
// Set offload flags to match the virtio features below.
628628
tap.set_offload(
629-
net_sys::TUN_F_CSUM | net_sys::TUN_F_UFO | net_sys::TUN_F_TSO4 | net_sys::TUN_F_TSO6,
629+
net_gen::TUN_F_CSUM | net_gen::TUN_F_UFO | net_gen::TUN_F_TSO4 | net_gen::TUN_F_TSO6,
630630
).map_err(Error::TapSetOffload)?;
631631

632632
let vnet_hdr_size = vnet_hdr_len() as i32;

devices/src/virtio/vhost/vsock.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ use memory_model::GuestMemory;
1313
use sys_util::EventFd;
1414
use vhost_backend::Vhost;
1515
use vhost_backend::Vsock as VhostVsockFd;
16-
use vhost_sys::vhost::*;
17-
use virtio_sys::virtio_config::*;
18-
use virtio_sys::virtio_ring::*;
16+
use vhost_gen::vhost::*;
17+
use virtio_gen::virtio_config::*;
18+
use virtio_gen::virtio_ring::*;
1919

2020
use byteorder::{ByteOrder, LittleEndian};
2121
use epoll;

kvm/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ authors = ["The Chromium OS Authors"]
66
[dependencies]
77
libc = ">=0.2.39"
88

9-
kvm_sys = { path = "../kvm_sys" }
9+
kvm_gen = { path = "../kvm_gen" }
1010
memory_model = { path = "../memory_model" }
1111
sys_util = { path = "../sys_util" }
1212

kvm/src/cap.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
// Use of this source code is governed by a BSD-style license that can be
66
// found in the THIRD-PARTY file.
77

8-
use kvm_sys::*;
8+
use kvm_gen::*;
99

1010
/// A capability the kernel's KVM interface can possibly expose.
1111
#[derive(Clone, Copy, Debug)]

kvm/src/lib.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
1212
extern crate libc;
1313

14-
extern crate kvm_sys;
14+
extern crate kvm_gen;
1515
extern crate memory_model;
1616
extern crate sys_util;
1717

@@ -23,15 +23,15 @@ use std::os::unix::io::{AsRawFd, FromRawFd, RawFd};
2323

2424
use libc::{open, EINVAL, ENOSPC, O_RDWR};
2525

26-
use kvm_sys::*;
26+
use kvm_gen::*;
2727
use memory_model::MemoryMapping;
2828
use sys_util::{errno_result, Error, EventFd, Result};
2929
use sys_util::{
3030
ioctl, ioctl_with_mut_ptr, ioctl_with_mut_ref, ioctl_with_ptr, ioctl_with_ref, ioctl_with_val,
3131
};
3232

3333
pub use cap::*;
34-
pub use kvm_sys::KVM_API_VERSION;
34+
pub use kvm_gen::KVM_API_VERSION;
3535

3636
/// Taken from Linux Kernel v4.14.13 (arch/x86/include/asm/kvm_host.h)
3737
pub const MAX_KVM_CPUID_ENTRIES: usize = 80;

kvm_gen/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[package]
2-
name = "kvm_sys"
2+
name = "kvm_gen"
33
version = "0.1.0"
44
authors = ["The Chromium OS Authors"]
55

kvm_gen/patches/0001-kvm_sys-fix-alignment-for-x86-kvm-structs.patch

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
11
From 4e4496bedf962830fd72f4d5f6a8153755b996fb Mon Sep 17 00:00:00 2001
22
From: Andreea Florescu <[email protected]>
33
Date: Tue, 6 Feb 2018 16:01:48 +0200
4-
Subject: [PATCH 1/3] kvm_sys: fix alignment for x86 kvm structs
4+
Subject: [PATCH 1/3] kvm_gen: fix alignment for x86 kvm structs
55

66
Add alignment for kvm_irq_routing, kvm_msrs and
77
kvm_coalesced_mmio_ring.
88

99
Signed-off-by: Andreea Florescu <[email protected]>
1010
---
11-
kvm_sys/src/x86/bindings.rs | 3 +++
11+
kvm_gen/src/x86/bindings.rs | 3 +++
1212
1 file changed, 3 insertions(+)
1313

14-
diff --git a/kvm_sys/src/x86/bindings.rs b/kvm_sys/src/x86/bindings.rs
14+
diff --git a/kvm_gen/src/x86/bindings.rs b/kvm_gen/src/x86/bindings.rs
1515
index 40c970c..9b8542c 100644
16-
--- a/kvm_sys/src/x86/bindings.rs
17-
+++ b/kvm_sys/src/x86/bindings.rs
16+
--- a/kvm_gen/src/x86/bindings.rs
17+
+++ b/kvm_gen/src/x86/bindings.rs
1818
@@ -1273,6 +1273,7 @@ pub struct kvm_msrs {
1919
pub nmsrs: __u32,
2020
pub pad: __u32,

kvm_gen/patches/0002-kvm_sys-implement-Debug-trait-for-kvm_lapic_state.patch

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
From d796576ad266a1c590b848e73a8392c753804b24 Mon Sep 17 00:00:00 2001
22
From: Constantin Musca <[email protected]>
33
Date: Fri, 12 Jan 2018 18:07:02 +0200
4-
Subject: [PATCH 2/3] kvm_sys: implement Debug trait for kvm_lapic_state
4+
Subject: [PATCH 2/3] kvm_gen: implement Debug trait for kvm_lapic_state
55

66
This is needed for calling unwrap_err() on Result<kvm_lapic_state, Error>.
77

88
Signed-off-by: Constantin Musca <[email protected]>
99
---
10-
kvm_sys/src/x86/bindings.rs | 7 +++++++
10+
kvm_gen/src/x86/bindings.rs | 7 +++++++
1111
1 file changed, 7 insertions(+)
1212

13-
diff --git a/kvm_sys/src/x86/bindings.rs b/kvm_sys/src/x86/bindings.rs
13+
diff --git a/kvm_gen/src/x86/bindings.rs b/kvm_gen/src/x86/bindings.rs
1414
index 9b8542c..2100db4 100644
15-
--- a/kvm_sys/src/x86/bindings.rs
16-
+++ b/kvm_sys/src/x86/bindings.rs
15+
--- a/kvm_gen/src/x86/bindings.rs
16+
+++ b/kvm_gen/src/x86/bindings.rs
1717
@@ -1116,6 +1116,13 @@ fn bindgen_test_layout_kvm_regs() {
1818
pub struct kvm_lapic_state {
1919
pub regs: [::std::os::raw::c_char; 1024usize],

kvm_gen/patches/0003-kvm_sys-implement-PartialEq-for-kvm_msr_entry.patch

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
From de3b980f47a403f3172517e83950d37a35b6de17 Mon Sep 17 00:00:00 2001
22
From: Andreea Florescu <[email protected]>
33
Date: Wed, 7 Feb 2018 12:05:51 +0200
4-
Subject: [PATCH 3/3] kvm_sys: implement PartialEq for kvm_msr_entry
4+
Subject: [PATCH 3/3] kvm_gen: implement PartialEq for kvm_msr_entry
55

66
Signed-off-by: Andreea Florescu <[email protected]>
77
---
8-
kvm_sys/src/x86/bindings.rs | 2 +-
8+
kvm_gen/src/x86/bindings.rs | 2 +-
99
1 file changed, 1 insertion(+), 1 deletion(-)
1010

11-
diff --git a/kvm_sys/src/x86/bindings.rs b/kvm_sys/src/x86/bindings.rs
11+
diff --git a/kvm_gen/src/x86/bindings.rs b/kvm_gen/src/x86/bindings.rs
1212
index 2100db4..11413ce 100644
13-
--- a/kvm_sys/src/x86/bindings.rs
14-
+++ b/kvm_sys/src/x86/bindings.rs
13+
--- a/kvm_gen/src/x86/bindings.rs
14+
+++ b/kvm_gen/src/x86/bindings.rs
1515
@@ -1255,7 +1255,7 @@ fn bindgen_test_layout_kvm_fpu() {
1616
);
1717
}

kvm_gen/patches/0004-kvm_sys-implement-PartialEq-for-register.patch

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
From cee0f2ec507f3e5f51db58f49640fdf6a89ce987 Mon Sep 17 00:00:00 2001
22
From: Diana Popa <[email protected]>
33
Date: Tue, 30 Oct 2018 10:32:59 -0500
4-
Subject: [PATCH] kvm_sys: implement PartialEq for register...
4+
Subject: [PATCH] kvm_gen: implement PartialEq for register...
55

66
related structures.
77

88
Signed-off-by: Diana Popa <[email protected]>
99
---
10-
kvm_sys/src/x86/bindings.rs | 10 +++++-----
10+
kvm_gen/src/x86/bindings.rs | 10 +++++-----
1111
1 file changed, 5 insertions(+), 5 deletions(-)
1212

13-
diff --git a/kvm_sys/src/x86/bindings.rs b/kvm_sys/src/x86/bindings.rs
13+
diff --git a/kvm_gen/src/x86/bindings.rs b/kvm_gen/src/x86/bindings.rs
1414
index 4efc89d..94e07f6 100644
15-
--- a/kvm_sys/src/x86/bindings.rs
16-
+++ b/kvm_sys/src/x86/bindings.rs
15+
--- a/kvm_gen/src/x86/bindings.rs
16+
+++ b/kvm_gen/src/x86/bindings.rs
1717
@@ -1077,7 +1077,7 @@ impl Default for kvm_ioapic_state {
1818
}
1919
}

kvm_gen/src/x86/bindings.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -267,9 +267,9 @@ pub const KVM_S390_RESET_CLEAR: ::std::os::raw::c_uint = 2;
267267
pub const KVM_S390_RESET_SUBSYSTEM: ::std::os::raw::c_uint = 4;
268268
pub const KVM_S390_RESET_CPU_INIT: ::std::os::raw::c_uint = 8;
269269
pub const KVM_S390_RESET_IPL: ::std::os::raw::c_uint = 16;
270-
pub const KVM_SYSTEM_EVENT_SHUTDOWN: ::std::os::raw::c_uint = 1;
271-
pub const KVM_SYSTEM_EVENT_RESET: ::std::os::raw::c_uint = 2;
272-
pub const KVM_SYSTEM_EVENT_CRASH: ::std::os::raw::c_uint = 3;
270+
pub const kvm_genTEM_EVENT_SHUTDOWN: ::std::os::raw::c_uint = 1;
271+
pub const kvm_genTEM_EVENT_RESET: ::std::os::raw::c_uint = 2;
272+
pub const kvm_genTEM_EVENT_CRASH: ::std::os::raw::c_uint = 3;
273273
pub const KVM_S390_MEMOP_LOGICAL_READ: ::std::os::raw::c_uint = 0;
274274
pub const KVM_S390_MEMOP_LOGICAL_WRITE: ::std::os::raw::c_uint = 1;
275275
pub const KVM_S390_MEMOP_F_CHECK_ONLY: ::std::os::raw::c_uint = 1;

0 commit comments

Comments
 (0)