From: Alexandru Elisei <alexandru.elisei@arm.com>
To: Rajnesh Kanwal <rkanwal@rivosinc.com>
Cc: atishp@rivosinc.com, apatel@ventanamicro.com,
kvm@vger.kernel.org, will@kernel.org,
julien.thierry.kdev@gmail.com, maz@kernel.org,
andre.przywara@arm.com, jean-philippe@linaro.org
Subject: Re: [PATCH kvmtool 1/1] Add virtio-transport option and deprecate force-pci and virtio-legacy.
Date: Fri, 10 Mar 2023 16:04:51 +0000 [thread overview]
Message-ID: <ZAtUBHkyA19IOrjt@monolith.localdoman> (raw)
In-Reply-To: <ZAtG2Jk6VOOyT0xJ@monolith.localdoman>
Hi,
On Fri, Mar 10, 2023 at 03:03:52PM +0000, Alexandru Elisei wrote:
[..]
> On Mon, Mar 06, 2023 at 12:03:29PM +0000, Rajnesh Kanwal wrote:
[..]
> > +int virtio_tranport_parser(const struct option *opt, const char *arg, int unset)
>
> If --virtio-transport is not specified on the kvmtool command line, then
> the default transport is set to VIRTIO_PCI, because that is the first
> member in the virtio_trans enum, and struct kvm is initialized to 0 in
> kvm__new() when it's allocated with calloc.
>
> The above can be obscure for someone who is not familiar with the code. I
> think making the default explicit, by setting kvm->cfg.virtio_transport =
> VIRTIO_PCI in kvm_cmd_run_init(), before the command line arguments are
> parsed, would be clearer.
On second though, struct kvm_config relies on all the fields being set to zero
by kvm__new(), so there's no need to special case virtio_transport.
Thanks,
Alex
next prev parent reply other threads:[~2023-03-10 16:07 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-06 12:03 [PATCH kvmtool 1/1] Add virtio-transport option and deprecate force-pci and virtio-legacy Rajnesh Kanwal
2023-03-10 15:03 ` Alexandru Elisei
2023-03-10 16:04 ` Alexandru Elisei [this message]
2023-03-15 17:25 ` Rajnesh Kanwal
2023-03-17 16:00 ` Alexandru Elisei
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=ZAtUBHkyA19IOrjt@monolith.localdoman \
--to=alexandru.elisei@arm.com \
--cc=andre.przywara@arm.com \
--cc=apatel@ventanamicro.com \
--cc=atishp@rivosinc.com \
--cc=jean-philippe@linaro.org \
--cc=julien.thierry.kdev@gmail.com \
--cc=kvm@vger.kernel.org \
--cc=maz@kernel.org \
--cc=rkanwal@rivosinc.com \
--cc=will@kernel.org \
/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