vms-ddc: probe non-virtio (SCSI/NVMe) disks so SHOW DEVICE is faithful on bare metal - #1062
Open
baron-3dl wants to merge 1 commit into
Open
vms-ddc: probe non-virtio (SCSI/NVMe) disks so SHOW DEVICE is faithful on bare metal#1062baron-3dl wants to merge 1 commit into
baron-3dl wants to merge 1 commit into
Conversation
…l on bare metal
vms_devtab_probe_disks() enumerated only /dev/vd* (virtio-blk). On bare
metal / KVM -- OVMX's Rule-9 target -- the system disk is SATA/SCSI or
NVMe, so no disk unit was entered and `SHOW DEVICE VDA0:` returned
%SYSTEM-W-NOSUCHDEV (the operator's direct-test finding, vms-ddc /
vms-47d).
Fix, in three layers:
- executive: vms_devtab_probe_disks() now also probes /dev/sd* -> SDAn:
and /dev/nvmeNn1 -> NVMEn:, entered via the existing vms_devtab_add_disk
path. INV-6 preserved exactly as the virtio loop: a unit is entered ONLY
when exec_blockdev_lookup() actually resolves the node.
- kernel: distro/kernel/ovmx-x86_64.config enables virtio-scsi built-in
(CONFIG_SCSI/BLK_DEV_SD/SCSI_LOWLEVEL/SCSI_VIRTIO, =y -- the initramfs
loads no modules). A prior attempt used NVMe, but the minimal
from-source config lacks the MSI-X plumbing NVMe needs to bring up
/dev/nvme0n1 in the guest; virtio-scsi reuses the already-enabled
virtio transport and presents disks as /dev/sd*, exercising the same
non-virtio probe path reliably in a minimal kernel.
- test: run_tests.sh attaches a REAL virtio-scsi disk (/dev/sda);
test_kmod_disk.c asserts the executive enters SDA0: backing /dev/sda
and resolving to the SAME major:minor userspace stat()s independently
-- the same "no way to fake it" proof the VDA0:..VDA400: checks use --
plus a negctl that SDA100: (a second, absent unit) reports
SS$_NOSUCHDEV.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018q4jvj6GCkdbYjRvpy7Vwu
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What / Why
vms_devtab_probe_disks()(src/kernel-core/vms_devtab.c) enumerated only/dev/vd*(virtio-blk). On bare metal / KVM -- OVMX's Rule-9 target -- thesystem disk is SATA/SCSI or NVMe, so no disk unit was entered and
SHOW DEVICE VDA0:returned%SYSTEM-W-NOSUCHDEV(the operator'sdirect-test finding, vms-ddc / vms-47d).
Three layers, so the fix is real end to end:
vms_devtab_probe_disks()now also probes/dev/sd*->SDAn:and/dev/nvmeNn1->NVMEn:, entered via the existingvms_devtab_add_disk()path. INV-6 preserved exactly as the virtio loop:a unit is entered ONLY when
exec_blockdev_lookup()actually resolvesthe node -- never a speculative row.
distro/kernel/ovmx-x86_64.configenables virtio-scsibuilt-in (
CONFIG_SCSI/BLK_DEV_SD/SCSI_LOWLEVEL/SCSI_VIRTIO,=y-- the initramfs loads no modules). A prior attempt (reverted,
9102593) used NVMe here, but the minimal from-source config lacks the
MSI-X plumbing NVMe needs to bring up
/dev/nvme0n1in the guest.virtio-scsi reuses the already-enabled virtio transport and presents
disks as
/dev/sd*, exercising the SAME non-virtio probe path reliablyin a minimal kernel.
run_tests.shattaches ONE real virtio-scsi disk(
virtio-scsi-pci+scsi-hd, presenting/dev/sda).Anti-LARP proof
test_kmod_disk.casserts, against a REALvms.koin QEMU with a realvirtio-scsi disk attached:
SDA0:exists in the executive's table (SS$_NORMAL), backing devicesdaSDA0:'s backingdev_tmatches/dev/sda's independentlystat()'d major:minor -- the same "no way to fake it" oracle the
VDA0:..VDA400:checks useSDA100:(a second, absent SCSI unit) reportsSS$_NOSUCHDEV(negctl)Local verification
Kernel module (
vms.ko, all TUs including the modifiedvms_devtab.c)built cleanly against real kernel headers (
make -C /lib/modules/$(uname -r)/build M=... modules, exit 0, no warnings) --confirms the new probe loops are syntactically/semantically correct. The
full containerized boot + QEMU proof (real virtio-scsi disk -> SDA0:) runs
via the
workflow_dispatchCI leg fired alongside this PR.Refs vms-ddc, vms-47d, vms-050 (oracle-driven UX-fidelity).
Test plan
vms.komodule build (host kernel headers) -- clean, no warningsworkflow_dispatchrun on this branch -- kmod/acceptance legs (skipped on normal PR triggers) prove the real virtio-scsi disk -> SDA0: enumeration🤖 Generated with Claude Code
https://claude.ai/code/session_018q4jvj6GCkdbYjRvpy7Vwu