提交 259a4f0a 编写于 作者: Y Yi Min Zhao 提交者: Cornelia Huck

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: NYi Min Zhao <zyimin@linux.vnet.ibm.com>
Reviewed-by: NPierre Morel <pmorel@linux.vnet.ibm.com>
Signed-off-by: NCornelia Huck <cornelia.huck@de.ibm.com>
上级 df6a050c
...@@ -15,6 +15,7 @@ ...@@ -15,6 +15,7 @@
#include "qemu-common.h" #include "qemu-common.h"
#include "cpu.h" #include "cpu.h"
#include "s390-pci-bus.h" #include "s390-pci-bus.h"
#include "s390-pci-inst.h"
#include <hw/pci/pci_bus.h> #include <hw/pci/pci_bus.h>
#include <hw/pci/msi.h> #include <hw/pci/msi.h>
#include <qemu/error-report.h> #include <qemu/error-report.h>
...@@ -137,6 +138,12 @@ void s390_pci_sclp_deconfigure(SCCB *sccb) ...@@ -137,6 +138,12 @@ void s390_pci_sclp_deconfigure(SCCB *sccb)
if (!pbdev->configured) { if (!pbdev->configured) {
rc = SCLP_RC_NO_ACTION_REQUIRED; rc = SCLP_RC_NO_ACTION_REQUIRED;
} else { } else {
if (pbdev->summary_ind) {
pci_dereg_irqs(pbdev);
}
if (pbdev->iommu_enabled) {
pci_dereg_ioat(pbdev);
}
pbdev->configured = false; pbdev->configured = false;
rc = SCLP_RC_NORMAL_COMPLETION; rc = SCLP_RC_NORMAL_COMPLETION;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册