All of lore.kernel.org
 help / color / mirror / Atom feed
From: Gerd Hoffmann <kraxel@redhat.com>
To: Ian Molton <ian.molton@collabora.co.uk>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] virtio-rng
Date: Mon, 16 Nov 2009 10:45:28 +0100	[thread overview]
Message-ID: <4B011F38.9070500@redhat.com> (raw)
In-Reply-To: <4AFB2D4D.8050208@collabora.co.uk>

   Hi,

> in qdev_init_chardev() the return value is picked based upon the name of
> the device. For now, I've added a third 'if clause' to match for my
> driver and pass through the CharDriverState * fron vl.c for my rng
> driver, however I'd like to solve this properly.

Ignore qdev_init_chardev() ...

> I think a simple name->pointer type matching system would work fine,
> however I'd like to know if anyone else has sorted this yet, or if I
> should be doing things differently altogether.

Use a chardev property (look at serial.c, "isa-serial" device).

Then you'll configure it on the qemu command line like this:

   -chardev $backend,id=some-name-here,more-chardev-parameters
   -device virtio-rng,chardev=some-name-here

HTH,
   Gerd

  parent reply	other threads:[~2009-11-16  9:45 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 [this message]
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

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=4B011F38.9070500@redhat.com \
    --to=kraxel@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.