yeahuh / rpms / qemu-kvm

Forked from rpms/qemu-kvm 2 years ago
Clone
Blob Blame History Raw
From a522114821c2af434ec14c2f04b2c4df184de8b0 Mon Sep 17 00:00:00 2001
From: Thomas Huth <thuth@redhat.com>
Date: Thu, 23 Mar 2017 16:38:09 +0100
Subject: s390x/virtio-ccw: Disable crypto device in downstream RHEL builds

RH-Author: Thomas Huth <thuth@redhat.com>
Message-id: <1490287090-14987-2-git-send-email-thuth@redhat.com>
Patchwork-id: 74492
O-Subject: [RHEL-7.4 qemu-kvm-rhev PATCH v2 1/2] s390x/virtio-ccw: Disable crypto device in downstream RHEL builds
Bugzilla: 1434717
RH-Acked-by: Laurent Vivier <lvivier@redhat.com>
RH-Acked-by: David Hildenbrand <david@redhat.com>
RH-Acked-by: Dr. David Alan Gilbert <dgilbert@redhat.com>

The generic virtio-crypto device code is disabled in downstream RHEL,
so we've got to disable the virtio-ccw-crypto device, too.

Signed-off-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
(cherry picked from commit 2a4096aface8cf09d8643e0d180bf1be809d47e1)
---
 hw/s390x/virtio-ccw.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/hw/s390x/virtio-ccw.c b/hw/s390x/virtio-ccw.c
index 00b3bde..bceaecf 100644
--- a/hw/s390x/virtio-ccw.c
+++ b/hw/s390x/virtio-ccw.c
@@ -901,6 +901,8 @@ static void virtio_ccw_rng_realize(VirtioCcwDevice *ccw_dev, Error **errp)
                              NULL);
 }
 
+#if 0  /* Disabled in Red Hat Enterprise Linux */
+
 static void virtio_ccw_crypto_realize(VirtioCcwDevice *ccw_dev, Error **errp)
 {
     VirtIOCryptoCcw *dev = VIRTIO_CRYPTO_CCW(ccw_dev);
@@ -919,6 +921,8 @@ static void virtio_ccw_crypto_realize(VirtioCcwDevice *ccw_dev, Error **errp)
                              NULL);
 }
 
+#endif
+
 /* DeviceState to VirtioCcwDevice. Note: used on datapath,
  * be careful and test performance if you change this.
  */
@@ -1566,6 +1570,8 @@ static const TypeInfo virtio_ccw_rng = {
     .class_init    = virtio_ccw_rng_class_init,
 };
 
+#if 0  /* Disabled in Red Hat Enterprise Linux */
+
 static Property virtio_ccw_crypto_properties[] = {
     DEFINE_PROP_CSS_DEV_ID("devno", VirtioCcwDevice, parent_obj.bus_id),
     DEFINE_PROP_BIT("ioeventfd", VirtioCcwDevice, flags,
@@ -1608,6 +1614,8 @@ static const TypeInfo virtio_ccw_crypto = {
     .class_init    = virtio_ccw_crypto_class_init,
 };
 
+#endif
+
 static void virtio_ccw_busdev_realize(DeviceState *dev, Error **errp)
 {
     VirtioCcwDevice *_dev = (VirtioCcwDevice *)dev;
@@ -1810,7 +1818,9 @@ static void virtio_ccw_register(void)
 #ifdef CONFIG_VHOST_VSOCK
     type_register_static(&vhost_vsock_ccw_info);
 #endif
+#if 0  /* Disabled in Red Hat Enterprise Linux */
     type_register_static(&virtio_ccw_crypto);
+#endif
 }
 
 type_init(virtio_ccw_register)
-- 
1.8.3.1