Blame SOURCES/libvirt-qemu-report-IDE-bus-in-domain-capabilities-only-if-it-s-supported.patch

3e5111
From 09f3f5a0fa779a4a151f1aeba1ec82d935beb248 Mon Sep 17 00:00:00 2001
3e5111
Message-Id: <09f3f5a0fa779a4a151f1aeba1ec82d935beb248@dist-git>
3e5111
From: Pavel Hrdina <phrdina@redhat.com>
3e5111
Date: Wed, 19 Apr 2017 09:51:15 +0200
3e5111
Subject: [PATCH] qemu: report IDE bus in domain capabilities only if it's
3e5111
 supported
3e5111
3e5111
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1441964
3e5111
3e5111
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
3e5111
(cherry picked from commit 8ddd44806b62cec11072a5cccd4b1ab0da315425)
3e5111
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
3e5111
---
3e5111
 src/qemu/qemu_capabilities.c                                 | 4 +++-
3e5111
 tests/domaincapsschemadata/qemu_2.6.0-gicv2-virt.aarch64.xml | 1 -
3e5111
 tests/domaincapsschemadata/qemu_2.6.0-gicv3-virt.aarch64.xml | 1 -
3e5111
 tests/domaincapsschemadata/qemu_2.6.0.aarch64.xml            | 1 -
3e5111
 tests/domaincapsschemadata/qemu_2.6.0.ppc64le.xml            | 1 -
3e5111
 tests/domaincapsschemadata/qemu_2.7.0.s390x.xml              | 1 -
3e5111
 tests/domaincapsschemadata/qemu_2.8.0.s390x.xml              | 1 -
3e5111
 7 files changed, 3 insertions(+), 7 deletions(-)
3e5111
3e5111
diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c
3e5111
index b7c2c3705..950a42bae 100644
3e5111
--- a/src/qemu/qemu_capabilities.c
3e5111
+++ b/src/qemu/qemu_capabilities.c
3e5111
@@ -5512,8 +5512,10 @@ virQEMUCapsFillDomainDeviceDiskCaps(virQEMUCapsPtr qemuCaps,
3e5111
         (STRNEQ(machine, "pseries") && !STRPREFIX(machine, "pseries-")))
3e5111
         VIR_DOMAIN_CAPS_ENUM_SET(disk->diskDevice, VIR_DOMAIN_DISK_DEVICE_FLOPPY);
3e5111
 
3e5111
+    if (qemuDomainMachineHasBuiltinIDE(machine))
3e5111
+        VIR_DOMAIN_CAPS_ENUM_SET(disk->bus, VIR_DOMAIN_DISK_BUS_IDE);
3e5111
+
3e5111
     VIR_DOMAIN_CAPS_ENUM_SET(disk->bus,
3e5111
-                             VIR_DOMAIN_DISK_BUS_IDE,
3e5111
                              VIR_DOMAIN_DISK_BUS_SCSI,
3e5111
                              VIR_DOMAIN_DISK_BUS_VIRTIO,
3e5111
                              /* VIR_DOMAIN_DISK_BUS_SD */);
3e5111
diff --git a/tests/domaincapsschemadata/qemu_2.6.0-gicv2-virt.aarch64.xml b/tests/domaincapsschemadata/qemu_2.6.0-gicv2-virt.aarch64.xml
3e5111
index 1fa7f6dff..54b89dc72 100644
3e5111
--- a/tests/domaincapsschemadata/qemu_2.6.0-gicv2-virt.aarch64.xml
3e5111
+++ b/tests/domaincapsschemadata/qemu_2.6.0-gicv2-virt.aarch64.xml
3e5111
@@ -63,7 +63,6 @@
3e5111
         <value>lun</value>
3e5111
       </enum>
3e5111
       <enum name='bus'>
3e5111
-        <value>ide</value>
3e5111
         <value>fdc</value>
3e5111
         <value>scsi</value>
3e5111
         <value>virtio</value>
