From 6abe4c42602f8372c7ae99cfd58a44d39d2ec45a Mon Sep 17 00:00:00 2001 From: Laurent Vivier Date: Thu, 25 Jun 2015 13:44:37 +0200 Subject: [PATCH 098/217] spapr_pci: add dynamic-reconfiguration option for spapr-pci-host-bridge Message-id: <1435239881-28541-11-git-send-email-lvivier@redhat.com> Patchwork-id: 66492 O-Subject: [RHEL7.2 qemu-kvm-rhev PATCH 10/14] spapr_pci: add dynamic-reconfiguration option for spapr-pci-host-bridge Bugzilla: 1172478 RH-Acked-by: Michael S. Tsirkin RH-Acked-by: Thomas Huth RH-Acked-by: David Gibson From: Michael Roth This option enables/disables PCI hotplug for a particular PHB. Also add machine compatibility code to disable it by default for machine types prior to pseries-2.4. Signed-off-by: Michael Roth Reviewed-by: David Gibson Signed-off-by: David Gibson [agraf: move commas for compat fields] Signed-off-by: Alexander Graf (cherry picked from commit 7619c7b00c90a39243f1229facde8c53a8fba921) Signed-off-by: Miroslav Rezanina Conflicts: hw/ppc/spapr.c conflict with missing SPAPR_COMPAT_2_3 definition, useless as we use pseries-rhel7.2.0 machine and no other one is defined. 38ff32c spapr: define SPAPR_COMPAT_2_3 Signed-off-by: Laurent Vivier --- hw/ppc/spapr_pci.c | 2 ++ include/hw/pci-host/spapr.h | 1 + 2 files changed, 3 insertions(+) diff --git a/hw/ppc/spapr_pci.c b/hw/ppc/spapr_pci.c index 05f4fac..8b76017 100644 --- a/hw/ppc/spapr_pci.c +++ b/hw/ppc/spapr_pci.c @@ -936,6 +936,8 @@ static Property spapr_phb_properties[] = { DEFINE_PROP_UINT64("io_win_addr", sPAPRPHBState, io_win_addr, -1), DEFINE_PROP_UINT64("io_win_size", sPAPRPHBState, io_win_size, SPAPR_PCI_IO_WIN_SIZE), + DEFINE_PROP_BOOL("dynamic-reconfiguration", sPAPRPHBState, dr_enabled, + true), DEFINE_PROP_END_OF_LIST(), }; diff --git a/include/hw/pci-host/spapr.h b/include/hw/pci-host/spapr.h index 895d273..34ee4e0 100644 --- a/include/hw/pci-host/spapr.h +++ b/include/hw/pci-host/spapr.h @@ -71,6 +71,7 @@ struct sPAPRPHBState { uint32_t index; uint64_t buid; char *dtbusname; + bool dr_enabled; MemoryRegion memspace, iospace; hwaddr mem_win_addr, mem_win_size, io_win_addr, io_win_size; -- 1.8.3.1