[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-ppc] [PATCH 07/10] xics: Handle KVM ICS reset from the "simple
From: |
Cédric Le Goater |
Subject: |
Re: [Qemu-ppc] [PATCH 07/10] xics: Handle KVM ICS reset from the "simple" ICS code |
Date: |
Fri, 15 Feb 2019 13:57:42 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.4.0 |
On 2/15/19 12:40 PM, Greg Kurz wrote:
> 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.
A part from the kvmppc_ prefix,
Reviewed-by: Cédric Le Goater <address@hidden>
Thanks,
C.
>
> Signed-off-by: Greg Kurz <address@hidden>
> ---
> hw/intc/xics.c | 4 ++++
> hw/intc/xics_kvm.c | 18 ------------------
> 2 files changed, 4 insertions(+), 18 deletions(-)
>
> diff --git a/hw/intc/xics.c b/hw/intc/xics.c
> index ae5d5ea135b8..49401745c410 100644
> --- a/hw/intc/xics.c
> +++ b/hw/intc/xics.c
> @@ -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)
> diff --git a/hw/intc/xics_kvm.c b/hw/intc/xics_kvm.c
> index 642351e5790f..e7b8d4c29ce6 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 = {
>
- Re: [Qemu-ppc] [PATCH 05/10] xics: Drop the KVM ICP class, (continued)
- Re: [Qemu-ppc] [PATCH 05/10] xics: Drop the KVM ICP class, Cédric Le Goater, 2019/02/15
- Re: [Qemu-ppc] [PATCH 05/10] xics: Drop the KVM ICP class, Greg Kurz, 2019/02/15
- Re: [Qemu-ppc] [PATCH 05/10] xics: Drop the KVM ICP class, Cédric Le Goater, 2019/02/15
- Re: [Qemu-ppc] [PATCH 05/10] xics: Drop the KVM ICP class, Greg Kurz, 2019/02/15
- Re: [Qemu-ppc] [PATCH 05/10] xics: Drop the KVM ICP class, David Gibson, 2019/02/17
- Re: [Qemu-ppc] [PATCH 05/10] xics: Drop the KVM ICP class, Cédric Le Goater, 2019/02/18
[Qemu-ppc] [PATCH 06/10] xics: Explicitely call KVM ICS methods from the common code, Greg Kurz, 2019/02/15
[Qemu-ppc] [PATCH 07/10] xics: Handle KVM ICS reset from the "simple" ICS code, Greg Kurz, 2019/02/15
[Qemu-ppc] [PATCH 08/10] xics: Handle KVM interrupt presentation from "simple" ICS code, Greg Kurz, 2019/02/15
[Qemu-ppc] [PATCH 09/10] spapr/irq: Use the "simple" ICS class for KVM, Greg Kurz, 2019/02/15