3e5111
diff --git a/tests/domaincapsschemadata/qemu_2.6.0-gicv3-virt.aarch64.xml b/tests/domaincapsschemadata/qemu_2.6.0-gicv3-virt.aarch64.xml
3e5111
index d60fc1df9..60bf2f54f 100644
3e5111
--- a/tests/domaincapsschemadata/qemu_2.6.0-gicv3-virt.aarch64.xml
3e5111
+++ b/tests/domaincapsschemadata/qemu_2.6.0-gicv3-virt.aarch64.xml
3e5111
@@ -63,7 +63,6 @@
3e5111
         <value>lun</value>
3e5111
       </enum>
3e5111
       <enum name='bus'>
3e5111
-        <value>ide</value>
3e5111
         <value>fdc</value>
3e5111
         <value>scsi</value>
3e5111
         <value>virtio</value>
3e5111
diff --git a/tests/domaincapsschemadata/qemu_2.6.0.aarch64.xml b/tests/domaincapsschemadata/qemu_2.6.0.aarch64.xml
3e5111
index fcc6f50e0..1a980927c 100644
3e5111
--- a/tests/domaincapsschemadata/qemu_2.6.0.aarch64.xml
3e5111
+++ b/tests/domaincapsschemadata/qemu_2.6.0.aarch64.xml
3e5111
@@ -63,7 +63,6 @@
3e5111
         <value>lun</value>
3e5111
       </enum>
3e5111
       <enum name='bus'>
3e5111
-        <value>ide</value>
3e5111
         <value>fdc</value>
3e5111
         <value>scsi</value>
3e5111
         <value>virtio</value>
3e5111
diff --git a/tests/domaincapsschemadata/qemu_2.6.0.ppc64le.xml b/tests/domaincapsschemadata/qemu_2.6.0.ppc64le.xml
3e5111
index 755c4f447..4ecf8651b 100644
3e5111
--- a/tests/domaincapsschemadata/qemu_2.6.0.ppc64le.xml
3e5111
+++ b/tests/domaincapsschemadata/qemu_2.6.0.ppc64le.xml
3e5111
@@ -37,7 +37,6 @@
3e5111
         <value>lun</value>
3e5111
       </enum>
3e5111
       <enum name='bus'>
3e5111
-        <value>ide</value>
3e5111
         <value>scsi</value>
3e5111
         <value>virtio</value>
3e5111
         <value>usb</value>
3e5111
diff --git a/tests/domaincapsschemadata/qemu_2.7.0.s390x.xml b/tests/domaincapsschemadata/qemu_2.7.0.s390x.xml
3e5111
index 999e2795d..dc6d2d8f0 100644
3e5111
--- a/tests/domaincapsschemadata/qemu_2.7.0.s390x.xml
3e5111
+++ b/tests/domaincapsschemadata/qemu_2.7.0.s390x.xml
3e5111
@@ -32,7 +32,6 @@
3e5111
         <value>lun</value>
3e5111
       </enum>
3e5111
       <enum name='bus'>
3e5111
-        <value>ide</value>
3e5111
         <value>fdc</value>
3e5111
         <value>scsi</value>
3e5111
         <value>virtio</value>
3e5111
diff --git a/tests/domaincapsschemadata/qemu_2.8.0.s390x.xml b/tests/domaincapsschemadata/qemu_2.8.0.s390x.xml
3e5111
index 0b8135bc5..53c3190f2 100644
3e5111
--- a/tests/domaincapsschemadata/qemu_2.8.0.s390x.xml
3e5111
+++ b/tests/domaincapsschemadata/qemu_2.8.0.s390x.xml
3e5111
@@ -113,7 +113,6 @@
3e5111
         <value>lun</value>
3e5111
       </enum>
3e5111
       <enum name='bus'>
3e5111
-        <value>ide</value>
3e5111
         <value>fdc</value>
3e5111
         <value>scsi</value>
3e5111
         <value>virtio</value>
3e5111
-- 
3e5111
2.12.2
3e5111