diff options
author | Greg Kurz | 2017-05-24 19:40:43 +0200 |
---|---|---|
committer | David Gibson | 2017-05-25 03:31:33 +0200 |
commit | 62f94fc94f98095173146e753a1f03d7c2cc7ba3 (patch) | |
tree | c8188b9e7528e169c706b70dfa167caf414c85e1 /hw/intc/xics_kvm.c | |
parent | hw/ppc/spapr.c: recover pending LMB unplug info in spapr_lmb_release (diff) | |
download | qemu-62f94fc94f98095173146e753a1f03d7c2cc7ba3.tar.gz qemu-62f94fc94f98095173146e753a1f03d7c2cc7ba3.tar.xz qemu-62f94fc94f98095173146e753a1f03d7c2cc7ba3.zip |
xics: add unrealize handler
Now that ICPState objects get finalized on CPU unplug, we should unregister
reset handlers as well to avoid a QEMU crash at machine reset time.
Signed-off-by: Greg Kurz <groug@kaod.org>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Diffstat (limited to 'hw/intc/xics_kvm.c')
-rw-r--r-- | hw/intc/xics_kvm.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/hw/intc/xics_kvm.c b/hw/intc/xics_kvm.c index dd7f298462..14b8f6f6e4 100644 --- a/hw/intc/xics_kvm.c +++ b/hw/intc/xics_kvm.c @@ -164,12 +164,18 @@ static void icp_kvm_realize(DeviceState *dev, Error **errp) qemu_register_reset(icp_kvm_reset, dev); } +static void icp_kvm_unrealize(DeviceState *dev, Error **errp) +{ + qemu_unregister_reset(icp_kvm_reset, dev); +} + static void icp_kvm_class_init(ObjectClass *klass, void *data) { DeviceClass *dc = DEVICE_CLASS(klass); ICPStateClass *icpc = ICP_CLASS(klass); dc->realize = icp_kvm_realize; + dc->unrealize = icp_kvm_unrealize; icpc->pre_save = icp_get_kvm_state; icpc->post_load = icp_set_kvm_state; icpc->cpu_setup = icp_kvm_cpu_setup; |