[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 4/5] virtio: Add virtio-rng driver
From: |
Ian Molton |
Subject: |
Re: [Qemu-devel] [PATCH 4/5] virtio: Add virtio-rng driver |
Date: |
Mon, 01 Feb 2010 22:48:12 +0000 |
User-agent: |
Mozilla-Thunderbird 2.0.0.22 (X11/20091109) |
Anthony Liguori wrote:
>> + DEFINE_RNG_PROPERTIES(VirtIOPCIProxy, rng),
>>
>
> I don't see any reason to use a define here.
Consistency with the other virtio code (at the time I wrote it)
> Coding style is off here (newline between ) and { ).
Fixed.
> Can't call gettimeofday directly. You have to use qemu_gettimeofday().
> But it would be better to not rely on gettimeofday and instead make use
> of the rt_clock.
Hm, this I fixed before, I'll make sure its right in the next patch.
Must have got an old revision mixed up there.
>> +static void virtio_rng_save(QEMUFile *f, void *opaque)
>> +{
>> + VirtIORng *s = opaque;
>> +
>> + virtio_save(&s->vdev, f);
>> +}
>> +
>> +static int virtio_rng_load(QEMUFile *f, void *opaque, int version_id)
>> +{
>> + VirtIORng *s = opaque;
>> +
>> + if (version_id != 1)
>> + return -EINVAL;
>> +
>> + virtio_load(&s->vdev, f);
>> + return 0;
>> +}
>>
>>
>
> This doesn't look correct to me. There is absolutely no state
> maintained by the virtio-rng backend? I find that hard to believe.
What state needs maintaining? when it runs out of entropy, it simply
reconnects. Unless I misunderstood what those functions are for...
-Ian
- [Qemu-devel] [PATCH] resend: socket reconnect and virtio-rng support, Ian Molton, 2010/02/01
- [Qemu-devel] [PATCH 1/5] socket: Rationalise function declarations, Ian Molton, 2010/02/01
- [Qemu-devel] [PATCH 2/5] socket: Add a reconnect option., Ian Molton, 2010/02/01
- [Qemu-devel] [PATCH 3/5] Add SIZE type to qdev properties, Ian Molton, 2010/02/01
- [Qemu-devel] [PATCH 4/5] virtio: Add virtio-rng driver, Ian Molton, 2010/02/01
- [Qemu-devel] [PATCH 5/5] Build fix (missing header), Ian Molton, 2010/02/01
- Re: [Qemu-devel] [PATCH 4/5] virtio: Add virtio-rng driver, Anthony Liguori, 2010/02/01
- Re: [Qemu-devel] [PATCH 4/5] virtio: Add virtio-rng driver, Gerd Hoffmann, 2010/02/01
- Re: [Qemu-devel] [PATCH 4/5] virtio: Add virtio-rng driver, Anthony Liguori, 2010/02/01
- Re: [Qemu-devel] [PATCH 4/5] virtio: Add virtio-rng driver, Ian Molton, 2010/02/01
- Re: [Qemu-devel] [PATCH 4/5] virtio: Add virtio-rng driver,
Ian Molton <=
- Re: [Qemu-devel] [PATCH 4/5] virtio: Add virtio-rng driver, Ian Molton, 2010/02/09
- Re: [Qemu-devel] [PATCH 2/5] socket: Add a reconnect option., Anthony Liguori, 2010/02/01
- Re: [Qemu-devel] [PATCH 2/5] socket: Add a reconnect option., Luiz Capitulino, 2010/02/01
- Re: [Qemu-devel] [PATCH 2/5] socket: Add a reconnect option., Anthony Liguori, 2010/02/01
- Re: [Qemu-devel] [PATCH 2/5] socket: Add a reconnect option., Ian Molton, 2010/02/01
- Re: [Qemu-devel] [PATCH 2/5] socket: Add a reconnect option., Anthony Liguori, 2010/02/01
- Re: [Qemu-devel] [PATCH 2/5] socket: Add a reconnect option., Ian Molton, 2010/02/02