Skip to content

Add virtio-PCI console for stdio through kernel broker - #1563

Merged
Sangho Lee (sangho2) merged 7 commits into
uliteboxfrom
sanghle/ulitebox/virtio_console
Oct 12, 2026
Merged

Sangho Lee (sangho2) merged 7 commits into
uliteboxfrom
sanghle/ulitebox/virtio_console

Conversation

@sangho2

@sangho2 Sangho Lee (sangho2) commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor

This PR adds a virtio console to support stdio through the kernel broker. It implements a modern virtio-PCI console on a generic transport and split virtqueue, reusable for future fs/9p and net/vsock devices, with DMA and MMIO provided by the kernel platform through a HAL trait. It also adds local APIC support to deliver the console's interrupts and to provide a deadline timer, so that BrokerEnter can block until a readiness notification (e.g., stdin) arrives or its deadline expires.

@sangho2 Sangho Lee (sangho2) changed the title Add a virtio console for broker stdio Add a virtio console for broker-based stdio Oct 9, 2026
@sangho2
Sangho Lee (sangho2) force-pushed the sanghle/ulitebox/virtio_console branch from b761be3 to 0963d46 Compare October 9, 2026 22:11
@sangho2 Sangho Lee (sangho2) changed the title Add a virtio console for broker-based stdio Add virtio-PCI console for broker-based stdio Oct 9, 2026
@sangho2 Sangho Lee (sangho2) changed the title Add virtio-PCI console for broker-based stdio Add virtio console for broker-based stdio Oct 9, 2026
@sangho2
Sangho Lee (sangho2) marked this pull request as ready for review October 9, 2026 23:46
@sangho2
Sangho Lee (sangho2) force-pushed the sanghle/ulitebox/virtio_console branch from ec83879 to 5b63e55 Compare October 10, 2026 22:56
@sangho2 Sangho Lee (sangho2) changed the title Add virtio console for broker-based stdio Add virtio console for stdio through kernel broker Oct 12, 2026
@sangho2 Sangho Lee (sangho2) changed the title Add virtio console for stdio through kernel broker Add virtio-PCI console for stdio through kernel broker Oct 12, 2026
@github-actions

Copy link
Copy Markdown

🤖 SemverChecks 🤖 ⚠️ Potential breaking API changes detected ⚠️

Click for details
--- failure function_parameter_count_changed: pub fn parameter count changed ---

Description:
A publicly-visible function now takes a different number of parameters.
        ref: https://doc.rust-lang.org/cargo/reference/semver.html#fn-change-arity
       impl: https://github.com/obi1kenobi/cargo-semver-checks/tree/v0.51.0/src/lints/function_parameter_count_changed.ron

Failed in:
  litebox_broker_local_vm_userland::self_check now takes 2 parameters instead of 0, in /home/runner/work/litebox/litebox/litebox_broker_local_vm_userland/src/lib.rs:450

--- failure method_parameter_count_changed: pub method parameter count changed ---

Description:
A publicly-visible method now takes a different number of parameters, not counting the receiver (self) parameter.
        ref: https://doc.rust-lang.org/cargo/reference/semver.html#fn-change-arity
       impl: https://github.com/obi1kenobi/cargo-semver-checks/tree/v0.51.0/src/lints/method_parameter_count_changed.ron

Failed in:
  litebox_broker_vm_kernel::Broker::new takes 0 parameters in /home/runner/work/litebox/litebox/target/semver-checks/git-ulitebox/63915d358563390052279cd90a5ba397be887e37/litebox_broker_vm_kernel/src/lib.rs:66, but now takes 1 parameters in /home/runner/work/litebox/litebox/litebox_broker_vm_kernel/src/lib.rs:89

--- failure declarative_macro_missing: macro_rules declaration removed or renamed ---

Description:
A `macro_rules!` declarative macro cannot be invoked by its prior name. The macro may have been renamed or removed entirely.
        ref: https://doc.rust-lang.org/reference/macros-by-example.html#path-based-scope
       impl: https://github.com/obi1kenobi/cargo-semver-checks/tree/v0.51.0/src/lints/declarative_macro_missing.ron

Failed in:
  macro console_println, previously in file /home/runner/work/litebox/litebox/target/semver-checks/git-ulitebox/63915d358563390052279cd90a5ba397be887e37/litebox_hal/src/console.rs:134

--- failure function_missing: pub fn removed or renamed ---

Description:
A publicly-visible function cannot be imported by its prior path. A `pub use` may have been removed, or the function itself may have been renamed or removed entirely.
        ref: https://doc.rust-lang.org/cargo/reference/semver.html#item-remove
       impl: https://github.com/obi1kenobi/cargo-semver-checks/tree/v0.51.0/src/lints/function_missing.ron

Failed in:
  function litebox_hal::console::panic_print, previously in file /home/runner/work/litebox/litebox/target/semver-checks/git-ulitebox/63915d358563390052279cd90a5ba397be887e37/litebox_hal/src/console.rs:119
  function litebox_hal::console::print_str, previously in file /home/runner/work/litebox/litebox/target/semver-checks/git-ulitebox/63915d358563390052279cd90a5ba397be887e37/litebox_hal/src/console.rs:113
  function litebox_hal::clock::calibrate_tsc_khz, previously in file /home/runner/work/litebox/litebox/target/semver-checks/git-ulitebox/63915d358563390052279cd90a5ba397be887e37/litebox_hal/src/clock.rs:15
  function litebox_hal::console::print, previously in file /home/runner/work/litebox/litebox/target/semver-checks/git-ulitebox/63915d358563390052279cd90a5ba397be887e37/litebox_hal/src/console.rs:108

--- failure module_missing: pub module removed or renamed ---

Description:
A publicly-visible module cannot be imported by its prior path. A `pub use` may have been removed, or the module may have been renamed, removed, or made non-public.
        ref: https://doc.rust-lang.org/cargo/reference/semver.html#item-remove
       impl: https://github.com/obi1kenobi/cargo-semver-checks/tree/v0.51.0/src/lints/module_missing.ron

Failed in:
  mod litebox_hal::console, previously in file /home/runner/work/litebox/litebox/target/semver-checks/git-ulitebox/63915d358563390052279cd90a5ba397be887e37/litebox_hal/src/console.rs:4

--- failure struct_missing: pub struct removed or renamed ---

Description:
A publicly-visible struct cannot be imported by its prior path. A `pub use` may have been removed, or the struct itself may have been renamed or removed entirely.
        ref: https://doc.rust-lang.org/cargo/reference/semver.html#item-remove
       impl: https://github.com/obi1kenobi/cargo-semver-checks/tree/v0.51.0/src/lints/struct_missing.ron

Failed in:
  struct litebox_platform_vm_kernel::clock::TscClock, previously in file /home/runner/work/litebox/litebox/target/semver-checks/git-ulitebox/63915d358563390052279cd90a5ba397be887e37/litebox_platform_vm_kernel/src/clock.rs:13

@sangho2
Sangho Lee (sangho2) added this pull request to the merge queue Oct 12, 2026
Merged via the queue into ulitebox with commit d0d31a7 Oct 12, 2026
14 of 16 checks passed
@sangho2
Sangho Lee (sangho2) deleted the sanghle/ulitebox/virtio_console branch October 12, 2026 17:52
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