Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Successful compilation on an aarch64 architecture #756

Closed
dianpopa opened this issue Dec 10, 2018 · 1 comment
Closed

Successful compilation on an aarch64 architecture #756

dianpopa opened this issue Dec 10, 2018 · 1 comment
Assignees
Milestone

Comments

@dianpopa
Copy link
Contributor

dianpopa commented Dec 10, 2018

Obtain a successful cargo build --target aarch64-unknown-linux-musl.
This implies (but it is not limited to):

  • Identify and label accordingly x86_64 specific code.
  • Label the wrappers over the kvm ioctls in conformity with Oficial KVM API.
  • Code inside the kvm_gen/src/x86_64/bindings.rs is not actually x86_64 specific. The auto generated bindings contain a common wrapper as it is autogenerated from include/uapi/linux/kvm.h and you may also find variables like KVM_PPC_PVINFO_FLAGS_EV_IDLE which are power pc related. Get rid of the x86_64 classification inside this crate.
  • The default syscalls that the vmm uses are diferent on an aarch64. For example, arm does not use libc::SYS_open but libc::SYS_openat. Indeed, compare the arch/aarch64/bits/syscall.h inside the musl repo with its x86_64 equivalent (i.e arch/x86_64/bits/syscall.h).
  • Not necessarily a blocker for succesful aarch64 compilation, but we are using #[cfg(any(target_arch = "x86", target_arch = "x86_64"))] mistakenly throughout our code. Firecracker would not actually compile on an x86 (see timestamp_cycles() function inside fc_util crate.
  • Building with aarch64-unknown-linux-musl is not currently possible. See rust issue. See if workaround suggested works.
@dianpopa
Copy link
Contributor Author

Above mentioned PR was merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants