Skip to content

Commit 6eeeed1

Browse files
RuoqingHeroypat
authored andcommitted
riscv64: Introduce RISC-V bindings
Introduce RISC-V KVM bindings for Linux kernel v6.9, and enable RISC-V CI in `.platform` file. Signed-off-by: Ruoqing He <[email protected]>
1 parent 20d5736 commit 6eeeed1

File tree

6 files changed

+8291
-4
lines changed

6 files changed

+8291
-4
lines changed

.platform

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
x86_64
2+
aarch64
3+
riscv64

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33

44
### Added
55

6+
- RISC-V KVM bindings for Linux kernel v6.9.
7+
68
### Changed
79

810
### Removed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ Rust FFI bindings to KVM, generated using
66
following target architectures:
77
- x86_64
88
- arm64
9+
- riscv64
910

1011
The bindings exported by this crate are statically generated using header files
1112
associated with a specific kernel version, and are not automatically synced with

src/lib.rs

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,17 @@
88
#![allow(non_snake_case)]
99
#![cfg_attr(docsrs, feature(doc_auto_cfg))]
1010

11+
#[cfg(all(feature = "fam-wrappers", not(target_arch = "riscv64")))]
1112
#[macro_use]
12-
#[cfg(feature = "fam-wrappers")]
1313
extern crate vmm_sys_util;
1414

15-
#[cfg(feature = "serde")]
15+
#[cfg(all(feature = "serde", not(target_arch = "riscv64")))]
1616
extern crate serde;
1717

18-
#[cfg(feature = "serde")]
18+
#[cfg(all(feature = "serde", not(target_arch = "riscv64")))]
1919
extern crate zerocopy;
2020

21-
#[cfg(feature = "serde")]
21+
#[cfg(all(feature = "serde", not(target_arch = "riscv64")))]
2222
#[macro_use]
2323
mod serialize;
2424

@@ -31,3 +31,8 @@ pub use self::x86_64::*;
3131
mod arm64;
3232
#[cfg(any(target_arch = "aarch", target_arch = "aarch64"))]
3333
pub use self::arm64::*;
34+
35+
#[cfg(target_arch = "riscv64")]
36+
mod riscv64;
37+
#[cfg(target_arch = "riscv64")]
38+
pub use self::riscv64::*;

0 commit comments

Comments
 (0)