From patchwork Mon Mar 18 12:49:22 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cornelia Huck X-Patchwork-Id: 228495 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 15E172C009A for ; Mon, 18 Mar 2013 23:50:00 +1100 (EST) Received: from localhost ([::1]:35162 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UHZVl-0007GL-Rp for incoming@patchwork.ozlabs.org; Mon, 18 Mar 2013 08:49:57 -0400 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 d06dlp03.portsmouth.uk.ibm.com (9.149.20.15) by e06smtp12.uk.ibm.com (192.168.101.142) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Mon, 18 Mar 2013 12:46:51 -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 Received: from tuxmaker.boeblingen.de.ibm.com (tuxmaker.boeblingen.de.ibm.com [9.152.85.9]) by d06av12.portsmouth.uk.ibm.com (8.14.4/8.13.1/NCO v10.0 AVin) with ESMTP id r2ICnMlT001840; Mon, 18 Mar 2013 06:49:23 -0600 From: Cornelia Huck To: Alexander Graf Date: Mon, 18 Mar 2013 13:49:22 +0100 Message-Id: <1363610962-32060-2-git-send-email-cornelia.huck@de.ibm.com> X-Mailer: git-send-email 1.7.12.4 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> X-TM-AS-MML: No X-Content-Scanned: Fidelis XPS MAILER x-cbid: 13031812-8372-0000-0000-00000576061A X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic] X-Received-From: 195.75.94.108 Cc: qemu-devel Subject: [Qemu-devel] [PATCH] s390-virtio: Add virtio-rng properties. X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org 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 = {