CV-Bowen opened a new pull request, #20963:
URL: https://github.com/apache/nuttx/pull/20963
## Summary
Add the device side of virtio-console. The driver reads the name of a
local character device from the device config space
(`struct vhost_serial_config_s`), opens it, and forwards data between it
and the peer: buffers the peer queues on the TX virtqueue are written
to the device, and data read from the device is returned on the RX
virtqueue. Both `VIRTIO_ID_CONSOLE` and `VIRTIO_ID_RPROC_SERIAL` are
handled. It uses the protocol definitions that #20897 moved to
`include/nuttx/virtio/virtio-serial.h`.
## Impact
New, off by default: `CONFIG_DRIVERS_VHOST_SERIAL` (selects
`DRIVERS_VHOST`), with `_PRIORITY` and `_STACKSIZE`. Nothing changes
unless it is enabled.
## 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
Build only: `qemu-armv8a:rpserver` with `CONFIG_DRIVERS_VHOST_SERIAL=y`
builds without warnings. No in-tree transport creates a device-role
console vdev yet, so the backend is not exercised at run time here; the
rpmsg baseline below only shows nothing else regressed.
Baseline (`test.sh`, cases: baseline.yaml):
- 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
- tested: nuttx ba6ed751199 apps ea8addeaf
- qemu-armv8a built with test-only overlay: disabled LIBC_ENVPATH
BINFMT_CHECKEXEC
- sim:rpserver + sim:rpproxy: PASS
- [x] `uname -a` (server)
- [x] `rpmsg dump all` (server)
- [x] `rpmsg ping all 10 1024 3 0` (server)
- [x] `uname -a` (proxy)
- [x] `rpmsg ping all 10 1024 3 0` (proxy)
- [x] `mount -t rpmsgfs -o cpu=server,fs=/proc /sp` (proxy)
- [x] `cat /sp/version` (proxy)
- [x] `rpmsg dump all` (proxy)
- qemu-armv8a:rpserver + qemu-armv8a:rpproxy: PASS
- [x] `uname -a` (server)
- [x] `uname -a` (proxy)
- [x] `rpmsg dump all` (server)
- [x] `rpmsg ping all 10 1024 3 0` (server)
- [x] `rpmsg ping all 10 1024 3 0` (proxy)
- [x] `mount -t rpmsgfs -o cpu=server,fs=/proc /sp` (proxy)
- [x] `cat /sp/version` (proxy)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]