Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
1 change: 1 addition & 0 deletions Guide/src/SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@
- [virtio-pmem]()
- [VMBus]()
- [storvsp](./reference/devices/vmbus/storvsp.md)
- [Channels & Subchannels](./reference/devices/vmbus/storvsp_channels.md)
- [netvsp]()
- [vpci]()
- [serial]()
Expand Down
11 changes: 10 additions & 1 deletion Guide/src/reference/architecture/devices/storage.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,16 @@ but they all produce `DiskIo` calls on the backend side.

**NVMe** is the simplest path. The NVMe controller's namespace directly holds a `Disk`. NVM opcodes (READ, WRITE, FLUSH, DSM) map nearly 1:1 to `DiskIo` methods. The FUA bit from the NVMe write command is forwarded directly.

**StorVSP / SCSI** has a two-layer design. StorVSP handles the VMBus transport — negotiation, ring buffer management, sub-channel allocation. It dispatches each SCSI request to an [`AsyncScsiDisk`](https://openvmm.dev/rustdoc/linux/scsi_core/trait.AsyncScsiDisk.html) implementation. For hard drives, that's [`SimpleScsiDisk`](https://openvmm.dev/rustdoc/linux/scsidisk/struct.SimpleScsiDisk.html), which parses the SCSI CDB and translates it to `DiskIo` calls. For optical drives, it's [`SimpleScsiDvd`](https://openvmm.dev/rustdoc/linux/scsidisk/scsidvd/struct.SimpleScsiDvd.html).
**StorVSP / SCSI** has a two-layer design. StorVSP handles the VMBus
transport — negotiation, ring buffer management,
[sub-channel allocation](../../devices/vmbus/storvsp_channels.md). It
dispatches each SCSI request to an
[`AsyncScsiDisk`](https://openvmm.dev/rustdoc/linux/scsi_core/trait.AsyncScsiDisk.html)
implementation. For hard drives, that's
[`SimpleScsiDisk`](https://openvmm.dev/rustdoc/linux/scsidisk/struct.SimpleScsiDisk.html),
which parses the SCSI CDB and translates it to `DiskIo` calls. For
optical drives, it's
[`SimpleScsiDvd`](https://openvmm.dev/rustdoc/linux/scsidisk/scsidvd/struct.SimpleScsiDvd.html).

**IDE** is the legacy path. ATA commands for hard drives call `DiskIo` directly. ATAPI commands for optical drives delegate to `SimpleScsiDvd` through an ATAPI-to-SCSI translation layer — the same DVD implementation that StorVSP uses. IDE also supports [enlightened INT13 commands](../../emulated/legacy_x86/ide.md#enlightened-io), a Microsoft-specific optimization that collapses the multi-exit register-programming sequence into a single VM exit.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,21 @@ The same tree appears in three places:

This page lines those views up so you do not have to infer the schema from the JSON alone.

## Fixed settings

The `fixed` section of VTL2 settings contains values that apply
globally, not per-controller. The key storage-related field is
`scsi_sub_channels`:

| Field | Type | Default | Meaning |
|-------|------|---------|---------|
| `scsi_sub_channels` | `u16` | `0` | Maximum sub-channel count for all SCSI controllers. Clamped to 256 at runtime. |
| `io_ring_size` | `u32` | `256` | Size of each per-CPU io_uring submission queue in the OpenHCL threadpool. Not StorVSP-specific — affects all async I/O. |

See [StorVSP Channels & Subchannels](../../devices/vmbus/storvsp_channels.md)
for the full subchannel model, performance characteristics, and
configuration guidance.

## One controller tree

```text
Expand Down Expand Up @@ -175,6 +190,7 @@ The runtime model and schema enforce several important constraints:
| `Striped` must carry at least two backing devices | `schema::v1` rejects too few devices |
| NVMe namespace IDs cannot be `0` or `!0` | `schema::v1` validates `location` for NVMe |
| NVMe children cannot be DVDs | `schema::v1` rejects `is_dvd` on NVMe |
| SCSI subchannel count is clamped to 256 | `underhill_core::dispatch::vtl2_settings_worker`, `scsi_sub_channels.min(256)` |
| IDE can be a guest-visible target but not a VTL2 backing source | `petri::vtl2_settings` and `openvmm_entry::storage_builder` reject IDE backing |

These rules are useful when debugging configuration failures because they tell you whether the problem is in controller selection, child addressing, or backing-device declaration.
Expand Down
4 changes: 3 additions & 1 deletion Guide/src/reference/devices/vmbus/storvsp.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,9 @@ calls (read, write, flush, unmap).
- **Protocol.** Hyper-V SCSI (SRB-based), with version negotiation
(Win6 through Blue).
- **Sub-channels.** StorVSP supports multiple VMBus sub-channels
for parallel I/O, one worker per channel.
for parallel I/O, one worker per channel. See
[Channels & Subchannels](storvsp_channels.md) for the full
model, configuration, and performance characteristics.
- **Hot-add / hot-remove.** SCSI devices can be attached and
detached at runtime via `ScsiControllerRequest`.
- **Performance.** Poll-mode optimization — when pending I/O count
Expand Down
Loading
Loading