Enable AVX for x86 kernel

Open
#568 0 comments 0 reactions 1 assignee View on GitHub

@dreamliner787-9 is already working on this.

Since Jul 23, 2026.

Assessment

This issue has not been assessed yet.

Description

Solve with https://github.com/seL4/microkit/issues/567 for the best result.

We should consider enabling AVX in the kernel so that we can compile software with -march=x86-64-v3 for better performance. This will be helpful for building VMMs on Microkit too, since some guest software might expect AVX (e.g. CachyOS compiles all software packages with AVX on by default). I will make a PR for this once I can quantify and prove that it is beneficial in terms of performance to enable AVX.

To enable AVX you just need to add this line to build_sdk.py, to make the kernel enable AVX in XCR0:

DEFAULT_KERNEL_OPTIONS_X86_64: KERNEL_OPTIONS = {
    "KernelPlatform": "pc99",
    "KernelX86MicroArch": "generic",
    "KernelIOMMU": True,
+   "KernelXSaveFeatureSet": "7",
}

Like https://github.com/seL4/microkit/issues/567 this is a breaking change as it will raise the baseline CPU requirement.

Dominant language
Rust
Stars
201
Forks
80
Avg merge
1d 4h
Merged PRs (30d)
7

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from seL4/microkit

All issues in seL4/microkit

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.