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>
This commit is contained in:
Greg Kurz 2019-02-15 12:40:24 +01:00 committed by David Gibson
parent d80b2ccfa7
commit f1f5b701b8
2 changed files with 4 additions and 18 deletions

View file

@ -553,6 +553,10 @@ static void ics_simple_reset(DeviceState *dev)
ICSStateClass *icsc = ICS_BASE_GET_CLASS(dev);
icsc->parent_reset(dev);
if (kvm_irqchip_in_kernel()) {
ics_set_kvm_state(ICS_BASE(dev));
}
}
static void ics_simple_reset_handler(void *dev)