void virtio_queue_set_align(VirtIODevice *vdev, int n, int align)

{

    BusState *qbus = qdev_get_parent_bus(DEVICE(vdev));

    VirtioBusClass *k = VIRTIO_BUS_GET_CLASS(qbus);



    /* virtio-1 compliant devices cannot change the alignment */

    if (virtio_vdev_has_feature(vdev, VIRTIO_F_VERSION_1)) {

        error_report("tried to modify queue alignment for virtio-1 device");

        return;

    }

    /* Check that the transport told us it was going to do this

     * (so a buggy transport will immediately assert rather than

     * silently failing to migrate this state)

     */

    assert(k->has_variable_vring_alignment);



    vdev->vq[n].vring.align = align;

    virtio_queue_update_rings(vdev, n);

}

void virtio_queue_set_align(VirtIODevice *vdev, int n, int align)

{

    BusState *qbus = qdev_get_parent_bus(DEVICE(vdev));

    VirtioBusClass *k = VIRTIO_BUS_GET_CLASS(qbus);



    

    if (virtio_vdev_has_feature(vdev, VIRTIO_F_VERSION_1)) {

        error_report("tried to modify queue alignment for virtio-1 device");

        return;

    }

    







    assert(k->has_variable_vring_alignment);



    vdev->vq[n].vring.align = align;

    virtio_queue_update_rings(vdev, n);

}

    vdev->vq[n].vring.align = align;     virtio_queue_update_rings(vdev, n);
void FUNC_0(VirtIODevice *VAR_0, int VAR_1, int VAR_2)

{

    BusState *qbus = qdev_get_parent_bus(DEVICE(VAR_0));

    VirtioBusClass *k = VIRTIO_BUS_GET_CLASS(qbus);



    

    if (virtio_vdev_has_feature(VAR_0, VIRTIO_F_VERSION_1)) {

        error_report("tried to modify queue alignment for virtio-1 device");

        return;

    }

    







    assert(k->has_variable_vring_alignment);



    VAR_0->vq[VAR_1].vring.VAR_2 = VAR_2;

    virtio_queue_update_rings(VAR_0, VAR_1);

}

void FUNC_0(VirtIODevice *VAR_0, int VAR_1, int VAR_2)
{ BusState *qbus = qdev_get_parent_bus(DEVICE(VAR_0)); VirtioBusClass *k = VIRTIO_BUS_GET_CLASS(qbus); if (virtio_vdev_has_feature(VAR_0, VIRTIO_F_VERSION_1)) { error_report("tried to modify queue alignment for virtio-1 device"); return; } assert(k->has_variable_vring_alignment); VAR_0->vq[VAR_1].vring.VAR_2 = VAR_2; virtio_queue_update_rings(VAR_0, VAR_1); }