oxidecomputer / oxidecomputer/propolis

scadm shouldn't hardcode legacy virtio 9p device ID for SoftNPU

Open
#1,214 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
270
Forks
42
Avg merge
4d 5h
Merged PRs (30d)
6

Description

scadm finds propolis SoftNPU 9p devices by matching device ID 0x1009 with a legacy subsystem ID. Changing subsystem ID to single out SoftNPU from other 9p devices breaks scadm's lookup and vio9p binding.

Moving the device to transitional or modern virtio with device ID 0x1049 will also break lookup. Both of these things came up as blockers in oxidecomputer/omicron#11237.

scadm should discover a device without depending on PCI identity. Similar to how the aforementioned PR approaches it, we can walk devinfo for virtio 9p nodes that accept both 0x1009 and 0x1049, and identify SoftNPU by its version string (9P2000.P4) with a Tversion exchange.

There may be better ways of doing it as well. As @iximeow mentioned to me in passing, there's nothing inherently wrong with it being a Legacy ID. But that plus hardcoding and intolerance of subsystem ID changes makes it a blocker.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at scadm's SoftNPU and virtio 9p discovery path, then inspect how it currently matches PCI device and subsystem IDs. Compare devinfo handling for 0x1009 and 0x1049 with the Tversion exchange for the 9P2000.P4 version string. Done means SoftNPU is discovered without PCI identity assumptions while vio9p binding continues across virtio modes; coordinate the design with omicron#11237.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
cli, operating-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.