Received: by 2002:a05:7412:e794:b0:fa:551:50a7 with SMTP id o20csp265938rdd; Tue, 9 Jan 2024 03:39:04 -0800 (PST) X-Google-Smtp-Source: AGHT+IG0YMpNhBofn0dt3QyOSRNy/kIr4xF3+PfVr7ctTj4ZuPYNQKAUAtlpaU0Fd52olgNHiQmN X-Received: by 2002:a05:622a:13c6:b0:429:9343:6597 with SMTP id p6-20020a05622a13c600b0042993436597mr3417676qtk.14.1704800343992; Tue, 09 Jan 2024 03:39:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704800343; cv=none; d=google.com; s=arc-20160816; b=a+iNGci/qWGXGgAsItFDqBnv+DiNhM8UTTpEfmd8U+rpclS5VIP6y8YHfKI9D38sl1 vcekKulzOOsdWUhnAI1e53+WzKREUO7BUwxur7W2xowVTl4yT5Yc4raJJORZY0+Eq5tZ nDN9F0xxrqVCGTtH/s0ULWuyRjl9G67x8CSd3cbRlHOFxHnG/Z0rlrWakZLmZANlODGQ jMS1szWYUBNE6WUABLPQF/ApA+XS2S3wAoZHzV8LnN5vz7oWqubbReJwsHb5Ux2mPCRD na5a2clgDd8w2tr1k2qPycnF5e1UlTj3toinEuZJBMbGxSRwe2JDsFkl5V0MEMNpSS4/ kL0A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:dkim-signature; bh=L2KHtwWJsxpW21yW1HeRr38zmDlSiokTXP6mx3ysxiI=; fh=MkbZrgS5uSKmTV0WWhdLyT5YA23/EhldhdZbKyQmIAA=; b=l2+BIBXBcuP0lkFlFtQsfaT54Feq54gW+/U137zDuvJrfgJNE5o+EnNS1qtwtOdD49 WoJ4pX+C0jbZS/909n2QxYx1rev4uylom1oJ247fqaGHVxqSHGAfogajKjVHwB7xHIsd jWI97PAOMUwl60Z55ypAGHu3UmvH35uwmnj8bKUY/vLhyXJ/pdzrTbYTqe8b3b0ljnz6 z2GOtWN/joIQFyLqgBfPn7/OAXwMOZxHyWu3EaXwlMnE2mnmHxv9IZ4KUMFte89tV02x 1o8lpxQsPsFp3fuhF89kDd4UMDzcDBHzMk3ajEm735JWaW3UbZTcOFA1nXWE+UR3ltcK rIUQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=PDsOpJZU; spf=pass (google.com: domain of linux-kernel+bounces-20786-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-20786-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id vz16-20020a05620a495000b0078326a6f8c2si1742256qkn.404.2024.01.09.03.39.03 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 09 Jan 2024 03:39:03 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-20786-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=PDsOpJZU; spf=pass (google.com: domain of linux-kernel+bounces-20786-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-20786-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id BA0431C23833 for ; Tue, 9 Jan 2024 11:39:03 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 4A89B37166; Tue, 9 Jan 2024 11:38:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="PDsOpJZU" Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E82D41E4B1 for ; Tue, 9 Jan 2024 11:38:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1704800333; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=L2KHtwWJsxpW21yW1HeRr38zmDlSiokTXP6mx3ysxiI=; b=PDsOpJZUWfQ1c+TbjJiQKqrch9UNWOmBFuURiXq6XYSVCtEAI9xKIfcdd6ClbtzibEVuxN v4hUA3DiUSuLIwOEOid0iHcN9PFWJQLNF2qrdxdy4wVbn2za70C30ml8rmGsEI8KhTJq8m GlhPSxmikrwX5ge3bBOAPoRvkSryNyw= Received: from mail-yw1-f198.google.com (mail-yw1-f198.google.com [209.85.128.198]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-145-6RqhJJM-N2K7flPK-Hm5vg-1; Tue, 09 Jan 2024 06:38:52 -0500 X-MC-Unique: 6RqhJJM-N2K7flPK-Hm5vg-1 Received: by mail-yw1-f198.google.com with SMTP id 00721157ae682-5efb07ddb0fso37325437b3.0 for ; Tue, 09 Jan 2024 03:38:52 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704800332; x=1705405132; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=L2KHtwWJsxpW21yW1HeRr38zmDlSiokTXP6mx3ysxiI=; b=azRAP6W6zt+8XhbnIiuuCJx6mQWjeyrSM5isRfjLvH8nDcUFAiDZn/17QHk+PRXuxv XOv/0jZqNnFc6+HS0RU3s5CbpEP5lzXWNLF9jntIG5Yt0kDI4xkGxTvUAYBgLSTwhfbK qL2iVjvx9LTZJ+j+4E/nCLUzvXwseQLiVFYT8WdrdnUOXZeJlWE+tqVt0TFQEAqR5Mzv 2G6hl72dxXkmYOGK2mWUm++uMnHXoGZZ+tNpR3R+kxBB8nLRWrCQYy4n0/8qg2e3sEWU ge0p61uOehVwM37LVjnoJAFCrMdDwNLW2JVgRUeN4sOKyTCr5HvYU0+l020aawIv5wRf OyiQ== X-Gm-Message-State: AOJu0Yxv8rV29oEKzXjXIWBTFJralpl8/fZfxTyFgGk0aWoLsPJGhZAC aZBRhVqanIRcePJIF7ayqAYK5/emCC23oISj5RAyLOMqTS8YVm8pNYD9zN0mdG95wssvgBeUISN isPtrdvOjdrl6oqo0ikh3/1vKvZjXnLo4MTTzAjCSJM0P99qF7anjlGC28WY= X-Received: by 2002:a81:7b07:0:b0:5f9:2256:5ad8 with SMTP id w7-20020a817b07000000b005f922565ad8mr1283427ywc.90.1704800331759; Tue, 09 Jan 2024 03:38:51 -0800 (PST) X-Received: by 2002:a81:7b07:0:b0:5f9:2256:5ad8 with SMTP id w7-20020a817b07000000b005f922565ad8mr1283419ywc.90.1704800331475; Tue, 09 Jan 2024 03:38:51 -0800 (PST) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20240109111025.1320976-1-maxime.coquelin@redhat.com> <20240109111025.1320976-3-maxime.coquelin@redhat.com> In-Reply-To: <20240109111025.1320976-3-maxime.coquelin@redhat.com> From: Eugenio Perez Martin Date: Tue, 9 Jan 2024 12:38:15 +0100 Message-ID: Subject: Re: [PATCH v7 2/3] vduse: Temporarily fail if control queue feature requested To: Maxime Coquelin Cc: mst@redhat.com, jasowang@redhat.com, xuanzhuo@linux.alibaba.com, xieyongji@bytedance.com, virtualization@lists.linux-foundation.org, linux-kernel@vger.kernel.org, david.marchand@redhat.com, lulu@redhat.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Tue, Jan 9, 2024 at 12:11=E2=80=AFPM Maxime Coquelin wrote: > > Virtio-net driver control queue implementation is not safe > when used with VDUSE. If the VDUSE application does not > reply to control queue messages, it currently ends up > hanging the kernel thread sending this command. > > Some work is on-going to make the control queue > implementation robust with VDUSE. Until it is completed, > let's fail features check if control-queue feature is > requested. > > Signed-off-by: Maxime Coquelin Acked-by: Eugenio P=C3=A9rez Thanks! > --- > drivers/vdpa/vdpa_user/vduse_dev.c | 5 +++++ > 1 file changed, 5 insertions(+) > > diff --git a/drivers/vdpa/vdpa_user/vduse_dev.c b/drivers/vdpa/vdpa_user/= vduse_dev.c > index a5af6d4077b8..00f3f562ab5d 100644 > --- a/drivers/vdpa/vdpa_user/vduse_dev.c > +++ b/drivers/vdpa/vdpa_user/vduse_dev.c > @@ -8,6 +8,7 @@ > * > */ > > +#include "linux/virtio_net.h" > #include > #include > #include > @@ -28,6 +29,7 @@ > #include > #include > #include > +#include > #include > > #include "iova_domain.h" > @@ -1680,6 +1682,9 @@ static bool features_is_valid(struct vduse_dev_conf= ig *config) > if ((config->device_id =3D=3D VIRTIO_ID_BLOCK) && > (config->features & BIT_ULL(VIRTIO_BLK_F_CONFIG_W= CE))) > return false; > + else if ((config->device_id =3D=3D VIRTIO_ID_NET) && > + (config->features & BIT_ULL(VIRTIO_NET_F_CTRL_VQ)= )) > + return false; > > return true; > } > -- > 2.43.0 > >