Commit Graph

325 Commits

Author SHA1 Message Date
Ruihan Li 5831c49a9a Check `high_watermark` against `avail_pages` 2026-05-28 11:17:03 +08:00
li041 330c90431d Add virtio filesystem device support 2026-05-27 06:39:55 -07:00
Ray Lee 6764dc5ed0 Fix virtio-blk flush feature detection and handling
Signed-off-by: Ray Lee <hburaylee@gmail.com>
2026-05-25 20:43:45 -07:00
wyt8 4370e221d4 Add a tty device for log output 2026-05-25 05:25:33 -07:00
wyt8 6b6f9fe86e Add virtual terminal driver, console, manager and so on to achieve multiple TTYs 2026-05-25 05:25:33 -07:00
Cautreoxit a9f425a996 Add NVMe driver 2026-05-23 02:34:53 -07:00
Ruihan Li d230c35f8d Remove `PageCacheBackend::npages` 2026-05-19 16:25:18 +08:00
Ruihan Li 2471aea2f3 Propagate more `VirtioTransportError`s 2026-05-17 04:58:47 -07:00
zjp 19ecc2f32a Fix unused_qualifications warnings 2026-05-15 08:46:30 -07:00
zjp f82e212a0e Replace core::result::Result by Result 2026-05-15 07:45:16 -07:00
zjp b617d39df5 Fix redundant_imports warnings 2026-05-15 07:45:16 -07:00
zjp d829094187 Declare prelude Result using default type parameter E 2026-05-15 07:45:16 -07:00
Ruihan Li c4da9d2829 Rename `io_util` to `io-util` 2026-05-14 20:10:58 -07:00
Chen Chengjun bdd854a2ad Remove BioWaiter and replace its usage with IoBatch in block crate 2026-05-13 05:31:32 -07:00
Chen Chengjun f539029b09 Release DMA mappings when BIOs complete
BIO completion previously did not immediately drop the associated DMA mapping,
which left a short window where the same page could be submitted again before
the old mapping was released. That could lead to duplicate mappings for the
same physical range and trigger a failure in DMA mapping.

