Skip to content

nshlib: add the vhost command - #4043

Merged
xiaoxiang781216 merged 1 commit into
apache:masterfrom
CV-Bowen:up/P80-nsh-vhost
Nov 15, 2026
Merged

xiaoxiang781216 merged 1 commit into
apache:masterfrom
CV-Bowen:up/P80-nsh-vhost

Conversation

@CV-Bowen

Copy link
Copy Markdown
Contributor

Summary

Add the nsh vhost command for the VHOSTIOC_DUMP ioctl added by
apache/nuttx#21813, the device-side twin of virtio dump:

vhost dump [type]   dump all vhost devices, or only those of <type>
vhost -h            usage

virtio and vhost now share one implementation that takes the device
node and the ioctl. Built when CONFIG_DRIVERS_VHOST=y; disable with
CONFIG_NSH_DISABLE_VHOST (default DEFAULT_SMALL).

Depends on apache/nuttx#21813

Impact

New nsh command, only when CONFIG_DRIVERS_VHOST=y. virtio behaves
as before.

Testing

Host: Ubuntu 22.04.5 LTS x86_64, QEMU version 10.2.1, sim: cc (Ubuntu 13.1.0-8ubuntu1~22.04) 13.1.0, qemu-armv8a: aarch64-none-elf-gcc (Arm GNU Toolchain 12.2.Rel1 (Build arm-12.24)) 12.2.1 20221205

qemu-armv8a:rpproxy with apache/nuttx#21813; the commands and output
are in that PR's Testing section. virtio -h / virtio dump checked
unchanged on qemu-armv8a:rpserver. checkpatch passes; builds with 0
warnings.

Add "vhost dump [type]", the device-side twin of "virtio dump": it opens
/dev/vhost and issues VHOSTIOC_DUMP. Both commands share one
implementation that takes the device node and the ioctl. Disable it with
CONFIG_NSH_DISABLE_VHOST.

Signed-off-by: wangyongrong <wangyongrong@xiaomi.com>
Signed-off-by: Bowen Wang <wangbowen6@xiaomi.com>
@xiaoxiang781216
xiaoxiang781216 merged commit 03802d7 into apache:master Nov 15, 2026
149 of 152 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants