Re: [Qemu-devel] [[RFC v3 03/12] virtio: init memory cache for packed ring

2018-10-15 Thread Jason Wang
On 2018年10月15日 15:09, Wei Xu wrote: -hwaddr virtio_queue_get_avail_size(VirtIODevice *vdev, int n) +hwaddr virtio_queue_get_driver_size(VirtIODevice *vdev, int n) { -return offsetof(VRingAvail, ring) + -sizeof(uint16_t) * vdev->vq[n].vring.num; +int s; + +if (virtio_vdev_

Re: [Qemu-devel] [[RFC v3 03/12] virtio: init memory cache for packed ring

2018-10-15 Thread Wei Xu
On Mon, Oct 15, 2018 at 11:10:12AM +0800, Jason Wang wrote: > > > On 2018年10月11日 22:08, w...@redhat.com wrote: > >From: Wei Xu > > > >Expand 1.0 by adding offset calculation accordingly. > > This is only part of what this patch did and I suggest to another patch to > do this. > > > > >Signed-o

Re: [Qemu-devel] [[RFC v3 03/12] virtio: init memory cache for packed ring

2018-10-14 Thread Jason Wang
On 2018年10月11日 22:08, w...@redhat.com wrote: From: Wei Xu Expand 1.0 by adding offset calculation accordingly. This is only part of what this patch did and I suggest to another patch to do this. Signed-off-by: Wei Xu --- hw/virtio/vhost.c | 16 hw/virtio/

[Qemu-devel] [[RFC v3 03/12] virtio: init memory cache for packed ring

2018-10-11 Thread wexu
From: Wei Xu Expand 1.0 by adding offset calculation accordingly. Signed-off-by: Wei Xu --- hw/virtio/vhost.c | 16 hw/virtio/virtio.c | 35 +++ include/hw/virtio/virtio.h | 4 ++-- 3 files changed, 33 insertions(+), 22 deletio