qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] virtio-rng


From: Gerd Hoffmann
Subject: Re: [Qemu-devel] virtio-rng
Date: Mon, 16 Nov 2009 10:45:28 +0100
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.4pre) Gecko/20091014 Fedora/3.0-2.8.b4.fc11 Lightning/1.0pre Thunderbird/3.0b4

  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





reply via email to

[Prev in Thread] Current Thread [Next in Thread]