"BillXiang" <[email protected]> writes:

>> From: "Alex Bennée"<[email protected]>
>> Date:  Mon, Jul 1, 2024, 16:49
>> Subject:  Re: [PATCH] vhost-user: Skip unnecessary duplicated 
>> VHOST_USER_SET_LOG_BASE requests
>> To: "项文成"<[email protected]>
>> Cc: <[email protected]>, <[email protected]>
>> 项文成 <[email protected]> writes:
>> 
>> > From: BillXiang <[email protected]>
>> >
>> > 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.
>> 
>> This looks fine to me but looking at the vhost-user.rst we don't seem to
>> make any explicit statements about how many times given messages should
>> be sent.
>> 
> There is indeed no explicit statements about how many times given messages
>  should be sent in vhost-user.rst but already have some discussions such as 
> https://lore.kernel.org/qemu-devel/[email protected]/.

Right, but I think we should then update the specification if this is
the way we want things to work. Otherwise we are putting a backend
specific hack that another backend might be able to tolerate.

>> >
>> > Signed-off-by: BillXiang <[email protected]>
>> > ---
>> >  hw/virtio/vhost-user.c | 1 +
>> >  1 file changed, 1 insertion(+)
>> >
>> > diff --git a/hw/virtio/vhost-user.c b/hw/virtio/vhost-user.c
>> > index cdf9af4a4b..41e34edd49 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;
>> 
>> -- 
>> Alex Bennée
>> Virtualisation Tech Lead @ Linaro

-- 
Alex Bennée
Virtualisation Tech Lead @ Linaro

Reply via email to