[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 17/20] s390x/pci: fix s390_pci_sclp_deconfigure
From: |
Cornelia Huck |
Subject: |
[Qemu-devel] [PULL 17/20] s390x/pci: fix s390_pci_sclp_deconfigure |
Date: |
Tue, 17 May 2016 16:46:14 +0200 |
From: Yi Min Zhao <address@hidden>
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 <address@hidden>
Reviewed-by: Pierre Morel <address@hidden>
Signed-off-by: Cornelia Huck <address@hidden>
---
hw/s390x/s390-pci-bus.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/hw/s390x/s390-pci-bus.c b/hw/s390x/s390-pci-bus.c
index 5d54c73..b2cd31c 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;
}
--
2.8.2
- [Qemu-devel] [PULL 20/20] s390x/pci: remove whitespace, (continued)
- [Qemu-devel] [PULL 20/20] s390x/pci: remove whitespace, Cornelia Huck, 2016/05/17
- [Qemu-devel] [PULL 06/20] s390x/ipl: Add ssid field to IplParameterBlock, Cornelia Huck, 2016/05/17
- [Qemu-devel] [PULL 10/20] hw/char: QOM'ify sclpconsole-lm.c, Cornelia Huck, 2016/05/17
- [Qemu-devel] [PULL 15/20] s390x/pci: export pci_dereg_ioat and pci_dereg_irqs, Cornelia Huck, 2016/05/17
- [Qemu-devel] [PULL 09/20] s390x/ipl: Remove redundant usage of gr7, Cornelia Huck, 2016/05/17
- [Qemu-devel] [PULL 02/20] s390x: enable runtime instrumentation, Cornelia Huck, 2016/05/17
- [Qemu-devel] [PULL 03/20] s390x/ipl: Extend the IplParameterBlock struct, Cornelia Huck, 2016/05/17
- [Qemu-devel] [PULL 17/20] s390x/pci: fix s390_pci_sclp_deconfigure,
Cornelia Huck <=
- [Qemu-devel] [PULL 16/20] s390x/pci: introduce S390PCIBusDevice.iommu_enabled, Cornelia Huck, 2016/05/17
- [Qemu-devel] [PULL 11/20] hw/char: QOM'ify sclpconsole.c, Cornelia Huck, 2016/05/17
- [Qemu-devel] [PULL 08/20] s390-ccw.img: rebuild image, Cornelia Huck, 2016/05/17
- Re: [Qemu-devel] [PULL 00/20] First round of s390x patches for 2.7, Peter Maydell, 2016/05/17