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

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, a

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... >> B

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

Re: [Qemu-devel] Socket reconnection.

2009-12-03 Thread Anthony Liguori
Ian Molton wrote: Fresh patch attached. Anthony, if this is ok, I can rebase this and its prerequisite. From 05581c5badd693b7537fe57f85a2ff5ddcb7972d Mon Sep 17 00:00:00 2001 From: Ian Molton Date: Tue, 1 Dec 2009 11:18:41 + Subject: [PATCH 2/4] socket: Add a reconnect option. Add

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 ? F

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 spa

RE: [Qemu-devel] Socket reconnection.

2009-12-02 Thread Krumme, Chris
lto:ian.mol...@collabora.co.uk] > Sent: Wednesday, 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

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 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 conf

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); } -qemu_set

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 Krumme, Chris
umme=windriver@nongnu.org > [mailto:qemu-devel-bounces+chris.krumme=windriver@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

Re: [Qemu-devel] Socket reconnection.

2009-12-01 Thread Ian Molton
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. Besides, not all entropy comes from /dev/random. -Ian

Re: [Qemu-devel] Socket reconnection.

2009-12-01 Thread Ian Molton
Anthony Liguori wrote: > 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 '

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 the

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 conne

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