static void xics_realize(DeviceState *dev, Error **errp)

{

    XICSState *icp = XICS(dev);

    Error *error = NULL;

    int i;



    if (!icp->nr_servers) {

        error_setg(errp, "Number of servers needs to be greater 0");

        return;

    }



    /* Registration of global state belongs into realize */

    spapr_rtas_register("ibm,set-xive", rtas_set_xive);

    spapr_rtas_register("ibm,get-xive", rtas_get_xive);

    spapr_rtas_register("ibm,int-off", rtas_int_off);

    spapr_rtas_register("ibm,int-on", rtas_int_on);



    spapr_register_hypercall(H_CPPR, h_cppr);

    spapr_register_hypercall(H_IPI, h_ipi);

    spapr_register_hypercall(H_XIRR, h_xirr);

    spapr_register_hypercall(H_XIRR_X, h_xirr_x);

    spapr_register_hypercall(H_EOI, h_eoi);

    spapr_register_hypercall(H_IPOLL, h_ipoll);



    object_property_set_bool(OBJECT(icp->ics), true, "realized", &error);

    if (error) {

        error_propagate(errp, error);

        return;

    }



    for (i = 0; i < icp->nr_servers; i++) {

        object_property_set_bool(OBJECT(&icp->ss[i]), true, "realized", &error);

        if (error) {

            error_propagate(errp, error);

            return;

        }

    }

}

static void xics_realize(DeviceState *dev, Error **errp)

{

    XICSState *icp = XICS(dev);

    Error *error = NULL;

    int i;



    if (!icp->nr_servers) {

        error_setg(errp, "Number of servers needs to be greater 0");

        return;

    }



    

    spapr_rtas_register("ibm,set-xive", rtas_set_xive);

    spapr_rtas_register("ibm,get-xive", rtas_get_xive);

    spapr_rtas_register("ibm,int-off", rtas_int_off);

    spapr_rtas_register("ibm,int-on", rtas_int_on);



    spapr_register_hypercall(H_CPPR, h_cppr);

    spapr_register_hypercall(H_IPI, h_ipi);

    spapr_register_hypercall(H_XIRR, h_xirr);

    spapr_register_hypercall(H_XIRR_X, h_xirr_x);

    spapr_register_hypercall(H_EOI, h_eoi);

    spapr_register_hypercall(H_IPOLL, h_ipoll);



    object_property_set_bool(OBJECT(icp->ics), true, "realized", &error);

    if (error) {

        error_propagate(errp, error);

        return;

    }



    for (i = 0; i < icp->nr_servers; i++) {

        object_property_set_bool(OBJECT(&icp->ss[i]), true, "realized", &error);

        if (error) {

            error_propagate(errp, error);

            return;

        }

    }

}

    spapr_rtas_register("ibm,set-xive", rtas_set_xive);     spapr_rtas_register("ibm,get-xive", rtas_get_xive);     spapr_rtas_register("ibm,int-off", rtas_int_off);     spapr_rtas_register("ibm,int-on", rtas_int_on);     int i;
static void FUNC_0(DeviceState *VAR_0, Error **VAR_1)

{

    XICSState *icp = XICS(VAR_0);

    Error *error = NULL;

    int VAR_2;



    if (!icp->nr_servers) {

        error_setg(VAR_1, "Number of servers needs to be greater 0");

        return;

    }



    

    spapr_rtas_register("ibm,set-xive", rtas_set_xive);

    spapr_rtas_register("ibm,get-xive", rtas_get_xive);

    spapr_rtas_register("ibm,int-off", rtas_int_off);

    spapr_rtas_register("ibm,int-on", rtas_int_on);



    spapr_register_hypercall(H_CPPR, h_cppr);

    spapr_register_hypercall(H_IPI, h_ipi);

    spapr_register_hypercall(H_XIRR, h_xirr);

    spapr_register_hypercall(H_XIRR_X, h_xirr_x);

    spapr_register_hypercall(H_EOI, h_eoi);

    spapr_register_hypercall(H_IPOLL, h_ipoll);



    object_property_set_bool(OBJECT(icp->ics), true, "realized", &error);

    if (error) {

        error_propagate(VAR_1, error);

        return;

    }



    for (VAR_2 = 0; VAR_2 < icp->nr_servers; VAR_2++) {

        object_property_set_bool(OBJECT(&icp->ss[VAR_2]), true, "realized", &error);

        if (error) {

            error_propagate(VAR_1, error);

            return;

        }

    }

}

static void FUNC_0(DeviceState *VAR_0, Error **VAR_1)
{ XICSState *icp = XICS(VAR_0); Error *error = NULL; int VAR_2; if (!icp->nr_servers) { error_setg(VAR_1, "Number of servers needs to be greater 0"); return; } spapr_rtas_register("ibm,set-xive", rtas_set_xive); spapr_rtas_register("ibm,get-xive", rtas_get_xive); spapr_rtas_register("ibm,int-off", rtas_int_off); spapr_rtas_register("ibm,int-on", rtas_int_on); spapr_register_hypercall(H_CPPR, h_cppr); spapr_register_hypercall(H_IPI, h_ipi); spapr_register_hypercall(H_XIRR, h_xirr); spapr_register_hypercall(H_XIRR_X, h_xirr_x); spapr_register_hypercall(H_EOI, h_eoi); spapr_register_hypercall(H_IPOLL, h_ipoll); object_property_set_bool(OBJECT(icp->ics), true, "realized", &error); if (error) { error_propagate(VAR_1, error); return; } for (VAR_2 = 0; VAR_2 < icp->nr_servers; VAR_2++) { object_property_set_bool(OBJECT(&icp->ss[VAR_2]), true, "realized", &error); if (error) { error_propagate(VAR_1, error); return; } } }