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

{

    X86IOMMUState *x86_iommu = X86_IOMMU_DEVICE(dev);

    X86IOMMUClass *x86_class = X86_IOMMU_GET_CLASS(dev);

    MachineState *ms = MACHINE(qdev_get_machine());

    MachineClass *mc = MACHINE_GET_CLASS(ms);

    PCMachineState *pcms =

        PC_MACHINE(object_dynamic_cast(OBJECT(ms), TYPE_PC_MACHINE));

    QLIST_INIT(&x86_iommu->iec_notifiers);



    if (!pcms) {

        error_setg(errp, "Machine-type '%s' not supported by IOMMU",

                   mc->name);

        return;

    }



    if (x86_class->realize) {

        x86_class->realize(dev, errp);

    }



    x86_iommu_set_default(X86_IOMMU_DEVICE(dev));

}

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

{

    X86IOMMUState *x86_iommu = X86_IOMMU_DEVICE(dev);

    X86IOMMUClass *x86_class = X86_IOMMU_GET_CLASS(dev);

    MachineState *ms = MACHINE(qdev_get_machine());

    MachineClass *mc = MACHINE_GET_CLASS(ms);

    PCMachineState *pcms =

        PC_MACHINE(object_dynamic_cast(OBJECT(ms), TYPE_PC_MACHINE));

    QLIST_INIT(&x86_iommu->iec_notifiers);



    if (!pcms) {

        error_setg(errp, "Machine-type '%s' not supported by IOMMU",

                   mc->name);

        return;

    }



    if (x86_class->realize) {

        x86_class->realize(dev, errp);

    }



    x86_iommu_set_default(X86_IOMMU_DEVICE(dev));

}

static void FUNC_0(DeviceState *VAR_0, Error **VAR_1)

{

    X86IOMMUState *x86_iommu = X86_IOMMU_DEVICE(VAR_0);

    X86IOMMUClass *x86_class = X86_IOMMU_GET_CLASS(VAR_0);

    MachineState *ms = MACHINE(qdev_get_machine());

    MachineClass *mc = MACHINE_GET_CLASS(ms);

    PCMachineState *pcms =

        PC_MACHINE(object_dynamic_cast(OBJECT(ms), TYPE_PC_MACHINE));

    QLIST_INIT(&x86_iommu->iec_notifiers);



    if (!pcms) {

        error_setg(VAR_1, "Machine-type '%s' not supported by IOMMU",

                   mc->name);

        return;

    }



    if (x86_class->realize) {

        x86_class->realize(VAR_0, VAR_1);

    }



    x86_iommu_set_default(X86_IOMMU_DEVICE(VAR_0));

}

static void FUNC_0(DeviceState *VAR_0, Error **VAR_1)
{ X86IOMMUState *x86_iommu = X86_IOMMU_DEVICE(VAR_0); X86IOMMUClass *x86_class = X86_IOMMU_GET_CLASS(VAR_0); MachineState *ms = MACHINE(qdev_get_machine()); MachineClass *mc = MACHINE_GET_CLASS(ms); PCMachineState *pcms =
PC_MACHINE(object_dynamic_cast(OBJECT(ms), TYPE_PC_MACHINE)); QLIST_INIT(&x86_iommu->iec_notifiers); if (!pcms) { error_setg(VAR_1, "Machine-type '%s' not supported by IOMMU",
mc->name); return; } if (x86_class->realize) { x86_class->realize(VAR_0, VAR_1); } x86_iommu_set_default(X86_IOMMU_DEVICE(VAR_0)); }