From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:55348) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UHZVI-0007Ec-Ok for qemu-devel@nongnu.org; Mon, 18 Mar 2013 08:49:33 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UHZVH-0001ZK-9J for qemu-devel@nongnu.org; Mon, 18 Mar 2013 08:49:28 -0400 Received: from e06smtp12.uk.ibm.com ([195.75.94.108]:42995) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UHZVG-0001Wq-Vv for qemu-devel@nongnu.org; Mon, 18 Mar 2013 08:49:27 -0400 Received: from /spool/local by e06smtp12.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Mon, 18 Mar 2013 12:46:52 -0000 Received: from b06cxnps3074.portsmouth.uk.ibm.com (d06relay09.portsmouth.uk.ibm.com [9.149.109.194]) by d06dlp03.portsmouth.uk.ibm.com (Postfix) with ESMTP id 6FA071B08061 for ; Mon, 18 Mar 2013 12:49:24 +0000 (GMT) Received: from d06av12.portsmouth.uk.ibm.com (d06av12.portsmouth.uk.ibm.com [9.149.37.247]) by b06cxnps3074.portsmouth.uk.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id r2ICnEPM54395110 for ; Mon, 18 Mar 2013 12:49:15 GMT Received: from d06av12.portsmouth.uk.ibm.com (loopback [127.0.0.1]) by d06av12.portsmouth.uk.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id r2ICnNZ6001849 for ; Mon, 18 Mar 2013 06:49:23 -0600 From: Cornelia Huck Date: Mon, 18 Mar 2013 13:49:22 +0100 Message-Id: <1363610962-32060-2-git-send-email-cornelia.huck@de.ibm.com> In-Reply-To: <1363610962-32060-1-git-send-email-cornelia.huck@de.ibm.com> References: <1363610962-32060-1-git-send-email-cornelia.huck@de.ibm.com> Subject: [Qemu-devel] [PATCH] s390-virtio: Add virtio-rng properties. List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , 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 --- 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