Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
e3529ab
Disable TSI fallback for offline guests
DorianZheng Apr 3, 2026
ef33551
feat: add Windows WHPX hypervisor backend
Apr 16, 2026
154bb08
refactor: gate Unix-only code and add Windows platform support
Apr 16, 2026
2fe23a8
feat(vmm): intercept MSR/CPUID exits to fix WHPX triple fault during …
Apr 17, 2026
d052c08
feat(vmm): complete WHPX device emulation for Linux kernel boot
Apr 17, 2026
047861d
feat(vmm): add virtio-blk disk support and WHPX cmdline refinements
Apr 17, 2026
9569d73
feat(vmm): wire root disk remount and init path into WHPX kernel cmdline
Apr 18, 2026
94f66d3
feat(vmm): add --init, --root, --fstype, --argv options to boot_kerne…
Apr 18, 2026
b17e487
fix(vmm): set valid virtio vendor ID and add block error logging
Apr 18, 2026
7d5485c
feat(vmm/windows): vsock outbound TCP, second disk, E820 MMIO hole
Apr 19, 2026
7bf9cc7
perf(vmm): serial FIFO batching and code quality improvements
Apr 20, 2026
d5e10e0
feat(vmm): ACPI S5 instant shutdown with quiet/verbose boot modes
Apr 20, 2026
9bec914
feat(vmm/windows): vsock host-initiated connections and flexible port…
Apr 22, 2026
66b6f41
style(vmm): apply rustfmt to ACPI tables and boot loader
Apr 22, 2026
3b174ee
fix(windows): WHPX reliability — PIC priority masking, HLT clear_halt…
Apr 24, 2026
a2afcfb
fix(windows): CMOS RTC BCD encoding and MMIO config space byte reads
Apr 26, 2026
3f85577
perf(windows/vsock): increase TCP read buffer 4KB → 64KB + add trace …
Apr 27, 2026
e98ee48
feat(windows): add async virtio-blk worker (disabled) + HLT/interrupt…
Apr 28, 2026
fa43545
feat(windows): enable async virtio-blk worker + fix interrupt injection
Apr 29, 2026
23be56a
feat(windows): add userspace IOAPIC + LAPIC interrupt architecture
Apr 29, 2026
92205dd
feat(windows): multi-vCPU support (LAPIC array, ICR/IPI, multi-thread…
Apr 29, 2026
85b7f5e
feat(windows): add virtio-rng and virtio-balloon devices
Apr 30, 2026
0affe97
feat(windows): HLT tiered sleep, structured logging, LAPIC timer thro…
Apr 30, 2026
55d032c
feat(windows): add QCOW2 backing file support to disk backend
Apr 30, 2026
55fbee8
feat(windows): per-vCPU LAPIC locking for 4+ vCPU support
May 1, 2026
e812fa3
feat(windows): lock-free LAPIC + CPUID topology override
May 2, 2026
0f57087
feat(windows): ICR broadcast shorthand + 4-vCPU AP diagnostic logging
May 2, 2026
2bbabdf
feat(windows): replace TCP with AF_UNIX sockets in VMM
May 2, 2026
81d7316
fix(windows): gate Unix-only deps behind cfg(unix) for Windows compil…
May 2, 2026
6140590
fix: update enable_tsi() to use tsi_flags after TsiFlags refactoring
May 3, 2026
540822a
fix: cargo fmt + declare efi feature for clippy
May 5, 2026
0f052c2
fix(ci): cargo fmt import ordering + restore test_utils dev-dep
May 5, 2026
2ffc9ef
fix(ci): gate boot_kernel example behind cfg(windows)
May 5, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
695 changes: 467 additions & 228 deletions Cargo.lock

Large diffs are not rendered by default.

19 changes: 19 additions & 0 deletions include/libkrun.h
Original file line number Diff line number Diff line change
Expand Up @@ -462,6 +462,25 @@ int32_t krun_add_net_unixgram(uint32_t ctx_id,
uint32_t features,
uint32_t flags);

/**
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

there is already krun_disable_implicit_vsock for disabling tsi

* Disables automatic TSI networking for this context.
*
* When no virtio-net devices are added, libkrun normally enables the TSI backend.
* Call this function to keep the guest fully offline instead: no virtio-net
* device will be attached and TSI will remain disabled.
*
* Arguments:
* "ctx_id" - the configuration context ID.
*
* Notes:
* This function only affects the automatic fallback path used when no network
* devices are added. It should be called before krun_start_enter.
*
* Returns:
* Zero on success or a negative error number on failure.
*/
int32_t krun_disable_tsi(uint32_t ctx_id);

/**
* Adds an independent virtio-net device with the tap backend.
* Call to this function disables TSI backend.
Expand Down
4 changes: 4 additions & 0 deletions src/devices/src/virtio/vsock/device.rs
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,10 @@ impl Vsock {
self.cid
}

pub fn enable_tsi(&self) -> bool {
self.muxer.enable_tsi()
}

/// Walk the driver-provided RX queue buffers and attempt to fill them up with any data that we
/// have pending. Return `true` if descriptors have been added to the used ring, and `false`
/// otherwise.
Expand Down
4 changes: 4 additions & 0 deletions src/devices/src/virtio/vsock/muxer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,10 @@ impl VsockMuxer {
}
}

pub fn enable_tsi(&self) -> bool {
self.tsi_flags.tsi_enabled()
}

pub(crate) fn activate(
&mut self,
mem: GuestMemoryMmap,
Expand Down
12 changes: 10 additions & 2 deletions src/libkrun/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,15 @@ log = "0.4.0"
once_cell = "1.4.1"
krun_display = { package = "krun-display", version = "0.1.0", path = "../display", optional = true, features = ["bindgen_clang_runtime"] }
krun_input = { package = "krun-input", version = "0.1.0", path = "../input", optional = true, features = ["bindgen_clang_runtime"] }
rand = "0.9.2"

vmm = { package = "krun-vmm", version = "=0.1.0-1.18.0", path = "../vmm" }

# Unix-only internal crates (not used by Windows WHPX backend)
[target.'cfg(unix)'.dependencies]
devices = { package = "krun-devices", version = "=0.1.0-1.18.0", path = "../devices" }
polly = { package = "krun-polly", version = "=0.1.0-1.18.0", path = "../polly" }
utils = { package = "krun-utils", version = "=0.1.0-1.18.0", path = "../utils" }
vmm = { package = "krun-vmm", version = "=0.1.0-1.18.0", path = "../vmm" }
rand = "0.9.2"

[target.'cfg(target_os = "macos")'.dependencies]
hvf = { package = "krun-hvf", version = "=0.1.0-1.18.0", path = "../hvf" }
Expand All @@ -46,6 +49,11 @@ aws-nitro = { package = "krun-aws-nitro", version = "=0.1.0-1.18.0", path = "../
nitro-enclaves = { version = "0.5.0", optional = true }
vm-memory = { version = "0.17", features = ["backend-mmap"] }

# Windows-only dependencies (WHPX C API)
[target.'cfg(target_os = "windows")'.dependencies]
env_logger = "0.11"
libc = ">=0.2.39"

[lib]
name = "krun"
crate-type = ["cdylib", "lib"]
Loading
Loading