Skip to contentSkip to conversation

virtio-rng-s390: add properties.

PATCH Applied [email protected] 3 participants 4 messages Apr 14, 2013 – Apr 26, 2013

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 virtio-rng-s390: add properties.

From: KONRAD Frederic <[email protected]>

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

Cc Cornelia Huck <[email protected]>
Cc Alexander Graf <[email protected]>

Note: Need to apply virtio-rng-refactoring first!

---
 hw/s390x/s390-virtio-bus.c | 8 ++++++++
 1 file changed, 8 insertions(+)
hw/s390x/s390-virtio-bus.c +8 -0
index 4d9f2ec..0d915af 100644
@@ -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 = {
Signature · 1 line
1.7.11.7
Acked-by on v1 1/1
#1 lore raw
Quoted 3 lines · On Sun, 14 Apr 2013 15:14:49 +0200 [email protected] wrote:

From: KONRAD Frederic <[email protected]>

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

Quoted 6 lines
Cc Cornelia Huck <[email protected]>
Cc Alexander Graf <[email protected]>

Note: Need to apply virtio-rng-refactoring first!

Looks sane here.

Quoted 28 lines
---
 hw/s390x/s390-virtio-bus.c | 8 ++++++++
 1 file changed, 8 insertions(+)
hw/s390x/s390-virtio-bus.c +8 -0
index 4d9f2ec..0d915af 100644
@@ -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 = {