On 08-May-18 8:10 AM, Xiao Wang wrote:
From: Maxime Coquelin <maxime.coque...@redhat.com>
When memory is hot-added or hot-removed, the virtio-user driver has to
notify the vhost-user backend with sending a VHOST_USER_SET_MEM_TABLE
request with the new memory map as payload.
This patch implements and registers a mem_event callback, it pauses the
datapath and updates memory regions to vhost in case of hot-add or
hot-remove event. This memory region update has only to be done when the
device is already started, so a new status flag is added to the device to
keep track of the status.
As the device can now be managed by different threads, a mutex is
introduced to protect against concurrent device configuration.
Signed-off-by: Maxime Coquelin <maxime.coque...@redhat.com>
Signed-off-by: Xiao Wang <xiao.w.w...@intel.com>
---
Memory part looks OK to me.
--
Thanks,
Anatoly