summary refs log tree commit diff stats
path: root/hw/intc/xics_kvm.c
diff options
context:
space:
mode:
authorGreg Kurz <groug@kaod.org>2019-02-15 12:40:24 +0100
committerDavid Gibson <david@gibson.dropbear.id.au>2019-02-18 10:41:27 +1100
commitf1f5b701b8978f7d783c3582252a3475c762800d (patch)
tree6d0788877290341285898463e0699307469c2bc6 /hw/intc/xics_kvm.c
parentd80b2ccfa741dd689634ce6c2b2a703d7d449319 (diff)
downloadfocaccia-qemu-f1f5b701b8978f7d783c3582252a3475c762800d.tar.gz
focaccia-qemu-f1f5b701b8978f7d783c3582252a3475c762800d.zip
xics: Handle KVM ICS reset from the "simple" ICS code
The KVM ICS reset handler simply writes the ICS state to KVM. This
doesn't need the overkill parent_reset logic we have today. Also
we want to use the same ICS type for the KVM and non-KVM case with
pseries.

Call icp_set_kvm_state() from the "simple" ICS reset function.

Signed-off-by: Greg Kurz <groug@kaod.org>
Message-Id: <155023082407.1011724.1983100830860273401.stgit@bahia.lan>
Reviewed-by: Cédric Le Goater <clg@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.c18
1 files changed, 0 insertions, 18 deletions
diff --git a/hw/intc/xics_kvm.c b/hw/intc/xics_kvm.c
index 642351e579..e7b8d4c29c 100644
--- a/hw/intc/xics_kvm.c
+++ b/hw/intc/xics_kvm.c
@@ -280,20 +280,6 @@ void ics_kvm_set_irq(void *opaque, int srcno, int val)
     }
 }
 
-static void ics_kvm_reset(DeviceState *dev)
-{
-    ICSStateClass *icsc = ICS_BASE_GET_CLASS(dev);
-
-    icsc->parent_reset(dev);
-
-    ics_set_kvm_state(ICS_KVM(dev));
-}
-
-static void ics_kvm_reset_handler(void *dev)
-{
-    ics_kvm_reset(dev);
-}
-
 static void ics_kvm_realize(DeviceState *dev, Error **errp)
 {
     ICSState *ics = ICS_KVM(dev);
@@ -305,8 +291,6 @@ static void ics_kvm_realize(DeviceState *dev, Error **errp)
         error_propagate(errp, local_err);
         return;
     }
-
-    qemu_register_reset(ics_kvm_reset_handler, ics);
 }
 
 static void ics_kvm_class_init(ObjectClass *klass, void *data)
@@ -316,8 +300,6 @@ static void ics_kvm_class_init(ObjectClass *klass, void *data)
 
     device_class_set_parent_realize(dc, ics_kvm_realize,
                                     &icsc->parent_realize);
-    device_class_set_parent_reset(dc, ics_kvm_reset,
-                                  &icsc->parent_reset);
 }
 
 static const TypeInfo ics_kvm_info = {