Skip to contentSkip to conversation

virtIO question

Qemu-devel [email protected] 2 participants 2 messages Nov 14, 2016

lore
Share & tools
lore
#0 lore raw

I have a question about qemu.is it a bug in qemu version 1.2? in qemu version 1.2 ,it set avail event by the code :

 if (vq->vdev->guest_features & (1 << VIRTIO_RING_F_EVENT_IDX)) {
        vring_avail_event(vq, vring_avail_idx(vq));
        }
 and in version 2.7 the code is
 if (virtio_vdev_has_feature(vdev, VIRTIO_RING_F_EVENT_IDX)) {
        vring_set_avail_event(vq, vq->last_avail_idx);
    }

a big difference of this is the value.vring_avail_idx(vq)is the latest value of VRingAvail.idx,and vq->last_avail_idx is not, I think it really different with the two different values,and I think the later is right,is it?? thanks a lot!!

[email protected]

#1 lore raw
Quoted 11 lines · On Mon, Nov 14, 2016 at 08:36:39PM +0800, [email protected] wrote:

I have a question about qemu.is it a bug in qemu version 1.2? in qemu version 1.2 ,it set avail event by the code :

 if (vq->vdev->guest_features & (1 << VIRTIO_RING_F_EVENT_IDX)) {
        vring_avail_event(vq, vring_avail_idx(vq));
        }
 and in version 2.7 the code is
 if (virtio_vdev_has_feature(vdev, VIRTIO_RING_F_EVENT_IDX)) {
        vring_set_avail_event(vq, vq->last_avail_idx);
    }

a big difference of this is the value.vring_avail_idx(vq)is the latest value of VRingAvail.idx,and vq->last_avail_idx is not, I think it really different with the two different values,and I think the later is right,is it??

qemu.git/master has both vring_set_avail_event(vq, vring_avail_idx(vq)) and vring_set_avail_event(vq, vq->last_avail_idx) so I'm not sure what you are referring to.

Please use git-blame(1) and git-log(1) to investigate changes to the code yourself.

Stefan