qemu-armv8a/netnsh: enabel the virtio-pci transport

Use to verify the virtio pci transport, and update the qemu-armv8a
document.

Signed-off-by: Bowen Wang <wangbowen6@xiaomi.com>
This commit is contained in:
Bowen Wang
2026-01-28 16:49:22 +08:00
committed by Alan C. Assis
parent b65d2544d2
commit def2e89b6e
2 changed files with 33 additions and 1 deletions
@@ -90,7 +90,7 @@ Configuring NuttX and compile:
$ make
$ dd if=/dev/zero of=./mydisk-1gb.img bs=1M count=1024
Running with QEMU:
Running with QEMU (VirtIO-MMIO transport):
.. code:: console
@@ -108,6 +108,29 @@ Running with QEMU:
-device virtio-blk-device,bus=virtio-mmio-bus.3,drive=hd \
-mon chardev=con,mode=readline -kernel ./nuttx
Running with QEMU (VirtIO-PCI transport):
The netnsh configuration also supports VirtIO-PCI transport. To use VirtIO-PCI
instead of VirtIO-MMIO, run QEMU with PCI devices:
.. code:: console
$ qemu-system-aarch64 -cpu cortex-a53 -nographic \
-machine virt,virtualization=on,gic-version=3 \
-chardev stdio,id=con,mux=on -serial chardev:con \
-netdev user,id=u1,hostfwd=tcp:127.0.0.1:10023-10.0.2.15:23,hostfwd=tcp:127.0.0.1:15001-10.0.2.15:5001 \
-device virtio-net-pci,netdev=u1 \
-device virtio-rng-pci \
-drive file=./mydisk-1gb.img,if=none,format=raw,id=hd \
-device virtio-blk-pci,drive=hd \
-mon chardev=con,mode=readline -kernel ./nuttx
.. note::
The VirtIO-PCI transport uses PCI bus for device discovery and communication,
which is different from the memory-mapped VirtIO-MMIO transport. Both transports
are supported simultaneously in the netnsh configuration
------------------------------------------
Single Core with virtio gpu driver (GICv3)
------------------------------------------
@@ -18,7 +18,12 @@ CONFIG_ARCH_INTERRUPTSTACK=4096
CONFIG_AUDIO=y
CONFIG_BUILTIN=y
CONFIG_CODECS_HASH_MD5=y
CONFIG_DEBUG_FEATURES=y
CONFIG_DEBUG_FULLOPT=y
CONFIG_DEBUG_PCI=y
CONFIG_DEBUG_PCI_ERROR=y
CONFIG_DEBUG_PCI_INFO=y
CONFIG_DEBUG_PCI_WARN=y
CONFIG_DEBUG_SYMBOLS=y
CONFIG_DEFAULT_TASK_STACKSIZE=8192
CONFIG_DEVICE_TREE=y
@@ -28,6 +33,8 @@ CONFIG_DRIVERS_VIRTIO=y
CONFIG_DRIVERS_VIRTIO_BLK=y
CONFIG_DRIVERS_VIRTIO_MMIO=y
CONFIG_DRIVERS_VIRTIO_NET=y
CONFIG_DRIVERS_VIRTIO_PCI=y
CONFIG_DRIVERS_VIRTIO_PCI_POLLING_PERIOD=100
CONFIG_DRIVERS_VIRTIO_RNG=y
CONFIG_DRIVERS_VIRTIO_SERIAL=y
CONFIG_DRIVERS_VIRTIO_SOUND=y
@@ -75,6 +82,8 @@ CONFIG_NSH_BUILTIN_APPS=y
CONFIG_NSH_FILEIOSIZE=512
CONFIG_NSH_READLINE=y
CONFIG_NXPLAYER_HTTP_STREAMING_SUPPORT=y
CONFIG_PCI=y
CONFIG_PCI_QEMU_TEST=y
CONFIG_PREALLOC_TIMERS=4
CONFIG_PTHREAD_STACK_MIN=8192
CONFIG_RAM_SIZE=134217728