cryptospore / rpms / qemu-kvm

Forked from rpms/qemu-kvm 2 years ago
Clone

Blame SOURCES/kvm-hw-ppc-spapr-Adjust-firmware-name-for-PCI-bridges.patch

76daa3
From 9c591e6f1c691fcd8ed9e7294e8220e1e3b22572 Mon Sep 17 00:00:00 2001
76daa3
From: Thomas Huth <thuth@redhat.com>
76daa3
Date: Mon, 26 Jun 2017 07:48:24 +0200
76daa3
Subject: [PATCH] hw/ppc/spapr: Adjust firmware name for PCI bridges
76daa3
76daa3
RH-Author: Thomas Huth <thuth@redhat.com>
76daa3
Message-id: <1498463304-23230-2-git-send-email-thuth@redhat.com>
76daa3
Patchwork-id: 75682
76daa3
O-Subject: [Pegas-1.0 qemu-kvm PATCH 1/1] hw/ppc/spapr: Adjust firmware name for PCI bridges
76daa3
Bugzilla: 1459170
76daa3
RH-Acked-by: Laurent Vivier <lvivier@redhat.com>
76daa3
RH-Acked-by: David Hildenbrand <david@redhat.com>
76daa3
RH-Acked-by: Laszlo Ersek <lersek@redhat.com>
76daa3
76daa3
SLOF uses "pci" as name for PCI bridges nodes in the device tree instead
76daa3
of "pci-bridges", so booting via bootindex from a device behind a PCI
76daa3
bridge currently does not work since QEMU passes the wrong name in the
76daa3
"qemu,boot-list" property. Fix it by changing the name of the PCI bridge
76daa3
nodes to "pci" instead.
76daa3
76daa3
Buglink: https://bugzilla.redhat.com/show_bug.cgi?id=1459170
76daa3
Signed-off-by: Thomas Huth <thuth@redhat.com>
76daa3
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
76daa3
(cherry picked from commit 4871dd4c3f70f528147f426fe42676b4193cb3b7)
76daa3
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
76daa3
76daa3
Conflicts:
76daa3
	hw/ppc/spapr.c
76daa3
	(contextual conflict due to missing commit c4e13492afad2c49)
76daa3
---
76daa3
 hw/ppc/spapr.c | 6 ++++++
76daa3
 1 file changed, 6 insertions(+)
76daa3
76daa3
diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c
76daa3
index 62e2696..aadb562 100644
76daa3
--- a/hw/ppc/spapr.c
76daa3
+++ b/hw/ppc/spapr.c
76daa3
@@ -2454,6 +2454,12 @@ static char *spapr_get_fw_dev_path(FWPathProvider *p, BusState *bus,
76daa3
         return g_strdup_printf("pci@%"PRIX64, phb->buid);
76daa3
     }
76daa3
 
76daa3
+    if (g_str_equal("pci-bridge", qdev_fw_name(dev))) {
76daa3
+        /* SLOF uses "pci" instead of "pci-bridge" for PCI bridges */
76daa3
+        PCIDevice *pcidev = CAST(PCIDevice, dev, TYPE_PCI_DEVICE);
76daa3
+        return g_strdup_printf("pci@%x", PCI_SLOT(pcidev->devfn));
76daa3
+    }
76daa3
+
76daa3
     return NULL;
76daa3
 }
76daa3
 
76daa3
-- 
76daa3
1.8.3.1
76daa3