Can't get multi-process qemu to work
Dear QEMU folks, I'm trying to run the multi-process QEMU, referencing to the document, but it is not work well. document: https://www.qemu.org/docs/master/system/multi-process.html The current status is that I couldn't find a remote device on pci bus from qemu. The steps taken are as follows: 1. build qemu v6.2.0-rc2 2. prepare a program that creates a socket pair and exec shell. ``` $ cat pipe.c #include #include #include #include int main(){ int sv[2]; if (!socketpair(AF_UNIX, SOCK_STREAM, 0, sv)){ printf("%d,%d\n",sv[0],sv[1]); system("$SHELL"); } } $ gcc pipe.c $ ./a.out ``` 3. check the socket pair ``` $ ls -alt /proc/self/fd ... lrwx-- 1 test users 64 12月 11 19:56 3 -> 'socket:[148118067]' lrwx-- 1 test users 64 12月 11 19:56 4 -> 'socket:[148118068]' ``` 4. run a qemu as remote machine that has scsi device ``` $ ./qemu/build/x86_64-softmmu/qemu-system-x86_64 -machine x-remote -nographic -D c.log -serial mon:stdio \ -device lsi53c895a,id=lsi0 -drive id=drive_image2,file=./busybox/rootfs.img \ -device scsi-hd,id=drive2,drive=drive_image2,bus=lsi0.0,scsi-id=0 \ -object x-remote-object,id=robj1,devid=lsi0,fd=4 & ``` 5. run a qemu with x-pci-proxy-dev ``` $ ./qemu/build/x86_64-softmmu/qemu-system-x86_64 -m 2G -kernel ./linux/arch/x86_64/boot/bzImage\ -append 'console=ttyS0 root=/dev/sda rw init=/init' -drive file=./busybox/rootfs.clt.img \ -serial mon:telnet:localhost:5556,server,nowait -nographic -D remote.log \ -device x-pci-proxy-dev,id=lsi0,fd=3 ... # lspci 00:01.0 Class 0601: 8086:7000 00:00.0 Class 0600: 8086:1237 00:01.3 Class 0680: 8086:7113 00:03.0 Class 0200: 8086:100e 00:01.1 Class 0101: 8086:7010 00:02.0 Class 0300: 1234: ``` There is not scsi device in the list. Is there other any documentations for the multi-process qemu? Best regards, Shunsuke
Re: Can't get multi-process qemu to work
On Mon, 11 Dec 2023 at 11:52, Shunsuke Mie wrote: > The steps taken are as follows: > > 1. build qemu v6.2.0-rc2 Is that a typo for "v8.2.0-rc2", or are you really building from a two year old release candidate ? thanks -- PMM
Can't get multi-process qemu to work
Dear QEMU folks, I'm trying to run the multi-process QEMU, referencing to the document, but it is not work well. document: https://www.qemu.org/docs/master/system/multi-process.html The current status is that I couldn't find a remote device on pci bus from qemu. The steps taken are as follows: 1. build qemu v6.2.0-rc2 2. prepare a program that creates a socket pair and exec shell. ``` $ cat pipe.c #include #include #include #include int main(){ int sv[2]; if (!socketpair(AF_UNIX, SOCK_STREAM, 0, sv)){ printf("%d,%d\n",sv[0],sv[1]); system("$SHELL"); } } $ gcc pipe.c $ ./a.out ``` 3. check the socket pair ``` $ ls -alt /proc/self/fd ... lrwx-- 1 test users 64 12月 11 19:56 3 -> 'socket:[148118067]' lrwx-- 1 test users 64 12月 11 19:56 4 -> 'socket:[148118068]' ``` 4. run a qemu as remote machine that has scsi device ``` $ ./qemu/build/x86_64-softmmu/qemu-system-x86_64 -machine x-remote -nographic -D c.log -serial mon:stdio \ -device lsi53c895a,id=lsi0 -drive id=drive_image2,file=./busybox/rootfs.img \ -device scsi-hd,id=drive2,drive=drive_image2,bus=lsi0.0,scsi-id=0 \ -object x-remote-object,id=robj1,devid=lsi0,fd=4 & ``` 5. run a qemu with x-pci-proxy-dev ``` $ ./qemu/build/x86_64-softmmu/qemu-system-x86_64 -m 2G -kernel ./linux/arch/x86_64/boot/bzImage\ -append 'console=ttyS0 root=/dev/sda rw init=/init' -drive file=./busybox/rootfs.clt.img \ -serial mon:telnet:localhost:5556,server,nowait -nographic -D remote.log \ -device x-pci-proxy-dev,id=lsi0,fd=3 ... # lspci 00:01.0 Class 0601: 8086:7000 00:00.0 Class 0600: 8086:1237 00:01.3 Class 0680: 8086:7113 00:03.0 Class 0200: 8086:100e 00:01.1 Class 0101: 8086:7010 00:02.0 Class 0300: 1234: ``` There is not scsi device in the list. Is there other any documentations for the multi-process qemu? Best regards, Shunsuke