1b87cf
From f0d0a6a9701522eee013682eb0ef566ef7cdac61 Mon Sep 17 00:00:00 2001
1b87cf
Message-Id: <f0d0a6a9701522eee013682eb0ef566ef7cdac61@dist-git>
edecca
From: =?UTF-8?q?J=C3=A1n=20Tomko?= <jtomko@redhat.com>
edecca
Date: Mon, 22 Feb 2016 12:51:51 +0100
edecca
Subject: [PATCH] RHEL: Add rhel machine types to qemuDomainMachineNeedsFDC
edecca
edecca
RHEL-only.
edecca
edecca
pc-q35-rhel7.0.0 and pc-q35-rhel7.1.0 do not need an explicit
edecca
isa-fdc controller.
edecca
edecca
https://bugzilla.redhat.com/show_bug.cgi?id=1227880
edecca
edecca
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
edecca
---
1b87cf
 src/qemu/qemu_domain.c | 15 +++++++++++++--
1b87cf
 1 file changed, 13 insertions(+), 2 deletions(-)
edecca
edecca
diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c
1b87cf
index a8401bac30..40fe9985e6 100644
edecca
--- a/src/qemu/qemu_domain.c
edecca
+++ b/src/qemu/qemu_domain.c
1b87cf
@@ -8767,8 +8767,19 @@ qemuDomainHasBuiltinIDE(const virDomainDef *def)
1b87cf
 bool
1b87cf
 qemuDomainNeedsFDC(const virDomainDef *def)
1b87cf
 {
1b87cf
-    /* all supported Q35 machines need explicit FDC */
1b87cf
-    return qemuDomainIsQ35(def);
1b87cf
+    const char *p;
1b87cf
+
1b87cf
+    /* all supported Q35 machines need explicit FDC except for old RHEL-7
1b87cf
+     * machine types */
1b87cf
+    if (!qemuDomainIsQ35(def))
a41c76
+        return false;
a41c76
+
1b87cf
+    if ((p = STRSKIP(def->os.machine, "pc-q35-")) &&
1b87cf
+        (STRPREFIX(p, "rhel7.0.0") ||
1b87cf
+         STRPREFIX(p, "rhel7.1.0")))
1b87cf
+        return false;
1b87cf
+
1b87cf
+    return true;
a41c76
 }
a41c76
 
1b87cf
 
edecca
-- 
1b87cf
2.34.1
edecca