aboutsummaryrefslogtreecommitdiff
path: root/hw/intc/xics.c
diff options
context:
space:
mode:
Diffstat (limited to 'hw/intc/xics.c')
-rw-r--r--hw/intc/xics.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/hw/intc/xics.c b/hw/intc/xics.c
index 988b53abd1..822d367e63 100644
--- a/hw/intc/xics.c
+++ b/hw/intc/xics.c
@@ -289,7 +289,7 @@ static const VMStateDescription vmstate_icp_server = {
},
};
-static void icp_reset(DeviceState *dev)
+static void icp_reset_handler(void *dev)
{
ICPState *icp = ICP(dev);
@@ -299,13 +299,10 @@ static void icp_reset(DeviceState *dev)
/* Make all outputs are deasserted */
qemu_set_irq(icp->output, 0);
-}
-static void icp_reset_handler(void *dev)
-{
- DeviceClass *dc = DEVICE_GET_CLASS(dev);
-
- dc->reset(dev);
+ if (kvm_irqchip_in_kernel()) {
+ icp_set_kvm_state(ICP(dev));
+ }
}
static void icp_realize(DeviceState *dev, Error **errp)
@@ -370,7 +367,6 @@ static void icp_class_init(ObjectClass *klass, void *data)
dc->realize = icp_realize;
dc->unrealize = icp_unrealize;
- dc->reset = icp_reset;
}
static const TypeInfo icp_info = {