Re: [Qemu-devel] Socket reconnection.

2009-12-07 Thread Ian Molton
Jamie Lokier wrote: Ian Molton wrote: Besides, not all entropy comes from /dev/random. Those arguments are weak. No worse than the counterarguments. If nothing else, qemu is a useful tool for testing kernel subsystems and in fact the virtio code triggered and caused to be fixed a number of

Re: [Qemu-devel] Socket reconnection.

2009-12-06 Thread Jamie Lokier
Ian Molton wrote: Jamie Lokier wrote: I'm a bit puzzled. Why isn't virtio-rng getting entropy from /dev/random on the host? /dev/random may not be available. Understood on a non-Linux host. Besides, not all entropy comes from /dev/random. On a Linux host, why isn't rngd simply

Re: [Qemu-devel] Socket reconnection.

2009-12-06 Thread Ian Molton
Jamie Lokier wrote: Ian Molton wrote: Jamie Lokier wrote: I'm a bit puzzled. Why isn't virtio-rng getting entropy from /dev/random on the host? /dev/random may not be available. Understood on a non-Linux host. Or a linux host with a user with insufficient privs... Besides, not all

Re: [Qemu-devel] Socket reconnection.

2009-12-06 Thread Jamie Lokier
Ian Molton wrote: Besides, not all entropy comes from /dev/random. On a Linux host, why isn't rngd simply injecting it's entropy into /dev/random where it would be more convenient to access? (No need for socket reconnection code, for example). Who knows? lack of privs, an admin who

Re: [Qemu-devel] Socket reconnection.

2009-12-03 Thread Ian Molton
Krumme, Chris wrote: Hello Ian, Hello! Qemu_malloc will never return 0, so sched function can return void. Gah! nasty. Check removed. This is a mixture of tabs and spaces, for new code pick one. I've been sticking with spaces generally. I can't find 'CodingStyle' so I copied. I think

Re: [Qemu-devel] Socket reconnection.

2009-12-03 Thread Kevin Wolf
Am 03.12.2009 11:04, schrieb Ian Molton: Krumme, Chris wrote: This is a mixture of tabs and spaces, for new code pick one. I've been sticking with spaces generally. I can't find 'CodingStyle' so I copied. I think spaces suck for this though. What is acceptable? linux kernel style ? Four

Re: [Qemu-devel] Socket reconnection.

2009-12-02 Thread Ian Molton
Anthony Liguori wrote: sleep() in qemu is very, very wrong. It will pause the guest's execution and all sorts of badness can ensue. Quite... The right thing to do is set a timer and not generate data while disconnected. New patch attached, now with less crack... I still am not

Re: [Qemu-devel] Socket reconnection.

2009-12-02 Thread Anthony Liguori
Ian Molton wrote: Anthony Liguori wrote: sleep() in qemu is very, very wrong. It will pause the guest's execution and all sorts of badness can ensue. Quite... The right thing to do is set a timer and not generate data while disconnected. New patch attached, now with less

RE: [Qemu-devel] Socket reconnection.

2009-12-02 Thread Krumme, Chris
, December 02, 2009 4:41 AM To: Anthony Liguori Cc: Krumme, Chris; qemu-devel@nongnu.org Subject: Re: [Qemu-devel] Socket reconnection. Anthony Liguori wrote: sleep() in qemu is very, very wrong. It will pause the guest's execution and all sorts of badness can ensue. Quite... The right

RE: [Qemu-devel] Socket reconnection.

2009-12-01 Thread Krumme, Chris
@nongnu.o rg] On Behalf Of Ian Molton Sent: Tuesday, December 01, 2009 5:54 AM To: Anthony Liguori Cc: qemu-devel@nongnu.org Subject: Re: [Qemu-devel] Socket reconnection. Anthony Liguori wrote: Ian Molton wrote: Hi folks, I need my source of data for virtio-rng to be reliable - IOW

Re: [Qemu-devel] Socket reconnection.

2009-12-01 Thread Ian Molton
Krumme, Chris wrote: Hello Ian, Hi! Should you be introducing a while sleep loop into Qemu here? I would think you should be returning 'no data', maybe after trying once. Indeed. I could have sworn I tried that. Too much crack, will re-do.

Re: [Qemu-devel] Socket reconnection.

2009-12-01 Thread Anthony Liguori
Krumme, Chris wrote: Hello Ian, Since you did not inline your source I will paste in a chunk: @@ -2030,10 +2036,18 @@ static void tcp_chr_read(void *opaque) if (s-listen_fd = 0) { qemu_set_fd_handler(s-listen_fd, tcp_chr_accept, NULL, chr); } -

Re: [Qemu-devel] Socket reconnection.

2009-11-30 Thread Anthony Liguori
Ian Molton wrote: Hi folks, I need my source of data for virtio-rng to be reliable - IOW. if the server dies and comes back up, I want qemu to reconnect and suck down fresh entropy, rather than hand the rngd process on the guest. I'm using the chardev 'socket' type to make the connection to

Re: [Qemu-devel] Socket reconnection.

2009-11-27 Thread Jamie Lokier
Ian Molton wrote: Hi folks, I need my source of data for virtio-rng to be reliable - IOW. if the server dies and comes back up, I want qemu to reconnect and suck down fresh entropy, rather than hand the rngd process on the guest. I'm using the chardev 'socket' type to make the connection

Re: [Qemu-devel] Socket reconnection.

2009-11-26 Thread Gerd Hoffmann
Hi, Would a patch adding (optional) auto-reconnect (with a back-off delay) to the socket chardev be acceptable ? Sounds sensible to me. And, yes, it should be an option (defaulting to off to maintain current behavior when not specified). cheers, Gerd