From: Cornelia Huck <cornelia.huck@de.ibm.com>
To: Alexander Graf <agraf@suse.de>
Cc: qemu-devel <qemu-devel@nongnu.org>
Subject: [Qemu-devel] [PATCH] s390-virtio: Add virtio-rng properties.
Date: Mon, 18 Mar 2013 13:49:22 +0100 [thread overview]
Message-ID: <1363610962-32060-2-git-send-email-cornelia.huck@de.ibm.com> (raw)
In-Reply-To: <1363610962-32060-1-git-send-email-cornelia.huck@de.ibm.com>
Add the same 'max-bytes' and 'period' properties that are supported
for virtio-pci and virtio-ccw to make things consistent.
Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
---
hw/s390x/s390-virtio-bus.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/hw/s390x/s390-virtio-bus.c b/hw/s390x/s390-virtio-bus.c
index d9b7f83..ca2b590 100644
--- a/hw/s390x/s390-virtio-bus.c
+++ b/hw/s390x/s390-virtio-bus.c
@@ -483,11 +483,20 @@ static void s390_virtio_rng_initfn(Object *obj)
(Object **)&dev->rng.rng, NULL);
}
+static Property s390_virtio_rng_properties[] = {
+ DEFINE_VIRTIO_COMMON_FEATURES(VirtIOS390Device, host_features),
+ DEFINE_PROP_UINT64("max-bytes", VirtIOS390Device, rng.max_bytes, INT64_MAX),
+ DEFINE_PROP_UINT32("period", VirtIOS390Device, rng.period_ms, 1 << 16),
+ DEFINE_PROP_END_OF_LIST(),
+};
+
static void s390_virtio_rng_class_init(ObjectClass *klass, void *data)
{
+ DeviceClass *dc = DEVICE_CLASS(klass);
VirtIOS390DeviceClass *k = VIRTIO_S390_DEVICE_CLASS(klass);
k->init = s390_virtio_rng_init;
+ dc->props = s390_virtio_rng_properties;
}
static const TypeInfo s390_virtio_rng = {
--
1.7.12.4
prev parent reply other threads:[~2013-03-18 12:49 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-18 12:49 [Qemu-devel] [PATCH] s390-virtio property aligning Cornelia Huck
2013-03-18 12:49 ` Cornelia Huck [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=1363610962-32060-2-git-send-email-cornelia.huck@de.ibm.com \
--to=cornelia.huck@de.ibm.com \
--cc=agraf@suse.de \
--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).