add Windows (WHP) cross-compilation support#122
Merged
Conversation
Introduce a dedicated Windows build target (`make OS=Windows`) that cross-compiles libkrunfw.dll for use with the Windows Hypervisor Platform (WHP). - Add config-libkrunfw-windows_x86_64 with Hyper-V guest enlightenments (CONFIG_HYPERV, CONFIG_HYPERV_TIMER, CONFIG_HYPERV_UTILS) so the guest kernel can leverage WHP paravirtualization. - Make bin2cbundle.py accept an --os flag to select page alignment: 4K for Windows (matching x86_64 WHP page granularity) and 64K (the original default) for Linux/macOS, avoiding InvalidGuestAddress errors caused by alignment mismatches. - Update the Makefile to handle the full Windows pipeline: select the Windows kernel config, invoke bin2cbundle.py with the correct OS, and link with x86_64-w64-mingw32-gcc using the appropriate flags (--kill-at, --nxcompat). - Document the Windows cross-compilation workflow in README.md. Signed-off-by: lstocchi <lstocchi@redhat.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR introducess Windows support to generate a libkrunfw.dll for use with the Windows Hypervisor Platform (WHP).
The windows config is just a copy of
config-libkrunfw_x86_64with the addition of hyperv modules. It can be certainly optimized (i think at kvm-centric modules) but i don't plan to look at it in the next future. At least this is a first step that can be improved later.