void virtio_setup_block(struct subchannel_id schid)

{

    struct vq_info_block info;

    struct vq_config_block config = {};



    virtio_reset(schid);



    config.index = 0;

    if (run_ccw(schid, CCW_CMD_READ_VQ_CONF, &config, sizeof(config))) {

        virtio_panic("Could not get block device configuration\n");

    }

    vring_init(&block, config.num, (void*)(100 * 1024 * 1024),

               KVM_S390_VIRTIO_RING_ALIGN);



    info.queue = (100ULL * 1024ULL* 1024ULL);

    info.align = KVM_S390_VIRTIO_RING_ALIGN;

    info.index = 0;

    info.num = config.num;

    block.schid = schid;



    if (!run_ccw(schid, CCW_CMD_SET_VQ, &info, sizeof(info))) {

        virtio_set_status(schid, VIRTIO_CONFIG_S_DRIVER_OK);

    }

}

void virtio_setup_block(struct subchannel_id schid)

{

    struct vq_info_block info;

    struct vq_config_block config = {};



    virtio_reset(schid);



    config.index = 0;

    if (run_ccw(schid, CCW_CMD_READ_VQ_CONF, &config, sizeof(config))) {

        virtio_panic("Could not get block device configuration\n");

    }

    vring_init(&block, config.num, (void*)(100 * 1024 * 1024),

               KVM_S390_VIRTIO_RING_ALIGN);



    info.queue = (100ULL * 1024ULL* 1024ULL);

    info.align = KVM_S390_VIRTIO_RING_ALIGN;

    info.index = 0;

    info.num = config.num;

    block.schid = schid;



    if (!run_ccw(schid, CCW_CMD_SET_VQ, &info, sizeof(info))) {

        virtio_set_status(schid, VIRTIO_CONFIG_S_DRIVER_OK);

    }

}

void FUNC_0(struct subchannel_id VAR_0)

{

    struct vq_info_block VAR_1;

    struct vq_config_block VAR_2 = {};



    virtio_reset(VAR_0);



    VAR_2.index = 0;

    if (run_ccw(VAR_0, CCW_CMD_READ_VQ_CONF, &VAR_2, sizeof(VAR_2))) {

        virtio_panic("Could not get block device configuration\n");

    }

    vring_init(&block, VAR_2.num, (void*)(100 * 1024 * 1024),

               KVM_S390_VIRTIO_RING_ALIGN);



    VAR_1.queue = (100ULL * 1024ULL* 1024ULL);

    VAR_1.align = KVM_S390_VIRTIO_RING_ALIGN;

    VAR_1.index = 0;

    VAR_1.num = VAR_2.num;

    block.VAR_0 = VAR_0;



    if (!run_ccw(VAR_0, CCW_CMD_SET_VQ, &VAR_1, sizeof(VAR_1))) {

        virtio_set_status(VAR_0, VIRTIO_CONFIG_S_DRIVER_OK);

    }

}

void FUNC_0(struct subchannel_id VAR_0)
{ struct vq_info_block VAR_1; struct vq_config_block VAR_2 = {}; virtio_reset(VAR_0); VAR_2.index = 0; if (run_ccw(VAR_0, CCW_CMD_READ_VQ_CONF, &VAR_2, sizeof(VAR_2))) { virtio_panic("Could not get block device configuration\n"); } vring_init(&block, VAR_2.num, (void*)(100 * 1024 * 1024),
KVM_S390_VIRTIO_RING_ALIGN); VAR_1.queue = (100ULL * 1024ULL* 1024ULL); VAR_1.align = KVM_S390_VIRTIO_RING_ALIGN; VAR_1.index = 0; VAR_1.num = VAR_2.num; block.VAR_0 = VAR_0; if (!run_ccw(VAR_0, CCW_CMD_SET_VQ, &VAR_1, sizeof(VAR_1))) { virtio_set_status(VAR_0, VIRTIO_CONFIG_S_DRIVER_OK); } }