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

   ## Summary
   
   Two virtio-blk changes:
   
   - move the request, response and config structures and the feature and
     request type macros to include/nuttx/virtio/virtio-blk.h, so a
     vhost-blk backend can share them with the frontend (no functional
     change)
   - make virtio_blk_flush() wait through virtio_blk_wait_complete(), like
     read and write already do, so a flush issued from interrupt context or
     after a panic (for example by coredump) polls the virtqueue instead of
     blocking on a semaphore forever
   
   ## Impact
   
   virtio-blk only. Adds the public header
   `include/nuttx/virtio/virtio-blk.h`; no Kconfig 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
   
   FAT on a virtio-blk disk, `qemu-armv8a:netnsh`:
   
   ```
   qemu-system-aarch64 -cpu cortex-a53 -nographic \
     -machine virt,virtualization=on,gic-version=3 \
     -global virtio-mmio.force-legacy=false \
     -drive file=disk.img,if=none,format=raw,id=hd \
     -device virtio-blk-device,bus=virtio-mmio-bus.0,drive=hd \
     -kernel ./nuttx
   ```
   
   mkfatfs, mount, write 128 KiB, umount, mount again and list: same result
   as master.
   
   <details><summary>FAT round trip</summary>
   
   ```
   nsh> mkfatfs /dev/virtblk0
   nsh> mount -t vfat /dev/virtblk0 /mnt
   nsh> dd if=/dev/zero of=/mnt/f bs=512 count=256
   131072 bytes (256 blocks) copied, 9581 usec, 13359 KB/s
   nsh> ls -l /mnt
   /mnt:
    -rwxrwxrwx      131072 2022-11-14 00:00 f
   nsh> umount /mnt
   ```
   </details>
   
   The flush-in-interrupt path is only reached from coredump/panic and was
   not exercised here.
   
   No regression in rpmsg: sim:rpserver/rpproxy and 
qemu-armv8a:rpserver/rpproxy boot and pass the fixed rpmsg cases (dump, ping, 
rpmsgfs; 15/15). qemu-armv8a was built with LIBC_ENVPATH and BINFMT_CHECKEXEC 
disabled, which current master needs for nxinit to start nsh there; unrelated 
to this change.
   


-- 
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