From: BillXiang Date: Thu, 13 Jun 2024 06:51:50 +0000 (+0800) Subject: vhost-user: Skip unnecessary duplicated VHOST_USER_SET_LOG_BASE requests X-Git-Tag: v9.1.0-rc0~46^2~41 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=7c211eb078c42146ee9a441cc028fbc4c378ef5a;p=thirdparty%2Fqemu.git vhost-user: Skip unnecessary duplicated VHOST_USER_SET_LOG_BASE requests The VHOST_USER_SET_LOG_BASE requests should be categorized into non-vring specific messages, and should be sent only once. If send more than once, dpdk will munmap old log_addr which may has been used and cause segmentation fault. Signed-off-by: BillXiang Message-Id: <20240613065150.3100-1-xiangwencheng@dayudpu.com> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- diff --git a/hw/virtio/vhost-user.c b/hw/virtio/vhost-user.c index c407ea8939c..00561daa06e 100644 --- a/hw/virtio/vhost-user.c +++ b/hw/virtio/vhost-user.c @@ -371,6 +371,7 @@ static bool vhost_user_per_device_request(VhostUserRequest request) case VHOST_USER_RESET_DEVICE: case VHOST_USER_ADD_MEM_REG: case VHOST_USER_REM_MEM_REG: + case VHOST_USER_SET_LOG_BASE: return true; default: return false;