masayuki2009 commented on PR #9297:
URL: https://github.com/apache/nuttx/pull/9297#issuecomment-1619348532

   @CV-Bowen 
   I noticed that qemu-armv8a:netnsh_hv does not work (netnsh_smp_hv as well) 
with qemu-7.1 + kvm on raspi3b+.
   
   The latest master
   
   ```
   ishikawa@raspi3:~$ ./script/start_qemu-hv-blk-net.sh
   + /home/ishikawa/opensource/QEMU/qemu-7.1/build/qemu-system-aarch64 -cpu 
host -accel kvm -smp 4 -nographic -machine virt -global 
virtio-mmio.force-legacy=false -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-device,netdev=u1,bus=virtio-mmio-bus.0 -drive 
file=/home/ishikawa/mydisk-1gb.img,if=none,format=raw,id=hd -device 
virtio-blk-device,bus=virtio-mmio-bus.1,drive=hd -kernel ./nuttx
   telnetd [4:100]
   
   NuttShell (NSH) NuttX-12.0.0
   nsh> uname -a
   NuttX  12.0.0 cb2849b4ab-dirty Jul  4 2023 10:38:52 arm64 qemu-armv8a
   nsh> ps
     PID GROUP PRI POLICY   TYPE    NPX STATE    EVENT     SIGMASK           
STACK   USED  FILLED COMMAND
       0     0   0 FIFO     Kthread N-- Ready              0000000000000000 
008144 000976  11.9%  Idle Task
       1     1 192 RR       Kthread --- Waiting  Semaphore 0000000000000000 
008096 000960  11.8%  hpwork 0x402df9b0
       2     2 100 RR       Kthread --- Waiting  Semaphore 0000000000000000 
008096 000960  11.8%  lpwork 0x402df980
       3     3 100 RR       Task    --- Running            0000000000000000 
008112 002912  35.8%  nsh_main
       4     4 100 RR       Task    --- Waiting  Semaphore 0000000000020000 
008112 001680  20.7%  telnetd
   nsh> mount -t vfat /dev/virtblk0 /mnt
   nsh> df
     Block    Number
     Size     Blocks       Used   Available Mounted on
     4096     261628        230      261398 /mnt
        0          0          0           0 /proc
   nsh> ping 10.0.2.2
   PING 10.0.2.2 56 bytes of data
   No response from 10.0.2.2: icmp_seq=0 time=1000 ms
   56 bytes from 10.0.2.2: icmp_seq=1 time=0.0 ms
   56 bytes from 10.0.2.2: icmp_seq=2 time=0.0 ms
   56 bytes from 10.0.2.2: icmp_seq=3 time=0.0 ms
   56 bytes from 10.0.2.2: icmp_seq=4 time=0.0 ms
   56 bytes from 10.0.2.2: icmp_seq=5 time=0.0 ms
   56 bytes from 10.0.2.2: icmp_seq=6 time=0.0 ms
   56 bytes from 10.0.2.2: icmp_seq=7 time=0.0 ms
   56 bytes from 10.0.2.2: icmp_seq=8 time=0.0 ms
   56 bytes from 10.0.2.2: icmp_seq=9 time=0.0 ms
   10 packets transmitted, 9 received, 10% packet loss, time 10130 ms
   rtt min/avg/max/mdev = 0.000/0.000/0.000/0.000 ms
   ```
   
   This PR
   
   ```
   ishikawa@raspi3:~$ ./script/start_qemu-hv-blk-net.sh
   + /home/ishikawa/opensource/QEMU/qemu-7.1/build/qemu-system-aarch64 -cpu 
host -accel kvm -smp 4 -nographic -machine virt -global 
virtio-mmio.force-legacy=false -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-device,netdev=u1,bus=virtio-mmio-bus.0 -drive 
file=/home/ishikawa/mydisk-1gb.img,if=none,format=raw,id=hd -device 
virtio-blk-device,bus=virtio-mmio-bus.1,drive=hd -kernel ./nuttx
   error: kvm run failed Function not implemented
    PC=00000000402ca2c4 X00=0000000000000048 X01=000000004a309758
   X02=0000000040309558 X03=ffffffffc9cf6da8 X04=0000000000000048
   X05=000000000a000300 X06=0000000000000148 X07=0000000040301000
   X08=00000000403022a8 X09=0000000000000000 X10=0000000000000000
   X11=0000000000000000 X12=0000000000000000 X13=0000000000000000
   X14=0000000000000000 X15=0000000000000000 X16=00000000402c8150
   X17=0000000000000000 X18=0000000000000000 X19=000000004030dde0
   X20=000000004030de20 X21=0000000000000000 X22=000000004030ddf8
   X23=000000004030dc60 X24=0000000000000000 X25=0000000000000000
   X26=0000000000000000 X27=0000000000000000 X28=0000000000000000
   X29=0000000000000000 X30=00000000402868d0  SP=0000000040309520
   PSTATE=20000005 --C- EL1h
   QEMU: Terminated
   ```
   
   I also noticed that if I remove virtio-blk-device, it woks (of course, the 
block device can not be used)
   
   ```
   ishikawa@raspi3:~$ 
/home/ishikawa/opensource/QEMU/qemu-7.1/build/qemu-system-aarch64 -cpu host 
-accel kvm -smp 4 -nographic -machine virt -global 
virtio-mmio.force-legacy=false -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-device,netdev=u1,bus=virtio-mmio-bus.0 -drive 
file=/home/ishikawa/mydisk-1gb.img,if=none,format=raw,id=hd -kernel ./nuttx
   telnetd [4:100]
   
   NuttShell (NSH) NuttX-10.2.0
   nsh> uname -a
   NuttX  10.2.0 2b32d35b4b Jul  4 2023 10:48:31 arm64 qemu-armv8a
   nsh> ps
     PID GROUP PRI POLICY   TYPE    NPX STATE    EVENT     SIGMASK           
STACK   USED  FILLED COMMAND
       0     0   0 FIFO     Kthread N-- Ready              0000000000000000 
008144 000896  11.0%  Idle Task
       1     1 192 RR       Kthread --- Waiting  Semaphore 0000000000000000 
008096 000960  11.8%  hpwork 0x402e19b0
       2     2 100 RR       Kthread --- Waiting  Semaphore 0000000000000000 
008096 000960  11.8%  lpwork 0x402e1980
       3     3 100 RR       Task    --- Running            0000000000000000 
008112 002912  35.8%  nsh_main
       4     4 100 RR       Task    --- Waiting  Semaphore 0000000000020000 
008112 001680  20.7%  telnetd
   nsh> ping 10.0.2.2
   PING 10.0.2.2 56 bytes of data
   No response from 10.0.2.2: icmp_seq=0 time=1000 ms
   56 bytes from 10.0.2.2: icmp_seq=1 time=0.0 ms
   56 bytes from 10.0.2.2: icmp_seq=2 time=0.0 ms
   56 bytes from 10.0.2.2: icmp_seq=3 time=0.0 ms
   56 bytes from 10.0.2.2: icmp_seq=4 time=0.0 ms
   56 bytes from 10.0.2.2: icmp_seq=5 time=0.0 ms
   56 bytes from 10.0.2.2: icmp_seq=6 time=0.0 ms
   56 bytes from 10.0.2.2: icmp_seq=7 time=0.0 ms
   56 bytes from 10.0.2.2: icmp_seq=8 time=0.0 ms
   56 bytes from 10.0.2.2: icmp_seq=9 time=0.0 ms
   10 packets transmitted, 9 received, 10% packet loss, time 10130 ms
   rtt min/avg/max/mdev = 0.000/0.000/0.000/0.000 ms
   
   ```


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