Patchwork virtio-rng-s390: add properties.

login
register
mail settings
Submitter fred.konrad@greensocs.com
Date April 14, 2013, 1:14 p.m.
Message ID <1365945289-14122-1-git-send-email-fred.konrad@greensocs.com>
Download mbox | patch
Permalink /patch/236440/
State New
Headers show

Comments

fred.konrad@greensocs.com - April 14, 2013, 1:14 p.m.
From: KONRAD Frederic <fred.konrad@greensocs.com>

I don't see any reason why these properties are missing.

Cc: Cornelia Huck <cornelia.huck@de.ibm.com>
Cc: Alexander Graf <agraf@suse.de>
Signed-off-by: KONRAD Frederic <fred.konrad@greensocs.com>

Note: Need to apply virtio-rng-refactoring first!
---
 hw/s390x/s390-virtio-bus.c | 8 ++++++++
 1 file changed, 8 insertions(+)
Cornelia Huck - April 15, 2013, 1:13 p.m.
On Sun, 14 Apr 2013 15:14:49 +0200
fred.konrad@greensocs.com wrote:

> From: KONRAD Frederic <fred.konrad@greensocs.com>
> 
> I don't see any reason why these properties are missing.

Acked-by: Cornelia Huck <cornelia.huck@de.ibm.com>

> 
> Cc: Cornelia Huck <cornelia.huck@de.ibm.com>
> Cc: Alexander Graf <agraf@suse.de>
> Signed-off-by: KONRAD Frederic <fred.konrad@greensocs.com>
> 
> Note: Need to apply virtio-rng-refactoring first!

Looks sane here.

> ---
>  hw/s390x/s390-virtio-bus.c | 8 ++++++++
>  1 file changed, 8 insertions(+)
> 
> diff --git a/hw/s390x/s390-virtio-bus.c b/hw/s390x/s390-virtio-bus.c
> index 4d9f2ec..0d915af 100644
> --- a/hw/s390x/s390-virtio-bus.c
> +++ b/hw/s390x/s390-virtio-bus.c
> @@ -514,11 +514,19 @@ static const TypeInfo s390_virtio_serial = {
>      .class_init    = s390_virtio_serial_class_init,
>  };
> 
> +static Property s390_virtio_rng_properties[] = {
> +    DEFINE_VIRTIO_COMMON_FEATURES(VirtIOS390Device, host_features),
> +    DEFINE_VIRTIO_RNG_PROPERTIES(VirtIORNGS390, vdev.conf),
> +    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 = {
Alexander Graf - April 26, 2013, 5:17 p.m.
On 15.04.2013, at 15:13, Cornelia Huck wrote:

> On Sun, 14 Apr 2013 15:14:49 +0200
> fred.konrad@greensocs.com wrote:
> 
>> From: KONRAD Frederic <fred.konrad@greensocs.com>
>> 
>> I don't see any reason why these properties are missing.
> 
> Acked-by: Cornelia Huck <cornelia.huck@de.ibm.com>

Connie, could you please take these?


Thanks,

Alex
Alexander Graf - April 26, 2013, 5:18 p.m.
On 26.04.2013, at 19:17, Alexander Graf wrote:

> 
> On 15.04.2013, at 15:13, Cornelia Huck wrote:
> 
>> On Sun, 14 Apr 2013 15:14:49 +0200
>> fred.konrad@greensocs.com wrote:
>> 
>>> From: KONRAD Frederic <fred.konrad@greensocs.com>
>>> 
>>> I don't see any reason why these properties are missing.
>> 
>> Acked-by: Cornelia Huck <cornelia.huck@de.ibm.com>
> 
> Connie, could you please take these?

Scratch this.

Applied to s390-next. Thank you :)


Alex

Patch

diff --git a/hw/s390x/s390-virtio-bus.c b/hw/s390x/s390-virtio-bus.c
index 4d9f2ec..0d915af 100644
--- a/hw/s390x/s390-virtio-bus.c
+++ b/hw/s390x/s390-virtio-bus.c
@@ -514,11 +514,19 @@  static const TypeInfo s390_virtio_serial = {
     .class_init    = s390_virtio_serial_class_init,
 };
 
+static Property s390_virtio_rng_properties[] = {
+    DEFINE_VIRTIO_COMMON_FEATURES(VirtIOS390Device, host_features),
+    DEFINE_VIRTIO_RNG_PROPERTIES(VirtIORNGS390, vdev.conf),
+    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 = {