diff options
author | Yi Min Zhao <zyimin@linux.vnet.ibm.com> | 2016-04-28 13:22:51 +0800 |
---|---|---|
committer | Cornelia Huck <cornelia.huck@de.ibm.com> | 2016-05-17 15:50:29 +0200 |
commit | 259a4f0a7619fef69427555839e0c9db84fd0561 (patch) | |
tree | a78a65529f9438f962af41728d9bb876290ea498 /hw/s390x/s390-pci-bus.c | |
parent | df6a050c82e56fc7a0afeb62cf4bc2e0c4c6d888 (diff) |
s390x/pci: fix s390_pci_sclp_deconfigure
When deconfiguring a s390 pci device, we should deconfigure the
corresponding IOMMU memory region and the IRQs for the device.
Signed-off-by: Yi Min Zhao <zyimin@linux.vnet.ibm.com>
Reviewed-by: Pierre Morel <pmorel@linux.vnet.ibm.com>
Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Diffstat (limited to 'hw/s390x/s390-pci-bus.c')
-rw-r--r-- | hw/s390x/s390-pci-bus.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/hw/s390x/s390-pci-bus.c b/hw/s390x/s390-pci-bus.c index 5d54c73774..b2cd31c15f 100644 --- a/hw/s390x/s390-pci-bus.c +++ b/hw/s390x/s390-pci-bus.c @@ -15,6 +15,7 @@ #include "qemu-common.h" #include "cpu.h" #include "s390-pci-bus.h" +#include "s390-pci-inst.h" #include <hw/pci/pci_bus.h> #include <hw/pci/msi.h> #include <qemu/error-report.h> @@ -137,6 +138,12 @@ void s390_pci_sclp_deconfigure(SCCB *sccb) if (!pbdev->configured) { rc = SCLP_RC_NO_ACTION_REQUIRED; } else { + if (pbdev->summary_ind) { + pci_dereg_irqs(pbdev); + } + if (pbdev->iommu_enabled) { + pci_dereg_ioat(pbdev); + } pbdev->configured = false; rc = SCLP_RC_NORMAL_COMPLETION; } |