aboutsummaryrefslogtreecommitdiff
path: root/hw/ppc
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2021-08-27 09:57:28 +0100
committerPeter Maydell <peter.maydell@linaro.org>2021-08-27 09:57:28 +0100
commit0289f62335b2af49f6c30296cc00d009995b35f6 (patch)
tree02681ec7cfe183e7db19e53785acd4dd69e37f00 /hw/ppc
parentf214d8e0150766c31172e16ef4b17674f549d852 (diff)
parentf9dfae9cb6b27649085f662a863f6167650402e0 (diff)
Merge remote-tracking branch 'remotes/armbru/tags/pull-error-2021-08-26' into staging
Error reporting patches for 2021-08-26 # gpg: Signature made Thu 26 Aug 2021 16:17:05 BST # gpg: using RSA key 354BC8B3D7EB2A6B68674E5F3870B400EB918653 # gpg: issuer "armbru@redhat.com" # gpg: Good signature from "Markus Armbruster <armbru@redhat.com>" [full] # gpg: aka "Markus Armbruster <armbru@pond.sub.org>" [full] # Primary key fingerprint: 354B C8B3 D7EB 2A6B 6867 4E5F 3870 B400 EB91 8653 * remotes/armbru/tags/pull-error-2021-08-26: vl: Clean up -smp error handling Remove superfluous ERRP_GUARD() vhost: Clean up how VhostOpts method vhost_backend_init() fails vhost: Clean up how VhostOpts method vhost_get_config() fails microvm: Drop dead error handling in microvm_machine_state_init() migration: Handle migration_incoming_setup() errors consistently migration: Unify failure check for migrate_add_blocker() whpx nvmm: Drop useless migrate_del_blocker() vfio: Avoid error_propagate() after migrate_add_blocker() i386: Never free migration blocker objects instead of sometimes vhost-scsi: Plug memory leak on migrate_add_blocker() failure multi-process: Fix pci_proxy_dev_realize() error handling spapr: Explain purpose of ->fwnmi_migration_blocker more clearly spapr: Plug memory leak when we can't add a migration blocker error: Use error_fatal to simplify obvious fatal errors (again) Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'hw/ppc')
-rw-r--r--hw/ppc/spapr_events.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/hw/ppc/spapr_events.c b/hw/ppc/spapr_events.c
index 23e2e2fff1..630e86282c 100644
--- a/hw/ppc/spapr_events.c
+++ b/hw/ppc/spapr_events.c
@@ -872,7 +872,6 @@ void spapr_mce_req_event(PowerPCCPU *cpu, bool recovered)
SpaprMachineState *spapr = SPAPR_MACHINE(qdev_get_machine());
CPUState *cs = CPU(cpu);
int ret;
- Error *local_err = NULL;
if (spapr->fwnmi_machine_check_addr == -1) {
/* Non-FWNMI case, deliver it like an architected CPU interrupt. */
@@ -912,16 +911,17 @@ void spapr_mce_req_event(PowerPCCPU *cpu, bool recovered)
}
}
- ret = migrate_add_blocker(spapr->fwnmi_migration_blocker, &local_err);
+ /*
+ * Try to block migration while FWNMI is being handled, so the
+ * machine check handler runs where the information passed to it
+ * actually makes sense. This shouldn't actually block migration,
+ * only delay it slightly, assuming migration is retried. If the
+ * attempt to block fails, carry on. Unfortunately, it always
+ * fails when running with -only-migrate. A proper interface to
+ * delay migration completion for a bit could avoid that.
+ */
+ ret = migrate_add_blocker(spapr->fwnmi_migration_blocker, NULL);
if (ret == -EBUSY) {
- /*
- * We don't want to abort so we let the migration to continue.
- * In a rare case, the machine check handler will run on the target.
- * Though this is not preferable, it is better than aborting
- * the migration or killing the VM. It is okay to call
- * migrate_del_blocker on a blocker that was not added (which the
- * nmi-interlock handler would do when it's called after this).
- */
warn_report("Received a fwnmi while migration was in progress");
}