qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] s390-virtio property aligning.
@ 2013-03-18 12:49 Cornelia Huck
  2013-03-18 12:49 ` [Qemu-devel] [PATCH] s390-virtio: Add virtio-rng properties Cornelia Huck
  0 siblings, 1 reply; 2+ messages in thread
From: Cornelia Huck @ 2013-03-18 12:49 UTC (permalink / raw)
  To: Alexander Graf; +Cc: qemu-devel

Hi Alex,

one more instance where a virtio driver on s390 missed properties
present on other transports. Please consider applying.

Cornelia Huck (1):
  s390-virtio: Add virtio-rng properties.

 hw/s390x/s390-virtio-bus.c | 9 +++++++++
 1 file changed, 9 insertions(+)

-- 
1.7.12.4

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [Qemu-devel] [PATCH] s390-virtio: Add virtio-rng properties.
  2013-03-18 12:49 [Qemu-devel] [PATCH] s390-virtio property aligning Cornelia Huck
@ 2013-03-18 12:49 ` Cornelia Huck
  0 siblings, 0 replies; 2+ messages in thread
From: Cornelia Huck @ 2013-03-18 12:49 UTC (permalink / raw)
  To: Alexander Graf; +Cc: qemu-devel

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

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-03-18 12:49 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-03-18 12:49 [Qemu-devel] [PATCH] s390-virtio property aligning Cornelia Huck
2013-03-18 12:49 ` [Qemu-devel] [PATCH] s390-virtio: Add virtio-rng properties Cornelia Huck

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).