Skip to content

Windows 11 example for x86-64 - #369

Open
dreamliner787-9 wants to merge 19 commits into
mainfrom
windows_mark_ii
Open

Windows 11 example for x86-64#369
dreamliner787-9 wants to merge 19 commits into
mainfrom
windows_mark_ii

Conversation

@dreamliner787-9

@dreamliner787-9 dreamliner787-9 commented Jul 28, 2026

Copy link
Copy Markdown
Collaborator

Desktop guest OS now works reliably on top of mainline libvmm, running on QEMU.

  • Ubuntu 26.04, works out of the box.
  • Windows 10, need to install virtIO drivers via the Windows installer GUI, otherwise works out of the box.
  • Windows 11, same as Windows 10, but need TPM and Secure Boot bypass, otherwise works out of the box.

For Windows to work, a kernel patch is required to enable Intel APICv (hardware accelerated APIC virtualisation) until I can get my RFC below ratified.

This is not quite ready yet, but opening a PR to keep track.

TODOs for me to get this finalised:

  • Complete RFC-24: Add support for Intel APICv seL4/rfcs#37
  • Ensure the above get integrated into Microkit.
  • Add Windows/Ubuntu boot into CI somehow. I'm thinking we have a golden image on the CI runners, then have an app that prints something to COM1 when Ubuntu/Windows get to the desktop. Unsure of licensing implications, something to look into.
  • Write down how to install Windows 10 or 11 on the VM. Especially the latter since the process is a bit complicated, maybe I can automate it.

Nice to haves before merging this:

  • Investigate turning on xsaves and AVX in Microkit for better performance.
  • Separately upstream any libvmm changes in this branch.
  • Implement MSI-X.

Things to look into post-merging:

  • Support multiple VCPUs on x86-64 #368
  • Boot Windows on hardware. The main challenge is getting video out of the VM, other than that I don't think there are any huge issues, since I already got OVMF booting on hardware.
  • On the topic of video, maybe I need to look into emulating, or providing a solid mechanism to passthrough a proper GPU some how. Right now I just passthrough the bochs-display device on QEMU.
  • Emulate an NVMe SSD rather than a virtIO block device, so users don't have to install the virtIO drivers. Same applies for networking.

Closes #279.

Example of Windows 11 virtualised on libvmm, running on QEMU, i.e. nested virtualisation. But it still runs with great performance all things considered:
image
image

Ubuntu:
image

Except for ARM stuff, Linux and Buildroot config files.

Signed-off-by: Bill Nguyen <bill.nguyen@unsw.edu.au>
Signed-off-by: Bill Nguyen <bill.nguyen@unsw.edu.au>
Signed-off-by: Bill Nguyen <bill.nguyen@unsw.edu.au>
Signed-off-by: Bill Nguyen <bill.nguyen@unsw.edu.au>
Signed-off-by: Bill Nguyen <bill.nguyen@unsw.edu.au>
Signed-off-by: Bill Nguyen <bill.nguyen@unsw.edu.au>
For above 4G region on x86

Signed-off-by: Bill Nguyen <bill.nguyen@unsw.edu.au>
Signed-off-by: Bill Nguyen <bill.nguyen@unsw.edu.au>
Signed-off-by: Bill Nguyen <bill.nguyen@unsw.edu.au>
Signed-off-by: Bill Nguyen <bill.nguyen@unsw.edu.au>
Turns out Windows is very strict on ACPI DSDT parsing. The PCI devices
need an interrupt link device. The Link devices must have all the
methods even if they are dummy, else the Windows' resource arbiter will
not accept the interrupt and fail the viostor driver binding process.

Signed-off-by: Bill Nguyen <bill.nguyen@unsw.edu.au>
Signed-off-by: Bill Nguyen <bill.nguyen@unsw.edu.au>
We need to tell Windows that our virtual PCI bridge decodes I/O Ports
range that these legacy devices live in.

Signed-off-by: Bill Nguyen <bill.nguyen@unsw.edu.au>
Signed-off-by: Bill Nguyen <bill.nguyen@unsw.edu.au>
main things that need to be cleaned up from this commit are:

- investigate MSR changes
- investigate xsaves and avx in microkit

Signed-off-by: Bill Nguyen <bill.nguyen@unsw.edu.au>
Signed-off-by: Bill Nguyen <bill.nguyen@unsw.edu.au>
Signed-off-by: Bill Nguyen <bill.nguyen@unsw.edu.au>
Signed-off-by: Bill Nguyen <bill.nguyen@unsw.edu.au>
Windows like to read this sometimes. If we don't handle it then it will
triple fault.

Signed-off-by: Bill Nguyen <bill.nguyen@unsw.edu.au>
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

Successfully merging this pull request may close these issues.

Create a Windows 10/11 example for x86-64

1 participant