Il 26/10/2012 17:42, Anthony Liguori ha scritto: >> Maybe rdrand, but that's just a chardev---so why isn't this enough: >> >> -chardev file,source=on,path=/dev/hwrng,id=chr0 -device >> virtio-rng-pci,file=chr0 >> -chardev rdrand,id=chr0 -device >> virtio-rng-pci,file=chr0 >> -chardev socket,host=localhost,port=1024,id=chr0 -device >> virtio-rng-pci,rng=chr0,egd=on >> >> (which I suggested in my reply to Amit)? > > I don't like overloading chardev to representate any !block device > backend which is what I fear we're doing here.
Like -chardev msmouse you mean? ;) > EGD is more than just a dumb pipe of data too. It's got a way to query > available entropy. I have a strong suspicion that over time, we'll add > methods to virtio-rng to query available entropy. That would mean > adding a backend specific ioctl to the chardev layer which is pretty > ugly. > > The overhead of creating a separate backend to begin with is extremely > small. We're talking about dozens of lines of code. So I don't see > what the problem is. If you just make rng-random take a chardev, I have no problem with the series. Paolo