From: Laurent Vivier <lvivier@redhat.com>
To: Markus Armbruster <armbru@redhat.com>
Cc: "Daniel P.Berrangé" <berrange@redhat.com>,
"Michael S. Tsirkin" <mst@redhat.com>,
"Amit Shah" <amit@kernel.org>,
"Richard Henderson" <richard.henderson@linaro.org>,
qemu-devel@nongnu.org,
"Richard W . M . Jones" <rjones@redhat.com>,
"Kashyap Chamarthy" <kchamart@redhat.com>
Subject: Re: [Qemu-devel] [PATCH v3 3/3] virtio-rng: change default backend to rng-builtin
Date: Mon, 13 May 2019 12:26:47 +0200 [thread overview]
Message-ID: <8ddff692-fd71-1902-5a61-d4d6680bed0e@redhat.com> (raw)
In-Reply-To: <871s16jmfr.fsf@dusky.pond.sub.org>
On 10/05/2019 18:36, Markus Armbruster wrote:
> Laurent Vivier <lvivier@redhat.com> writes:
>
>> Signed-off-by: Laurent Vivier <lvivier@redhat.com>
>> ---
>> backends/rng-builtin.c | 8 +++-----
>> hw/virtio/virtio-rng.c | 2 +-
>> include/hw/virtio/virtio-rng.h | 4 ++--
>> include/sysemu/rng-builtin.h | 17 +++++++++++++++++
>> qemu-options.hx | 5 ++---
>> 5 files changed, 25 insertions(+), 11 deletions(-)
>> create mode 100644 include/sysemu/rng-builtin.h
...
>> diff --git a/include/hw/virtio/virtio-rng.h b/include/hw/virtio/virtio-rng.h
>> index 922dce7caccf..f9b6339b19a4 100644
>> --- a/include/hw/virtio/virtio-rng.h
>> +++ b/include/hw/virtio/virtio-rng.h
...
>> #define TYPE_VIRTIO_RNG "virtio-rng-device"
>> @@ -26,7 +26,7 @@ struct VirtIORNGConf {
>> RngBackend *rng;
>> uint64_t max_bytes;
>> uint32_t period_ms;
>> - RngRandom *default_backend;
>> + RngBuiltin *default_backend;
>
> This member appears to be superfluous. As far as I can tell, it's only
> used in the part of virtio-rng.c visible above. If you replace it by a
> local variable there (in a separate patch, perhaps), this patch will
> become simpler. In particular, you won't need to create rng-builtin.h.
>
I don't understand how we can remove the rng-builtin.h as we need its
macros for "RNG_BUILTIN(object_new(TYPE_RNG_BUILTIN))". Could you explain?
Thanks,
Laurent
next prev parent reply other threads:[~2019-05-13 10:28 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-10 13:42 [Qemu-devel] [PATCH v3 0/3] rng-builtin: add an RNG backend that uses qemu_guest_getrandom() Laurent Vivier
2019-05-10 13:42 ` [Qemu-devel] [PATCH v3 1/3] VirtIO-RNG: Update default entropy source to `/dev/urandom` Laurent Vivier
2019-05-10 16:12 ` Michael S. Tsirkin
2019-05-10 16:16 ` Daniel P. Berrangé
2019-05-10 16:21 ` Michael S. Tsirkin
2019-05-10 16:25 ` Daniel P. Berrangé
2019-05-10 16:55 ` Michael S. Tsirkin
2019-05-10 17:11 ` Daniel P. Berrangé
2019-05-10 16:18 ` Markus Armbruster
2019-05-10 13:42 ` [Qemu-devel] [PATCH v3 2/3] rng-builtin: add an RNG backend that uses qemu_guest_getrandom() Laurent Vivier
2019-05-10 13:42 ` [Qemu-devel] [PATCH v3 3/3] virtio-rng: change default backend to rng-builtin Laurent Vivier
2019-05-10 16:36 ` Markus Armbruster
2019-05-13 10:26 ` Laurent Vivier [this message]
2019-05-14 14:39 ` Markus Armbruster
2019-05-12 18:21 ` [Qemu-devel] [PATCH v3 0/3] rng-builtin: add an RNG backend that uses qemu_guest_getrandom() Michael S. Tsirkin
2019-05-13 6:36 ` Laurent Vivier
2019-05-13 8:49 ` Kashyap Chamarthy
2019-05-13 12:13 ` Markus Armbruster
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=8ddff692-fd71-1902-5a61-d4d6680bed0e@redhat.com \
--to=lvivier@redhat.com \
--cc=amit@kernel.org \
--cc=armbru@redhat.com \
--cc=berrange@redhat.com \
--cc=kchamart@redhat.com \
--cc=mst@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=richard.henderson@linaro.org \
--cc=rjones@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).