[PATCH 0/2][RFC] exclude ivshmem mr from vhost sections

Wang Xin posted 2 patches 5 years, 2 months ago
Test docker-quick@centos7 failed
Test docker-mingw@fedora failed
Test checkpatch failed
Test FreeBSD failed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20200828095953.2276-1-wangxinxin.wang@huawei.com
Maintainers: Paolo Bonzini <pbonzini@redhat.com>, "Michael S. Tsirkin" <mst@redhat.com>
hw/misc/ivshmem.c     |  2 ++
hw/virtio/vhost.c     |  5 ++++-
include/exec/memory.h | 21 +++++++++++++++++++++
softmmu/memory.c      | 15 +++++++++++++++
4 files changed, 42 insertions(+), 1 deletion(-)
[PATCH 0/2][RFC] exclude ivshmem mr from vhost sections
Posted by Wang Xin 5 years, 2 months ago
The ivshmem me now mapped to vhost memory regions, and it reduces
the number of available memslots of vhost backend, which may
causes vhost backend memory slots limit check failure in
vhost dev init.

Since ivshmem_bar2 not normal RAM in Guest, and it shouldn't
have vhost DMAing into them, exclude it from the vhost sections.

The 1st patch re-spin Dave's patch, see link
  https://lists.nongnu.org/archive/html/qemu-devel/2020-01/msg02370.html

However, I'm not sure is there any side effects, or maybe it's
better to add a new device property like 'novhost/nodma'?

Thanks,
Xin

Wang Xin (2):
  memory: Allow a MemoryRegion to be marked no_vhost
  misc/ivshmem: Mark shared memory regions as no vhost

 hw/misc/ivshmem.c     |  2 ++
 hw/virtio/vhost.c     |  5 ++++-
 include/exec/memory.h | 21 +++++++++++++++++++++
 softmmu/memory.c      | 15 +++++++++++++++
 4 files changed, 42 insertions(+), 1 deletion(-)

-- 
2.26.0.windows.1



RE: [PATCH 0/2][RFC] exclude ivshmem mr from vhost sections
Posted by Wangxin (Alexander) 5 years, 2 months ago
Ping. 

> 
> The ivshmem me now mapped to vhost memory regions, and it reduces
> the number of available memslots of vhost backend, which may
> causes vhost backend memory slots limit check failure in
> vhost dev init.
> 
> Since ivshmem_bar2 not normal RAM in Guest, and it shouldn't
> have vhost DMAing into them, exclude it from the vhost sections.
> 
> The 1st patch re-spin Dave's patch, see link
>   https://lists.nongnu.org/archive/html/qemu-devel/2020-01/msg02370.html
> 
> However, I'm not sure is there any side effects, or maybe it's
> better to add a new device property like 'novhost/nodma'?
> 
> Thanks,
> Xin
> 
> Wang Xin (2):
>   memory: Allow a MemoryRegion to be marked no_vhost
>   misc/ivshmem: Mark shared memory regions as no vhost
> 
>  hw/misc/ivshmem.c     |  2 ++
>  hw/virtio/vhost.c     |  5 ++++-
>  include/exec/memory.h | 21 +++++++++++++++++++++
>  softmmu/memory.c      | 15 +++++++++++++++
>  4 files changed, 42 insertions(+), 1 deletion(-)
> 
> --
> 2.26.0.windows.1
>