rust-vmm / rust-vmm-container

Container with all dependencies required for running rust-vmm crates integration tests.
Apache License 2.0
65 stars 32 forks source link

Add support for RISC-V code cross compilation test #101

Closed TimePrinciple closed 1 month ago

TimePrinciple commented 4 months ago

Add steps needed for RISC-V specific code to cross-compile.

Summary of the PR

I'm proposing using x86_64 platform to cross-compile RISC-V code and qemu-riscv64-static to test the compiled binary as a temporary solution, since RISC-V machines are yet available on BuildKite.

Requirements

Before submitting your PR, please make sure you addressed the following requirements:

endeneer commented 3 months ago

@TimePrinciple Appreciate the alternative workaround. Just FYI, last time I proposed using qemu-system (see this PR) instead of qemu-user-static, because, correct me if I'm wrong, qemu-user-static has some limitations such as:

But for cross-compilation, qemu-user-static should suffice and looks much simpler.

TimePrinciple commented 3 months ago

@TimePrinciple Appreciate the alternative workaround. Just FYI, last time I proposed using qemu-system (see this PR) instead of qemu-user-static, because, correct me if I'm wrong, qemu-user-static has some limitations such as:

  • no support for emulation of RISC-V hypervisor extension
  • limited system call support (kvm_ioctls might fail)
  • lack of hardware access (vfio might fail)

But for cross-compilation, qemu-user-static should suffice and looks much simpler.

Indeed, I'm proposing this approach because of it was mentioned in this issue.