[PATCH 1/2] qemu: virtio-crypto: add ccw support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Add device address type ccw which is supported since qemu 2.9.0.

Signed-off-by: Boris Fiuczynski <fiuczy@xxxxxxxxxxxxxxxxxx>
Reviewed-by: Marc Hartmayer <mhartmay@xxxxxxxxxxxxxxxxxx>
---
 src/qemu/qemu_command.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
index 5278edc..65dfc61 100644
--- a/src/qemu/qemu_command.c
+++ b/src/qemu/qemu_command.c
@@ -6051,14 +6051,18 @@ qemuBuildCryptoDevStr(const virDomainDef *def,
         goto error;
     }
 
-    if (dev->info.type != VIR_DOMAIN_DEVICE_ADDRESS_TYPE_PCI) {
+    if (dev->info.type == VIR_DOMAIN_DEVICE_ADDRESS_TYPE_PCI) {
+        virBufferAddLit(&buf, "virtio-crypto-pci");
+    } else if (dev->info.type == VIR_DOMAIN_DEVICE_ADDRESS_TYPE_CCW) {
+        virBufferAddLit(&buf, "virtio-crypto-ccw");
+    } else {
         virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
                        _("unsupported address type %s for virtio crypto device"),
                        virDomainDeviceAddressTypeToString(dev->info.type));
         goto error;
     }
 
-    virBufferAsprintf(&buf, "virtio-crypto-pci,cryptodev=obj%s,id=%s",
+    virBufferAsprintf(&buf, ",cryptodev=obj%s,id=%s",
                       dev->info.alias, dev->info.alias);
 
     if (qemuBuildDeviceAddressStr(&buf, def, &dev->info, qemuCaps) < 0)
-- 
2.7.4

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]
  Powered by Linux