|
From: | Jason Wang |
Subject: | Re: [Qemu-devel] [[RFC v3 08/12] virtio: event suppression support for packed ring |
Date: | Mon, 15 Oct 2018 17:11:53 +0800 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 |
On 2018年10月15日 16:20, Wei Xu wrote:
+static void virtio_queue_set_notification_packed(VirtQueue *vq, int enable) +{ + VRingPackedDescEvent e; + VRingMemoryRegionCaches *caches; + + rcu_read_lock(); + caches = vring_get_region_caches(vq); + vring_packed_event_read(vq->vdev, &caches->device, &e); + + if (!enable) { + e.flags = RING_EVENT_FLAGS_DISABLE; + goto out; + } + + e.flags = RING_EVENT_FLAGS_ENABLE; + if (virtio_vdev_has_feature(vq->vdev, VIRTIO_RING_F_EVENT_IDX)) { + uint16_t off_wrap = vq->event_idx | vq->event_wrap_counter << 15;Btw, why not just use shadow_avail_idx here?It is nice to do that but an issue here is that it is 'shadow_avail_idx' for Rx but 'used_idx' for Tx when setting up for a kick, haven't figured out a clear fix because it helps easier migration part work, any idea? Wei
I'm not sure I get the point here. Why need to care about used_idx when enabling guest kick?
Thanks
[Prev in Thread] | Current Thread | [Next in Thread] |