qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Amit Shah <amit.shah@redhat.com>
To: Ian Molton <ian.molton@collabora.co.uk>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] virtio-rng
Date: Tue, 17 Nov 2009 16:55:54 +0530	[thread overview]
Message-ID: <20091117112554.GC11493@amit-x200.redhat.com> (raw)
In-Reply-To: <4B0284A8.5050800@collabora.co.uk>

On (Tue) Nov 17 2009 [11:10:32], Ian Molton wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Amit Shah wrote:
> > (Any reason to take this off-list?)
> 
> None other than hitting reply rather than reply-all. CCing list once
> more :-)
> 
> >> Either way, you still need to specify the properties - they've just
> >> moved into the console driver in your patch by the look of it.
> > 
> > Yeah; there are two ways of setting properties -- from the command line
> > or from code.
> > 
> > What you're doing is something like
> > 
> > -virtiorng,a=foo,b=bar
> 
> Ah, I see why we're at cross purposes here - I thought we'd moved to
> discussing virtio-console. I've already moved to qdev based init for
> virtio-rng - 'fixing' virtio-console was where I learnt about the 'new
> way' (qdev).

I actually meant to talk about virtio-console but had the virtio-rng
example ready in mind. I thought you did the same thing for console too?
Sorry I've not really looked at the patch in detail so you can disregard
that comment.

> >> I'd prefer to do the same for virtio-rng,
> 
> Here I refer to you having (and I didnt apply the patch so I may have
> misread) dropped the virtio-pci proxy from virtio-console. Once I've got
> a tree I can apply your patch to I'll take another look :-)

It slightly works differently now: virtio is supposed to be
pci-agnostic. So what now happens is:

virtio-console hooks on to the virtio-serial-bus via -device virtconsole
virtio-serial-bus hooks on to the virtio-pci-proxy via -device
virtio-serial-pci

> >> Yes, I saw that. Would it not be better to generate the device / chardev
> >> pair dynamically though, rather than preserve the icky old array?
> > 
> > I don't understand what you mean by 'dynamically'.
> 
> Rather than have that array virtcon_hds at all, create the pairs of host
> side data and qdev properties during parsing the commandline - no need
> to store them up and iterate through the later, or to set an arbitrary
> limit on how many can be specified in that way.

qdev won't understand the old-style commandline syntax; so once
-virtioconsole is encounters, all parsing of the arguments for that
param are to be done by the code that handles -virtioconsole. The array
is maintained because multiple virtio-consoles could be spawned, upto a
max. of MAX_VIRTIO_CONSOLES. But, as it stands, MAX_VIRTIO_CONSOLES is 1
and so the array can be dropped, but a local var. would still be needed
to fetch the chardev and then init it properly using qemu_opt.

> Might be an idea for qemu to warn people that this syntax will be
> deprecated, too...

Yes, that should be done (maybe for 1-2 releases).

		Amit

      reply	other threads:[~2009-11-17 11:26 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-11 21:31 [Qemu-devel] virtio-rng Ian Molton
2009-11-11 22:57 ` Paul Brook
2009-11-16  9:45 ` Gerd Hoffmann
2009-11-16 12:28   ` Ian Molton
2009-11-16 13:10     ` Gerd Hoffmann
2009-11-16 17:58       ` Ian Molton
2009-11-16 22:51         ` Jamie Lokier
2009-11-16 23:16           ` Ian Molton
2009-11-16 23:35             ` Jamie Lokier
2009-11-17  9:18               ` Ian Molton
2009-11-17  9:24         ` Amit Shah
     [not found]           ` <4B02705A.5060400@collabora.co.uk>
     [not found]             ` <20091117095456.GA11125@amit-x200.redhat.com>
     [not found]               ` <4B0278B0.1080505@collabora.co.uk>
     [not found]                 ` <20091117102837.GA11493@amit-x200.redhat.com>
2009-11-17 11:10                   ` Ian Molton
2009-11-17 11:25                     ` Amit Shah [this message]

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=20091117112554.GC11493@amit-x200.redhat.com \
    --to=amit.shah@redhat.com \
    --cc=ian.molton@collabora.co.uk \
    --cc=qemu-devel@nongnu.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;
as well as URLs for NNTP newsgroup(s).