From: Pekka Enberg <penberg@kernel.org>
To: Liming Wang <walimisdev@gmail.com>
Cc: Sasha Levin <levinsasha928@gmail.com>,
Ingo Molnar <mingo@elte.hu>,
kvm@vger.kernel.org
Subject: Re: [PATCH 2/2] kvm tools: change option type of RNG from increment to boolean
Date: Wed, 17 Aug 2011 14:44:23 +0300 [thread overview]
Message-ID: <4E4BA997.7050408@kernel.org> (raw)
In-Reply-To: <1313574294-23123-2-git-send-email-walimisdev@gmail.com>
On 8/17/11 12:44 PM, Liming Wang wrote:
> Becasue virtio random generator is a single device, change its option
> type to boolean.
>
> Signed-off-by: Liming Wang<walimisdev@gmail.com>
I suppose the idea here was to support multiple rng devices. Sasha?
> ---
> tools/kvm/builtin-run.c | 7 +++----
> 1 files changed, 3 insertions(+), 4 deletions(-)
>
> diff --git a/tools/kvm/builtin-run.c b/tools/kvm/builtin-run.c
> index 2816774..646ba21 100644
> --- a/tools/kvm/builtin-run.c
> +++ b/tools/kvm/builtin-run.c
> @@ -60,7 +60,7 @@ __thread struct kvm_cpu *current_kvm_cpu;
>
> static u64 ram_size;
> static u8 image_count;
> -static int virtio_rng;
> +static bool virtio_rng;
> static const char *kernel_cmdline;
> static const char *kernel_filename;
> static const char *vmlinux_filename;
> @@ -161,7 +161,7 @@ static const struct option options[] = {
> OPT_BOOLEAN('\0', "balloon",&balloon, "Enable virtio balloon"),
> OPT_BOOLEAN('\0', "vnc",&vnc, "Enable VNC framebuffer"),
> OPT_BOOLEAN('\0', "sdl",&sdl, "Enable SDL framebuffer"),
> - OPT_INCR('\0', "rng",&virtio_rng, "Enable virtio Random Number Generator"),
> + OPT_BOOLEAN('\0', "rng",&virtio_rng, "Enable virtio Random Number Generator"),
> OPT_CALLBACK('\0', "9p", NULL, "dir_to_share,tag_name",
> "Enable virtio 9p to share files between host and guest", virtio_9p_rootdir_parser),
> OPT_STRING('\0', "console",&console, "serial or virtio",
> @@ -641,8 +641,7 @@ int kvm_cmd_run(int argc, const char **argv, const char *prefix)
> virtio_console__init(kvm);
>
> if (virtio_rng)
> - while (virtio_rng--)
> - virtio_rng__init(kvm);
> + virtio_rng__init(kvm);
>
> if (balloon)
> virtio_bln__init(kvm);
next prev parent reply other threads:[~2011-08-17 11:44 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-08-17 9:44 [PATCH 1/2] kvm tools: fix wrong virtio id for balloon Liming Wang
2011-08-17 9:44 ` [PATCH 2/2] kvm tools: change option type of RNG from increment to boolean Liming Wang
2011-08-17 11:44 ` Pekka Enberg [this message]
2011-08-17 12:02 ` Sasha Levin
2011-08-17 15:14 ` walimis
2011-08-17 15:53 ` Sasha Levin
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=4E4BA997.7050408@kernel.org \
--to=penberg@kernel.org \
--cc=kvm@vger.kernel.org \
--cc=levinsasha928@gmail.com \
--cc=mingo@elte.hu \
--cc=walimisdev@gmail.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