Skip to content

windows: use virtio-pci devices - #120

Draft
lstocchi wants to merge 3 commits into
libkrun:2.0from
lstocchi:pci
Draft

lstocchi wants to merge 3 commits into
libkrun:2.0from
lstocchi:pci

Conversation

@lstocchi

Copy link
Copy Markdown

Jake's PR enables libkrun to use virtio-pci. UEFI/ACPI enumerate virtio-pci naturally, and this patch takes advantage of it to solve a discovery problem that we could face on some distro if the MMIO module is disabled (like RHEL).

This is based on #118 to allow testing it. I'll rebase it when that gets merged

This also need libkrun/libkrun#921

This PR adds experimental support for launching virtual machines on Windows hosts using libkrun 2.0 and the Windows Hypervisor Platform (WHP).

1. Added build.rs link instructions using LIBKRUN_LIB_DIR for krun.dll.lib lookup on Windows and a build.ps1 helper script for local development on Windows.

2. Restricted timesync module to macOS only

3. Splitted context/virtio/status to have platform-specific
   implementations. The macOS part remained unchanged.

This patch misses the firmware for x86_64 systems. It depends on slp/edk2#2
It will be added in following PR

Assisted-by: OpenCode: GPT-5.6 Terra
Signed-off-by: Luca Stocchi <lstocchi@redhat.com>
Add a `--console` command-line argument for Windows builds to allow selecting
the guest console device attached to the host terminal (`ttyS0` or `hvc0`).

Assisted-by: OpenCode: GPT-5.6 Terra
Signed-off-by: Luca Stocchi <lstocchi@redhat.com>
Replace the Windows virtio-mmio device path with modern virtio-pci.
Windows guests booted through UEFI discover the PCI devices through ACPI, avoiding the virtio MMIO discovery. Update krunkit’s Windows setup and documentation to reflect the new transport and its supported device set.

Signed-off-by: Luca Stocchi <lstocchi@redhat.com>
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.

1 participant