[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-ppc] [PATCH 10/10] xics: Drop the KVM ICS class
From: |
Cédric Le Goater |
Subject: |
Re: [Qemu-ppc] [PATCH 10/10] xics: Drop the KVM ICS class |
Date: |
Fri, 15 Feb 2019 14:02:45 +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 class isn't used anymore. Drop it.
Reviewed-by: Cédric Le Goater <address@hidden>
Thanks,
C.
> Signed-off-by: Greg Kurz <address@hidden>
> ---
> hw/intc/xics_kvm.c | 40 ----------------------------------------
> hw/ppc/spapr_irq.c | 2 +-
> include/hw/ppc/xics.h | 3 ---
> 3 files changed, 1 insertion(+), 44 deletions(-)
>
> diff --git a/hw/intc/xics_kvm.c b/hw/intc/xics_kvm.c
> index f34eacda03e7..a00d0a7962e1 100644
> --- a/hw/intc/xics_kvm.c
> +++ b/hw/intc/xics_kvm.c
> @@ -279,39 +279,6 @@ void ics_kvm_set_irq(ICSState *ics, int srcno, int val)
> }
> }
>
> -static void ics_kvm_realize(DeviceState *dev, Error **errp)
> -{
> - ICSState *ics = ICS_KVM(dev);
> - ICSStateClass *icsc = ICS_BASE_GET_CLASS(ics);
> - Error *local_err = NULL;
> -
> - icsc->parent_realize(dev, &local_err);
> - if (local_err) {
> - error_propagate(errp, local_err);
> - return;
> - }
> -}
> -
> -static void ics_kvm_class_init(ObjectClass *klass, void *data)
> -{
> - ICSStateClass *icsc = ICS_BASE_CLASS(klass);
> - DeviceClass *dc = DEVICE_CLASS(klass);
> -
> - device_class_set_parent_realize(dc, ics_kvm_realize,
> - &icsc->parent_realize);
> -}
> -
> -static const TypeInfo ics_kvm_info = {
> - .name = TYPE_ICS_KVM,
> - .parent = TYPE_ICS_BASE,
> - .instance_size = sizeof(ICSState),
> - .class_init = ics_kvm_class_init,
> -};
> -
> -/*
> - * XICS-KVM
> - */
> -
> static void rtas_dummy(PowerPCCPU *cpu, sPAPRMachineState *spapr,
> uint32_t token,
> uint32_t nargs, target_ulong args,
> @@ -381,10 +348,3 @@ fail:
> kvmppc_define_rtas_kernel_token(0, "ibm,int-off");
> return -1;
> }
> -
> -static void xics_kvm_register_types(void)
> -{
> - type_register_static(&ics_kvm_info);
> -}
> -
> -type_init(xics_kvm_register_types)
> diff --git a/hw/ppc/spapr_irq.c b/hw/ppc/spapr_irq.c
> index 4aa8165307c7..4297eed600f9 100644
> --- a/hw/ppc/spapr_irq.c
> +++ b/hw/ppc/spapr_irq.c
> @@ -208,7 +208,7 @@ static void
> spapr_irq_cpu_intc_create_xics(sPAPRMachineState *spapr,
>
> static int spapr_irq_post_load_xics(sPAPRMachineState *spapr, int version_id)
> {
> - if (!object_dynamic_cast(OBJECT(spapr->ics), TYPE_ICS_KVM)) {
> + if (!kvm_irqchip_in_kernel()) {
> CPUState *cs;
> CPU_FOREACH(cs) {
> PowerPCCPU *cpu = POWERPC_CPU(cs);
> diff --git a/include/hw/ppc/xics.h b/include/hw/ppc/xics.h
> index 61bd0fb9784f..d36bbe11ee2e 100644
> --- a/include/hw/ppc/xics.h
> +++ b/include/hw/ppc/xics.h
> @@ -95,9 +95,6 @@ struct PnvICPState {
> #define TYPE_ICS_SIMPLE "ics"
> #define ICS_SIMPLE(obj) OBJECT_CHECK(ICSState, (obj), TYPE_ICS_SIMPLE)
>
> -#define TYPE_ICS_KVM "icskvm"
> -#define ICS_KVM(obj) OBJECT_CHECK(ICSState, (obj), TYPE_ICS_KVM)
> -
> #define ICS_BASE_CLASS(klass) \
> OBJECT_CLASS_CHECK(ICSStateClass, (klass), TYPE_ICS_BASE)
> #define ICS_BASE_GET_CLASS(obj) \
>