On 27.11.15 08:07, Adrian Schröter wrote:
> On Friday 27 November 2015, 08:02:19 wrote Adrian Schröter:
>> On Friday 27 November 2015, 07:58:47 wrote Adrian Schröter:
>>> On Thursday 26 November 2015, 22:57:57 wrote Dirk Müller:
>>>> Hi Adrian,
>>>>
>>>>> I have disabled for now kernel RNG support in the build script for arm,
>>>>> but we need to discuss if we want to have this in future (by having
>>>>> proper kernel and initrd support for it) or if we should disable it in
>>>>> general for arm.
>>>>
>>>> Not all ARMv7 workers have support hardware available for a random
>>>> number generator. Most do, so disabling it globally is not a good
>>>> idea.
>>>>
>>>> I'm not sure what the problem was, but now I had no chance to debug -
>>>> isn't this already solved by the autodetection that Andreas submitted?
>>>
>>> The problem is that we can't detect from outside if the kernel which is 
>>> loading
>>> will complain about the extra parameter or not. And complain means here 
>>> stopping
>>> the build.
>>>
>>> The commits from the mentioned pull request are merged and active,
>>> but they only affect the qemu-kvm behaviour, not the kernel behaviour.
>>>
>>> All what we we can do is checking on the host if the hardware is able
>>> to provide hardware rng and then just guessing if the guest kernel
>>> will support it IMHO.
>>>
>>> Some something like
>>>
>>>  dd if=/dev/hwrng of=/dev/null bs=1 count=1 || kvm_rng_device=
>>>
>>> this which is disabling rng options when no device is there in the
>>> host. Do you know a better way to check for hwrng which avoids 
>>> such a potential hanging read? I do not have any arm 32bit with hwrng
>>> device around, it seems.
>>
>> okay, the second commit tries to do this already ... checking why it breaks 
>> ...
>> (sorry, first mail before coffee)
> 
> [   14s] linux64 /usr/bin/qemu-system-arm -nodefaults -no-reboot -nographic 
> -vga none -enable-kvm -M virt -cpu host -object 
> rng-random,filename=/dev/random,id=rng0 -device virtio-rng-pci,rng=rng0 
> -mem-prealloc -mem-path /dev/hugepages -net none -kernel /boot/zImage.guest 
> -initrd /boot/initrd -append root=/dev/disk/by-id/virtio-0 rootfstype=ext4 
> rootflags=noatime panic=1 quiet no-kvmclock nmi_watchdog=0 rw 
> rd.driver.pre=binfmt_misc elevator=noop console=ttyAMA0 init=/.build/build -m 
> 1020 -drive 
> file=/var/cache/obs/worker/root_1/root,format=raw,if=none,id=disk,serial=0,cache=unsafe
>  -device virtio-blk-device,drive=disk -drive 
> file=/var/cache/obs/worker/root_1.swap,format=raw,if=none,id=swap,serial=1,cache=unsafe
>  -device virtio-blk-device,drive=swap -serial stdio -smp 1
> [   14s] qemu-system-arm: -device virtio-rng-pci,rng=rng0: No 'PCI' bus found 
> for device 'virtio-rng-pci'
> 
> So, virtio rng device seems not to work with non-hardware rng generator.

The error says that there is no bus we can plug virtio-rng-pci into.
Which is true, we don't have a PCI bus by default on ARM virtual
machines ;).

You can either use virtio-rng-device (which then plugs into virtio-mmio)
or spawn a PCI bus using -device gpex-pcihost.


Alex
-- 
To unsubscribe, e-mail: opensuse-arm+unsubscr...@opensuse.org
To contact the owner, e-mail: opensuse-arm+ow...@opensuse.org

Reply via email to