[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 29/30] sPAPR: Reenable EEH functionality on reboot
From: |
Alexander Graf |
Subject: |
[Qemu-devel] [PULL 29/30] sPAPR: Reenable EEH functionality on reboot |
Date: |
Tue, 7 Jul 2015 17:49:41 +0200 |
From: Gavin Shan <address@hidden>
When rebooting the guest, some PEs might be in frozen state. The
contained PCI devices won't work properly if their frozen states
aren't cleared in time. One case running into this situation would
be maximal EEH error times encountered in the guest.
The patch reenables the EEH functinality on PEs on PHB's reset
callback, which will clear their frozen states if needed.
Signed-off-by: Gavin Shan <address@hidden>
Reviewed-by: David Gibson <address@hidden>
Signed-off-by: David Gibson <address@hidden>
Signed-off-by: Alexander Graf <address@hidden>
---
hw/ppc/spapr_pci_vfio.c | 19 ++++++++++++++++++-
1 file changed, 18 insertions(+), 1 deletion(-)
diff --git a/hw/ppc/spapr_pci_vfio.c b/hw/ppc/spapr_pci_vfio.c
index 99a1be5..8104074 100644
--- a/hw/ppc/spapr_pci_vfio.c
+++ b/hw/ppc/spapr_pci_vfio.c
@@ -71,9 +71,26 @@ static void spapr_phb_vfio_finish_realize(sPAPRPHBState
*sphb, Error **errp)
spapr_tce_get_iommu(tcet));
}
+static void spapr_phb_vfio_eeh_reenable(sPAPRPHBVFIOState *svphb)
+{
+ struct vfio_eeh_pe_op op = {
+ .argsz = sizeof(op),
+ .op = VFIO_EEH_PE_ENABLE
+ };
+
+ vfio_container_ioctl(&svphb->phb.iommu_as,
+ svphb->iommugroupid, VFIO_EEH_PE_OP, &op);
+}
+
static void spapr_phb_vfio_reset(DeviceState *qdev)
{
- /* Do nothing */
+ /*
+ * The PE might be in frozen state. To reenable the EEH
+ * functionality on it will clean the frozen state, which
+ * ensures that the contained PCI devices will work properly
+ * after reboot.
+ */
+ spapr_phb_vfio_eeh_reenable(SPAPR_PCI_VFIO_HOST_BRIDGE(qdev));
}
static int spapr_phb_vfio_eeh_set_option(sPAPRPHBState *sphb,
--
1.8.1.4
- [Qemu-devel] [PULL 00/30] ppc patch queue 2015-07-07 for 2.4, Alexander Graf, 2015/07/07
- [Qemu-devel] [PULL 02/30] macio: remove nonexistent interrupt on pin 1, Alexander Graf, 2015/07/07
- [Qemu-devel] [PULL 10/30] spapr_pci: encode missing 64-bit memory address space, Alexander Graf, 2015/07/07
- [Qemu-devel] [PULL 01/30] linux-user, ppc: mftbl can be used by user application, Alexander Graf, 2015/07/07
- [Qemu-devel] [PULL 04/30] spapr: ensure we have at least one XICS server, Alexander Graf, 2015/07/07
- [Qemu-devel] [PULL 09/30] spapr: Add sPAPRMachineClass, Alexander Graf, 2015/07/07
- [Qemu-devel] [PULL 08/30] spapr: Remove obsolete entry_point field from sPAPRMachineState, Alexander Graf, 2015/07/07
- [Qemu-devel] [PULL 03/30] target-ppc: fix hugepage support when using memory-backend-file, Alexander Graf, 2015/07/07
- [Qemu-devel] [PULL 27/30] spapr-vty: Use TYPE_ definition instead of hardcoding, Alexander Graf, 2015/07/07
- [Qemu-devel] [PULL 07/30] spapr: Remove obsolete ram_limit field from sPAPRMachineState, Alexander Graf, 2015/07/07
- [Qemu-devel] [PULL 29/30] sPAPR: Reenable EEH functionality on reboot,
Alexander Graf <=
- [Qemu-devel] [PULL 13/30] spapr_iommu: drop erroneous check in h_put_tce_indirect(), Alexander Graf, 2015/07/07
- [Qemu-devel] [PULL 18/30] cpus: Add a macro to walk CPUs in reverse, Alexander Graf, 2015/07/07
- [Qemu-devel] [PULL 20/30] spapr: Consolidate cpu init code into a routine, Alexander Graf, 2015/07/07
- [Qemu-devel] [PULL 16/30] spapr: Consider max_cpus during xics initialization, Alexander Graf, 2015/07/07
- [Qemu-devel] [PULL 24/30] spapr_pci: populate ibm,loc-code, Alexander Graf, 2015/07/07
- [Qemu-devel] [PULL 30/30] sPAPR: Clear stale MSIx table during EEH reset, Alexander Graf, 2015/07/07
- [Qemu-devel] [PULL 17/30] spapr: Support ibm, lrdr-capacity device tree property, Alexander Graf, 2015/07/07
- [Qemu-devel] [PULL 22/30] xics_kvm: Don't enable KVM_CAP_IRQ_XICS if already enabled, Alexander Graf, 2015/07/07
- [Qemu-devel] [PULL 25/30] spapr_pci: drop redundant args in spapr_[populate, create]_pci_child_dt, Alexander Graf, 2015/07/07
- [Qemu-devel] [PULL 12/30] spapr_pci: set device node unit address as hex, Alexander Graf, 2015/07/07