Introduce RISC-V 64-bit MicroVM support
Signed-off-by: Ruoqing He <heruoqing@iscas.ac.cn>
This commit is contained in:
parent
58455095a4
commit
c5f58ec246
57600
0005-update-Rust-VMM-dependencies-and-re-vendor.patch
Normal file
57600
0005-update-Rust-VMM-dependencies-and-re-vendor.patch
Normal file
File diff suppressed because it is too large
Load Diff
28163
0006-introduce-riscv64-architecture-support.patch
Normal file
28163
0006-introduce-riscv64-architecture-support.patch
Normal file
File diff suppressed because it is too large
Load Diff
@ -6,7 +6,7 @@
|
||||
|
||||
Name: stratovirt
|
||||
Version: 2.4.0
|
||||
Release: 5
|
||||
Release: 6
|
||||
Summary: StratoVirt is an opensource VMM(Virtual Machine Manager) which aims to perform next generation virtualization.
|
||||
|
||||
License: MulanPSL-2.0
|
||||
@ -18,7 +18,12 @@ Patch002:0002-snapshot-bugfix-VM-run-failed-from-memory-snapshot.patch
|
||||
Patch003:0003-hypervisor-kvm-Fix-setting-core-reg-error-when-resto.patch
|
||||
Patch004:0004-micro_comman-syscall-Update-ioctl-allow-list.patch
|
||||
|
||||
ExclusiveArch: x86_64 aarch64
|
||||
%ifarch riscv64
|
||||
Patch005:0005-update-Rust-VMM-dependencies-and-re-vendor.patch
|
||||
Patch006:0006-introduce-riscv64-architecture-support.patch
|
||||
%endif
|
||||
|
||||
ExclusiveArch: x86_64 aarch64 riscv64
|
||||
|
||||
Requires: pixman
|
||||
Requires: pixman-devel
|
||||
@ -56,6 +61,9 @@ BuildRequires: rust-packaging
|
||||
%define rust_gnu_target aarch64-unknown-linux-gnu
|
||||
%define rust_musl_target aarch64-unknown-linux-musl
|
||||
%endif
|
||||
%ifarch riscv64
|
||||
%define rust_gnu_target riscv64gc-unknown-linux-gnu
|
||||
%endif
|
||||
|
||||
%define _cargo /usr/bin/env CARGO_HOME=.cargo RUSTC_BOOTSTRAP=1 /usr/bin/cargo
|
||||
|
||||
@ -67,7 +75,9 @@ Summary: %{summary}
|
||||
%files -n stratovirt
|
||||
%defattr(-,root,root,-)
|
||||
%{_bindir}/stratovirt
|
||||
%ifnarch riscv64
|
||||
%{_libdir}/stratovirt/static/stratovirt
|
||||
%endif
|
||||
|
||||
%prep
|
||||
%autosetup -p1
|
||||
@ -90,23 +100,36 @@ sed -i '$adebug = true' ./.cargo/config
|
||||
sed -i 's/rustflags = \[/&"-Clink-arg=-lgcc", /' ./.cargo/config
|
||||
%endif
|
||||
|
||||
%ifnarch riscv64
|
||||
%{_cargo} build --release -Z avoid-dev-deps --target=%{rust_musl_target} --features "boot_time pvpanic demo_device vnc vnc_auth ramfb virtio_gpu trace_to_logger trace_to_ftrace trace_to_hitrace"
|
||||
|
||||
sed -i 's/rustflags = \[/&"-Clink-arg=-lpixman-1", /' ./.cargo/config
|
||||
%{_cargo} build --release -Z avoid-dev-deps --target=%{rust_gnu_target} --features "boot_time pvpanic demo_device vnc vnc_auth ramfb virtio_gpu trace_to_logger trace_to_ftrace trace_to_hitrace"
|
||||
%endif
|
||||
|
||||
%ifarch riscv64
|
||||
%{_cargo} build --release -Z avoid-dev-deps --target=%{rust_gnu_target}
|
||||
%endif
|
||||
|
||||
%check
|
||||
%ifnarch riscv64
|
||||
RUST_BACKTRACE=1 cargo test --workspace --exclude mod_test -- --nocapture --test-threads=1
|
||||
%endif
|
||||
|
||||
%install
|
||||
rm -rf %{buildroot}
|
||||
install -d %{buildroot}%{_bindir}
|
||||
install -D -m555 ./target/%{rust_gnu_target}/release/stratovirt %{buildroot}%{_bindir}
|
||||
|
||||
%ifnarch riscv64
|
||||
install -d %{buildroot}%{_libdir}/stratovirt/static
|
||||
install -D -m555 ./target/%{rust_musl_target}/release/stratovirt %{buildroot}%{_libdir}/stratovirt/static
|
||||
%endif
|
||||
|
||||
%changelog
|
||||
* Fri Dec 20 2024 heruoqing <heruoqing@iscas.ac.cn> 2.4.0-6
|
||||
- Introduce riscv64 architecture support
|
||||
|
||||
* Tue Dec 17 2024 frankyj915 <yangjieyj.yang@huawei.com> - 2.4.0-5
|
||||
- Fix setting core reg error when restoring VM.
|
||||
- Update ioctl allow list.
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user