Commit 2311cca5 authored by Gavin Shan's avatar Gavin Shan Committed by Michael Ellerman

powerpc/eeh: Don't propagate error to guest

When EEH error happened to the parent PE of those PEs that have
been passed through to guest, the error is propagated to guest
domain and the VFIO driver's error handlers are called. It's not
correct as the error in the host domain shouldn't be propagated
to guests and affect them.

This adds one more limitation when calling EEH error handlers.
If the PE has been passed through to guest, the error handlers
won't be called.
Signed-off-by: default avatarGavin Shan <gwshan@linux.vnet.ibm.com>
Reviewed-by: default avatarRussell Currey <ruscur@russell.cc>
Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
parent 67086e32
...@@ -195,7 +195,7 @@ static void *eeh_report_error(void *data, void *userdata) ...@@ -195,7 +195,7 @@ static void *eeh_report_error(void *data, void *userdata)
enum pci_ers_result rc, *res = userdata; enum pci_ers_result rc, *res = userdata;
struct pci_driver *driver; struct pci_driver *driver;
if (!dev || eeh_dev_removed(edev)) if (!dev || eeh_dev_removed(edev) || eeh_pe_passed(edev->pe))
return NULL; return NULL;
dev->error_state = pci_channel_io_frozen; dev->error_state = pci_channel_io_frozen;
...@@ -237,7 +237,7 @@ static void *eeh_report_mmio_enabled(void *data, void *userdata) ...@@ -237,7 +237,7 @@ static void *eeh_report_mmio_enabled(void *data, void *userdata)
enum pci_ers_result rc, *res = userdata; enum pci_ers_result rc, *res = userdata;
struct pci_driver *driver; struct pci_driver *driver;
if (!dev || eeh_dev_removed(edev)) if (!dev || eeh_dev_removed(edev) || eeh_pe_passed(edev->pe))
return NULL; return NULL;
driver = eeh_pcid_get(dev); driver = eeh_pcid_get(dev);
...@@ -277,7 +277,7 @@ static void *eeh_report_reset(void *data, void *userdata) ...@@ -277,7 +277,7 @@ static void *eeh_report_reset(void *data, void *userdata)
enum pci_ers_result rc, *res = userdata; enum pci_ers_result rc, *res = userdata;
struct pci_driver *driver; struct pci_driver *driver;
if (!dev || eeh_dev_removed(edev)) if (!dev || eeh_dev_removed(edev) || eeh_pe_passed(edev->pe))
return NULL; return NULL;
dev->error_state = pci_channel_io_normal; dev->error_state = pci_channel_io_normal;
...@@ -336,7 +336,7 @@ static void *eeh_report_resume(void *data, void *userdata) ...@@ -336,7 +336,7 @@ static void *eeh_report_resume(void *data, void *userdata)
bool was_in_error; bool was_in_error;
struct pci_driver *driver; struct pci_driver *driver;
if (!dev || eeh_dev_removed(edev)) if (!dev || eeh_dev_removed(edev) || eeh_pe_passed(edev->pe))
return NULL; return NULL;
dev->error_state = pci_channel_io_normal; dev->error_state = pci_channel_io_normal;
...@@ -375,7 +375,7 @@ static void *eeh_report_failure(void *data, void *userdata) ...@@ -375,7 +375,7 @@ static void *eeh_report_failure(void *data, void *userdata)
struct pci_dev *dev = eeh_dev_to_pci_dev(edev); struct pci_dev *dev = eeh_dev_to_pci_dev(edev);
struct pci_driver *driver; struct pci_driver *driver;
if (!dev || eeh_dev_removed(edev)) if (!dev || eeh_dev_removed(edev) || eeh_pe_passed(edev->pe))
return NULL; return NULL;
dev->error_state = pci_channel_io_perm_failure; dev->error_state = pci_channel_io_perm_failure;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment