void virtio_queue_update_rings(VirtIODevice *vdev, int n)

{

    VRing *vring = &vdev->vq[n].vring;



    if (!vring->desc) {

        /* not yet setup -> nothing to do */

        return;

    }

    vring->avail = vring->desc + vring->num * sizeof(VRingDesc);

    vring->used = vring_align(vring->avail +

                              offsetof(VRingAvail, ring[vring->num]),

                              vring->align);

    virtio_init_region_cache(vdev, n);

}

void virtio_queue_update_rings(VirtIODevice *vdev, int n)

{

    VRing *vring = &vdev->vq[n].vring;



    if (!vring->desc) {

        

        return;

    }

    vring->avail = vring->desc + vring->num * sizeof(VRingDesc);

    vring->used = vring_align(vring->avail +

                              offsetof(VRingAvail, ring[vring->num]),

                              vring->align);

    virtio_init_region_cache(vdev, n);

}

    if (!vring->desc) {
void FUNC_0(VirtIODevice *VAR_0, int VAR_1)

{

    VRing *vring = &VAR_0->vq[VAR_1].vring;



    if (!vring->desc) {

        

        return;

    }

    vring->avail = vring->desc + vring->num * sizeof(VRingDesc);

    vring->used = vring_align(vring->avail +

                              offsetof(VRingAvail, ring[vring->num]),

                              vring->align);

    virtio_init_region_cache(VAR_0, VAR_1);

}

void FUNC_0(VirtIODevice *VAR_0, int VAR_1)
{ VRing *vring = &VAR_0->vq[VAR_1].vring; if (!vring->desc) { return; } vring->avail = vring->desc + vring->num * sizeof(VRingDesc); vring->used = vring_align(vring->avail +
offsetof(VRingAvail, ring[vring->num]),
vring->align); virtio_init_region_cache(VAR_0, VAR_1); }