Skip to content
This repository was archived by the owner on Nov 6, 2024. It is now read-only.

Commit 5604769

Browse files
Sebastien Boeufalexandruag
authored andcommitted
arm, arm64, x86: Remove v4.14 bindings
This patch makes the bindings v4.20 the only available version for all architectures. Because of this unique possibility, the code is simplified, removing the specific Rust features to pick a specific bindings version. Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>
1 parent 418a0d7 commit 5604769

File tree

14 files changed

+34
-23763
lines changed

14 files changed

+34
-23763
lines changed

.buildkite/pipeline.yml

Lines changed: 11 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
steps:
2-
# Test release build with kernel bindings 4.14.
3-
- label: "build-v4.14-x86"
2+
# Test release build.
3+
- label: "build-x86"
44
commands:
5-
- cargo build --release --features=fam-wrappers,kvm-v4_14_0
6-
- cargo build --release --features=fam-wrappers,kvm-v4_14_0 --target x86_64-unknown-linux-musl
7-
- cargo build --release --features=kvm-v4_14_0
8-
- cargo build --release --features=kvm-v4_14_0 --target x86_64-unknown-linux-musl
5+
- cargo build --release --features=fam-wrappers
6+
- cargo build --release --features=fam-wrappers --target x86_64-unknown-linux-musl
7+
- cargo build --release
8+
- cargo build --release --target x86_64-unknown-linux-musl
99
retry:
1010
automatic: false
1111
agents:
@@ -16,58 +16,10 @@ steps:
1616
image: "rustvmm/dev:v4"
1717
always-pull: true
1818

19-
# Test release build with kernel bindings 4.20 and fam-wrappers feature.
20-
- label: "build-v4.20-x86"
19+
- label: "build-arm"
2120
commands:
22-
- cargo build --release --features=fam-wrappers,kvm-v4_20_0
23-
- cargo build --release --features=fam-wrappers,kvm-v4_20_0 --target x86_64-unknown-linux-musl
24-
# No need to test the kvm-v4_20_0 because that one is tested by default when no kernel bindings
25-
# feature is specified.
26-
retry:
27-
automatic: false
28-
agents:
29-
platform: x86_64.metal
30-
os: linux
31-
plugins:
32-
- docker#v3.0.1:
33-
image: "rustvmm/dev:v4"
34-
always-pull: true
35-
36-
- label: "build-v4.14-arm"
37-
commands:
38-
- cargo build --release --features=fam-wrappers,kvm-v4_14_0
39-
- cargo build --release --features=fam-wrappers,kvm-v4_14_0 --target aarch64-unknown-linux-musl
40-
- cargo build --release --features=kvm-v4_14_0
41-
- cargo build --release --features=kvm-v4_14_0 --target aarch64-unknown-linux-musl
42-
retry:
43-
automatic: false
44-
agents:
45-
platform: arm.metal
46-
os: linux
47-
plugins:
48-
- docker#v3.0.1:
49-
image: "rustvmm/dev:v4"
50-
always-pull: true
51-
52-
# Run unit tests for 4.14 bindings. These are the only ones that are not run by the rust-vmm-ci.
53-
- label: "unittests-v4.14-x86"
54-
command:
55-
- cargo test --features=kvm-v4_14_0
56-
- cargo test --features=kvm-v4_14_0 --target x86_64-unknown-linux-musl
57-
retry:
58-
automatic: false
59-
agents:
60-
platform: x86_64.metal
61-
os: linux
62-
plugins:
63-
- docker#v3.0.1:
64-
image: "rustvmm/dev:v4"
65-
always-pull: true
66-
67-
- label: "unittests-v4.14-arm"
68-
command:
69-
- cargo test --features=kvm-v4_14_0
70-
- cargo test --features=kvm-v4_14_0 --target aarch64-unknown-linux-musl
21+
- cargo build --release --features=fam-wrappers
22+
- cargo build --release --features=fam-wrappers --target aarch64-unknown-linux-musl
7123
retry:
7224
automatic: false
7325
agents:
@@ -80,9 +32,7 @@ steps:
8032

8133
- label: "check-warnings-x86"
8234
commands:
83-
- RUSTFLAGS="-D warnings" cargo check --features=kvm-v4_14_0,fam-wrappers
84-
- RUSTFLAGS="-D warnings" cargo check --features=kvm-v4_20_0,fam-wrappers
85-
- RUSTFLAGS="-D warnings" cargo check --features=kvm-v4_14_0
35+
- RUSTFLAGS="-D warnings" cargo check --features=fam-wrappers
8636
retry:
8737
automatic: false
8838
agents:
@@ -96,9 +46,7 @@ steps:
9646

9747
- label: "check-warnings-arm"
9848
commands:
99-
- RUSTFLAGS="-D warnings" cargo check --features=kvm-v4_14_0,fam-wrappers
100-
- RUSTFLAGS="-D warnings" cargo check --features=kvm-v4_20_0,fam-wrappers
101-
- RUSTFLAGS="-D warnings" cargo check --features=kvm-v4_14_0
49+
- RUSTFLAGS="-D warnings" cargo check --features=fam-wrappers
10250
retry:
10351
automatic: false
10452
agents:

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ git clone https://github.com/torvalds/linux.git
2121
When adding a new architecture, the bindings must be generated for all existing
2222
versions for consistency reasons.
2323

24-
### Example for arm64 and version 4.14 and 4.20
24+
### Example for arm64 and version 4.20
2525

2626
For this example we assume that you have both linux and kvm-bindings
2727
repositories in your root.

Cargo.toml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@ keywords = ["kvm"]
99
license = "Apache-2.0"
1010

1111
[features]
12-
kvm-v4_14_0 = []
13-
kvm-v4_20_0 = []
1412
fam-wrappers = ["vmm-sys-util"]
1513

1614
[dependencies]

README.md

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -28,23 +28,13 @@ Next, add this to your crate root:
2828
```rust
2929
extern crate kvm_bindings;
3030
```
31-
By default `kvm-bindings` will export a wrapper over the latest available kernel
32-
version (4.20), but you can select a different version by specifying it in your
33-
toml:
34-
```toml
35-
kvm-bindings = { version = "0.3", features = ["kvm_v4_20_0"]}
36-
```
37-
Bindings are generated for each specific Linux kernel version based on the enabled
38-
crate features as follows:
39-
- `kvm_v4_14_0` contains the bindings for the Linux kernel version 4.14
40-
- `kvm_v4_20_0` contains the bindings for the Linux kernel version 4.20
4131

4232
This crate also offers safe wrappers over FAM structs - FFI structs that have
4333
a Flexible Array Member in their definition.
4434
These safe wrappers can be used if the `fam-wrappers` feature is enabled for
4535
this crate. Example:
4636
```toml
47-
kvm-bindings = { version = "0.3", features = ["kvm_v4_20_0", "fam-wrappers"]}
37+
kvm-bindings = { version = "0.3", features = ["fam-wrappers"]}
4838
```
4939

5040
# Dependencies
File renamed without changes.

0 commit comments

Comments
 (0)