Merge pull request #11042 from RuoqingHe/runtime-rs-riscv

runtime-rs: Support and enable build on riscv64
This commit is contained in:
RuoqingHe 2025-03-17 21:42:15 +08:00 committed by GitHub
commit 36d2dee3a4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 24 additions and 0 deletions

View File

@ -43,6 +43,10 @@ jobs:
- rust
- musl-tools
- protobuf-compiler
- name: runtime-rs
path: src/runtime-rs
needs:
- rust
steps:
- name: Adjust a permission for repo

View File

@ -277,6 +277,13 @@ pub fn available_guest_protection() -> Result<GuestProtection, ProtectionError>
Ok(GuestProtection::NoProtection)
}
#[cfg(target_arch = "riscv64")]
#[allow(dead_code)]
// Guest protection is not supported on RISC-V.
pub fn available_guest_protection() -> Result<GuestProtection, ProtectionError> {
Ok(GuestProtection::NoProtection)
}
#[cfg(target_arch = "x86_64")]
#[cfg(test)]
mod tests {

View File

@ -0,0 +1,13 @@
# Copyright (c) 2025 Institute of Software, CAS.
# Copyright (c) 2019-2022 Alibaba Cloud
# Copyright (c) 2019-2022 Ant Group
#
# SPDX-License-Identifier: Apache-2.0
#
MACHINETYPE := virt
KERNELPARAMS := cgroup_no_v1=all systemd.unified_cgroup_hierarchy=1
MACHINEACCELERATORS :=
CPUFEATURES :=
QEMUCMD := qemu-system-riscv64