On Mon, Jul 28, 2014 at 02:42:13PM +0530, Amit Shah wrote:> On (Mon) 28 Jul 2014 [16:49:20], Amos Kong wrote: > > On Mon, Jul 28, 2014 at 01:25:14PM +0530, Amit Shah wrote: > > > On (Mon) 28 Jul 2014 [15:32:42], Amos Kong wrote: > > > > QEMU commandline: > > > > > > > > ./x86_64-softmmu/qemu-system-x86_64 --enable-kvm -m 2000 -drive file=/images/nolvm.qcow2 --kernel /home/devel/linux/arch/x86/boot/bzImage -append "ro root=/dev/sda1 console=ttyS0,115200" -monitor unix:/tmp/m,nowait,server -device virtio-net-pci,netdev=h0,vectors=17,mq=on,id=n0 -netdev tap,id=h0,queues=8 -device virtio-net-pci,netdev=h1,vectors=0,mq=on,id=n1 -netdev tap,id=h1,queues=8 -vnc :0 -mon chardev=qmp,mode=control,pretty=on -chardev socket,id=qmp,host=localhost,port=1234,server,nowait -serial stdio -object rng-random,filename=/dev/urandom,id=rng0 -device virtio-rng-pci,rng=rng0,id=h0 -object rng-random,filename=/dev/urandom,id=rng1 -device virtio-rng-pci,rng=rng1,id=h1 > > > > > > > > It works when I only add one virtio-rng device. Did you touch this > > > > problem? > > > > > > > > I'm using latest net-next/master (ac3d2e5a9ef2f4d8f57c50070c4883ecb7cec29f) > > > > Hi Amit, > > > > > <snip> > > > > [ 0.223503] Non-volatile memory driver v1.3 > > > > [ 1.172293] tsc: Refined TSC clocksource calibration: 2893.436 MHz > > > > qemu: terminating on signal 2 <---------- (I have to cancel QEMU process by Ctrl + C) > > > > > > This looks similar to what I saw when driver asks for randomness from the host > > > before probe is completed. > > > > > > Does the following patch help? > > > > This patch was already inclued in latest net-next/master > > patch commit: e052dbf554610e2104c5a7518c4d8374bed701bb > > No, it's a different one, goes on top of the commit you referenced.Thanks. This patch fixed the problem. -- Amos.
3.16 (guest hangs with two rng devices) 3.16 + quick fix (can startup with two rng devices) (hotplug issue 1 + hotplug issue 2 exist) lates torvalds/linux.git + amit 4 patches (can startup with two rng devices) (only hotplug issue 2 exists) However, the 4 patches also fixed the hang issue, the hotplug issue was fixed a little. The hotplug issue is effected by the backend, or maybe it's not a real issue, because the rng device can be hot-removed after dd process is killed. Hotplug issue 1: 1. boot up guest with two rng device (rng0 uses /dev/urandom, rng1 uses /dev/random) 2. read data by dd in guest 3 (option 1). hot-remove rng0, then hot-remove rng1 -> result: _only rng1_ can't be removed until dd process is killed 3 (option 2). hot-remove rng1, then hot-remove rng0 -> result: two devices can be removed successfully, dd process will exit automatically. If we use /dev/urandom for rng0 and rng1, _rng0 & rng1_ can be removed, dd process will exit automatically. Hotplug issue 2: If we use /dev/random for rng0 and rng1, _rng0 & rng1_ can't be removed until dd process is killed. Hotplug issue 3: If we use /dev/random for rng0 and rng1, _only rng1_ can't be removed until dd process is killed. (The difference between /dev/random and /dev/urandom is the speed.) Thanks, Amos
On Tue, Aug 05, 2014 at 06:28:54PM +0800, Amos Kong wrote:> 3.16 (guest hangs with two rng devices) > 3.16 + quick fix (can startup with two rng devices) (hotplug issue 1 + hotplug issue 2 exist) > lates torvalds/linux.git + amit 4 patches (can startup with two rng devices) (only hotplug issue 2 exists) > > However, the 4 patches also fixed the hang issue, the hotplug issue was fixed a little. > The hotplug issue is effected by the backend, or maybe it's not a real issue, because > the rng device can be hot-removed after dd process is killed. > > > Hotplug issue 1: > 1. boot up guest with two rng device (rng0 uses /dev/urandom, rng1 uses /dev/random) > 2. read data by dd in guest > 3 (option 1). hot-remove rng0, then hot-remove rng1 -> result: _only rng1_ can't be removed until dd process is killed > 3 (option 2). hot-remove rng1, then hot-remove rng0 -> result: two devices can be removed successfully, dd process will exit automatically. > > If we use /dev/urandom for rng0 and rng1, _rng0 & rng1_ can be removed, dd process will exit automatically. > > Hotplug issue 2: > If we use /dev/random for rng0 and rng1, _rng0 & rng1_ can't be removed until dd process is killed. > > Hotplug issue 3: > If we use /dev/random for rng0 and rng1, _only rng1_ can't be removed until dd process is killed.Hi Amit, I finally found the root problem and posted a fix to upstream: http://lists.linuxfoundation.org/pipermail/virtualization/2014-August/027049.html It can help to fix the hotplug issues on 3.16 & latest kernel, so stable kernel is CCed.> (The difference between /dev/random and /dev/urandom is the speed.) > > Thanks, Amos-- Amos.
Apparently Analagous Threads
- When I boot two virtio-rng devices, guest will hang
- When I boot two virtio-rng devices, guest will hang
- When I boot two virtio-rng devices, guest will hang
- When I boot two virtio-rng devices, guest will hang
- When I boot two virtio-rng devices, guest will hang