Re: [Qemu-devel] [PATCH 2/3] vhost-user: Fix VHOST_SET_MEM_TABLE processing

2014-07-11 Thread Paolo Bonzini
Il 08/07/2014 16:06, Nikolay Nikolaev ha scritto: @@ -216,6 +216,10 @@ static int vhost_user_call(struct vhost_dev *dev, unsigned long int request, case VHOST_SET_MEM_TABLE: for (i = 0; i < dev->mem->nregions; ++i) { struct vhost_memory_region *reg = dev->mem->regions

[Qemu-devel] [PATCH 2/3] vhost-user: Fix VHOST_SET_MEM_TABLE processing

2014-07-08 Thread Nikolay Nikolaev
For each memory region we use qemu_get_ram_fd to get the RAMBlock associated file descriptor. It uses qemu_get_ram_block to find the proper structure. The latter aborts with "Bad ram offset" when the address is not found. We'll use the new qemu_is_ram_block to indentify non-RAM regions and avoid