76daa3
From 8c122a5b79df2e326f429c2f08a667285be52529 Mon Sep 17 00:00:00 2001
76daa3
From: Marcel Apfelbaum <marcel@redhat.com>
76daa3
Date: Wed, 24 May 2017 11:35:59 +0200
76daa3
Subject: [PATCH 4/6] Revert "hw/pci: disable pci-bridge's shpc by default"
76daa3
76daa3
RH-Author: Marcel Apfelbaum <marcel@redhat.com>
76daa3
Message-id: <20170524113559.17638-1-marcel@redhat.com>
76daa3
Patchwork-id: 75407
76daa3
O-Subject: [RHEL-7.4 qemu-kvm-rhev PATCH V2] Revert "hw/pci: disable pci-bridge's shpc by default"
76daa3
Bugzilla: 1434706
76daa3
RH-Acked-by: Eduardo Habkost <ehabkost@redhat.com>
76daa3
RH-Acked-by: Paolo Bonzini <pbonzini@redhat.com>
76daa3
RH-Acked-by: Michael S. Tsirkin <mst@redhat.com>
76daa3
76daa3
Tests: Tested the empty pci bridge gets the IO range resources
76daa3
76daa3
This reverts commit dc0ae767700c156894e36fab89a745a2dc4173de.
76daa3
76daa3
Disabling the shpc controller has an undesired side effect.
76daa3
The PCI bridge remains with no attached devices at boot time,
76daa3
and the guest operating systems do not allocate any resources
76daa3
for it, leaving the bridge unusable. Note that the behaviour
76daa3
is dictated by the pci bridge specification.
76daa3
76daa3
Revert the commit and leave the shpc controller even if is not
76daa3
actually used by any architecture. Slot 0 remains unusable at boot time.
76daa3
76daa3
Keep shpc off for QEMU 2.9 machines.
76daa3
76daa3
Signed-off-by: Marcel Apfelbaum <marcel@redhat.com>
76daa3
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
76daa3
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
76daa3
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
76daa3
(cherry picked from commit 2fa356629ed2ce9c714f11c89c1a074b8bad3fcb)
76daa3
Signed-off-by: Marcel Apfelbaum <marcel@redhat.com>
76daa3
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
76daa3
---
76daa3
 hw/pci-bridge/pci_bridge_dev.c | 2 +-
76daa3
 include/hw/compat.h            | 4 ----
76daa3
 2 files changed, 1 insertion(+), 5 deletions(-)
76daa3
76daa3
diff --git a/hw/pci-bridge/pci_bridge_dev.c b/hw/pci-bridge/pci_bridge_dev.c
76daa3
index 647ad80..5dbd933 100644
76daa3
--- a/hw/pci-bridge/pci_bridge_dev.c
76daa3
+++ b/hw/pci-bridge/pci_bridge_dev.c
76daa3
@@ -163,7 +163,7 @@ static Property pci_bridge_dev_properties[] = {
76daa3
     DEFINE_PROP_ON_OFF_AUTO(PCI_BRIDGE_DEV_PROP_MSI, PCIBridgeDev, msi,
76daa3
                             ON_OFF_AUTO_AUTO),
76daa3
     DEFINE_PROP_BIT(PCI_BRIDGE_DEV_PROP_SHPC, PCIBridgeDev, flags,
76daa3
-                    PCI_BRIDGE_DEV_F_SHPC_REQ, false),
76daa3
+                    PCI_BRIDGE_DEV_F_SHPC_REQ, true),
76daa3
     DEFINE_PROP_END_OF_LIST(),
76daa3
 };
76daa3
 
76daa3
diff --git a/include/hw/compat.h b/include/hw/compat.h
76daa3
index f85c1c2..8366acc 100644
76daa3
--- a/include/hw/compat.h
76daa3
+++ b/include/hw/compat.h
76daa3
@@ -341,10 +341,6 @@
76daa3
         .property = "old-multiple-chip-handling",\
76daa3
         .value    = "on",\
76daa3
     },{ /* HW_COMPAT_RHEL7_3 */ \
76daa3
-        .driver   = "pci-bridge",\
76daa3
-        .property = "shpc",\
76daa3
-        .value    = "on",\
76daa3
-    },{ /* HW_COMPAT_RHEL7_3 */ \
76daa3
         .driver   = TYPE_PCI_DEVICE,\
76daa3
         .property = "x-pcie-extcap-init",\
76daa3
         .value    = "off",\
76daa3
-- 
76daa3
1.8.3.1
76daa3