CV-Bowen opened a new pull request, #21048:
URL: https://github.com/apache/nuttx/pull/21048

   ## Summary
   
   Two openamp patch-list changes:
   
   - `open-amp.cmake` never applied
     `0020-rpmsg_virtio-do-not-trust-lengths-written-by-the-remote.patch`
     (8d69e104f1e only added it to `open-amp.defs`), so CMake builds used
     the unpatched `rpmsg_virtio.c`. Apply it there too.
   - add `0021-virtio-add-buffer-map-unmap-ops-for-non-coherent-tra.patch`.
     Transports like remoteproc only let the peer access shared memory, so
     a virtio driver cannot put an arbitrary stack, heap or user address
     into a descriptor. The patch adds `map`/`unmap`/`free_largest` to
     `struct virtio_memory_ops` and the `virtio_map_buf()`,
     `virtio_unmap_buf()` and `virtio_free_largest()` helpers, which bounce
     the buffer when the transport provides `map`/`unmap` and are a no-op
     (zero copy) otherwise. Upcoming virtio frontends (i2c, spi, gpio,
     crypto) use these helpers.
   
   ## Impact
   
   - CMake builds now get the 0020 fix that Make builds already had.
   - 0021 only adds API to `openamp/virtio.h`. No transport in tree sets
     the new callbacks yet, so behavior does not change.
   
   ## 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
   
   Patch chain: on a fresh `open-amp-2025.10.0` tree, all 21 patches listed
   in `open-amp.defs` apply with `patch -p0` and give the same tree as the
   CMake `PATCH_COMMAND`. In the CMake-fetched tree used by the baseline
   below, `lib/rpmsg/rpmsg_virtio.c` now contains the 0020 change and
   `lib/include/openamp/virtio.h` the 0021 helpers. The rpmsg baseline runs
   on top of the patched openamp.
   
   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 2a5a98d26fe apps 5f1100d02
   - 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]

Reply via email to