Release the mapping as soon as the BIO completes. This avoids the duplicate-
mapping window and better matches the lifecycle of a finished BIO.
2026-05-13 05:31:32 -07:00
Chen Chengjun badb0ae1e0 Support specifying a complete_fn for BIO read/write operations 2026-05-13 05:31:32 -07:00
zjp 5422d80c2f Fix rustc and clippy warnings 2026-05-07 19:36:44 -07:00
zjp 9c252cc3e2 Remove unused features 2026-05-07 19:36:44 -07:00
Ruihan Li eddadebf69 Add spaces in log messages after `:` 2026-04-27 23:31:48 -07:00
li041 1d227e1524 Support `virtio-rng` device 2026-04-27 21:01:11 -07:00
li041 eb22e927b8 Document virtio IRQ callback Arc cycles 2026-04-27 21:01:11 -07:00
Ruihan Li 2c1649c1d7 Reimplement vsock devices 2026-04-23 06:42:27 -07:00
Ruihan Li bf7187deb7 Remove vsock code entirely 2026-04-23 06:42:27 -07:00
Ruihan Li 0cc36e6d22 Remove locks from `Taskless` 2026-04-23 06:42:27 -07:00
Ruihan Li 167c7ed31f Add `TxBufferBuilder` 2026-04-23 06:42:27 -07:00
Ruihan Li 408db891aa Fix several other minor problems 2026-04-22 04:15:47 -07:00
Ruihan Li 19efa2dad4 Make queue/memory allocation faillible 2026-04-22 04:15:47 -07:00
Ruihan Li 3ac36963c7 Specify virtqueue API contract 2026-04-22 04:15:47 -07:00
Ruihan Li 28165cf09d Adjust blank lines and method orders 2026-04-22 04:15:47 -07:00
Ruihan Li d9e5b3aa40 Don't mix device and driver queue sizes 2026-04-22 04:15:47 -07:00
Ruihan Li 15c43e2e2f Revise comments in `virtio/queue.rs` 2026-04-22 04:15:47 -07:00
Ruihan Li cff500d6bb Remove some dead code 2026-04-22 04:15:47 -07:00
Xinyi Yu 5f6520d99c Fix virtio-blk flush descriptor count miscalculation 2026-04-21 23:21:27 -07:00
Tate, Hongliang Tian 5b93972e6f Remove all manually-written log prefixes
Remove bracket-style prefixes ([IOAPIC], [sys_getpid], [Task entry],
etc.) and text prefixes that duplicate what __log_prefix already
provides (VirtIO Input:, IOMMU, PCI device, etc.) across the kernel
syscalls, virtio, PCI, IOMMU, IRQ, UART, ACPI, timer, mlsdisk, input,
and rootfs subsystems.
2026-04-17 00:00:12 -07:00
Tate, Hongliang Tian 7d417cbcd2 Add compile-time per-module log prefix via __log_prefix!() 2026-04-17 00:00:12 -07:00
Ruihan Li 6e2b82594e Remove remaining `Ordering::SeqCst` usages 2026-04-16 22:29:12 -07:00
Ruihan Li 4872e5dc5a Lazily acquire MSI-X resources 2026-04-15 04:31:14 -07:00
Ruihan Li 4618168ac7 Lazily acquire I/O memory 2026-04-15 04:31:14 -07:00
Ruihan Li f6c2ebacde Prefer to return `Option<&Type>` 2026-04-15 04:31:14 -07:00
lxh 2e2c5eea27 Refactor `VirtQueue::add_dma_buf` to accept distinct buffer types 2026-04-14 23:15:14 -07:00
Tate, Hongliang Tian 082965f881 Replace the log crate with OSTD's own logging API 2026-04-08 02:02:48 -07:00
Tate, Hongliang Tian 969be51afc Enforce `alphabetical-attrs` guideline across the codebase
Sort all non-derive outer attributes alphabetically by name,
place `#[derive(...)]` last (before any derive helper attributes
like `#[serde(...)]` and `#[clap(...)]`), and sort traits inside
`#[derive(...)]` alphabetically. This covers 329 files with 704
line changes (all pure reordering, no semantic changes).

Key patterns normalized:
- `#[cfg(...)]` comes first (c), then other attrs alphabetically
- `#[repr(...)]` stays before `#[derive(...)]` (derive is always last)
- `#[padding_struct]` and `#[pod_union]` precede `#[derive(...)]`
- Derive helper attrs like `#[serde(...)]` remain after `#[derive(...)]`
- Derive traits like `Debug, Clone, Copy` become `Clone, Copy, Debug`
- The common set `{Debug, Clone, Copy, Pod, Default}` (59 uses,
  12 prior orderings) is now uniformly `Clone, Copy, Debug, Default, Pod`
2026-04-08 01:08:41 -07:00
Jianfeng Jiang a433bd0bd6 Add two unimplemented kernel CLI parameters 2026-03-30 17:03:33 +08:00
Ruihan Li 295929d74e Remove some unnecessary `disable_irq()` 2026-03-22 01:15:53 -07:00
Ruihan Li d7545d0383 Remove `BioType::Discard` for now 2026-03-22 01:15:53 -07:00
Tao Su 96feb78e93 Use OSTD serial output when no console is registered 2026-03-17 21:33:43 -07:00
Ruihan Li 8dd86fc01a Revise `comps/cmdline` code 2026-03-17 21:32:54 -07:00
Tao Su b43d3285fa Add unimplemented kernel parameter module and placeholders 2026-03-17 17:09:44 -07:00
Tao Su 74e5edffd5 Introduce `CpuList` and `MetricU64` value types for parameter parsing 2026-03-17 17:09:44 -07:00
Tao Su cc037f09d6 Define and parse kernel command-line parameters 2026-03-17 17:09:44 -07:00