Received: by 2002:a05:7412:e794:b0:fa:551:50a7 with SMTP id o20csp1389450rdd; Wed, 10 Jan 2024 19:14:11 -0800 (PST) X-Google-Smtp-Source: AGHT+IFY8SLzv54fC+grUYpVQPV2LX4RmTjz8w29lImYDz/X/n3utT7UuwzV9oMeJ4SO48WZh1jn X-Received: by 2002:a05:6871:448d:b0:203:b191:aec2 with SMTP id ne13-20020a056871448d00b00203b191aec2mr628549oab.55.1704942851751; Wed, 10 Jan 2024 19:14:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704942851; cv=none; d=google.com; s=arc-20160816; b=PzB2DUjoJiMAOHXQ2Z4EFx6z/AhFdwmQg4NfK7XQHQ9mWoEPmtJgKIGqnd7Y2B7YbT qrKGTKJyY8pDRN0UuifYzlxhch2REQl8yZ7Z8TzWn15MAhiY4GehBni+RFKkjv17Ox7i 731i+L6ZyvIuayvxq+ElP8yTYRpJRQdZBa2BN9+Mali/1jhHUPSAJW/+BbBlkrBxFJia 1ZMZvuglbK+KM2N8+9xEVsKN4mfc0Snyh/Fs3kdl+kvZmwHNuLj/N28aTM5xKLg58UzI y2omBHTBsTWuhhlzUIUqEUlhn4k1SAqIVOrcCOGL9Ro3i9I8IogspnI2ac3S898DACVi t+XA== 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=PVa1KzmyYYorAZDdtVUttYweORkac6xnCaVp9EWXlys=; fh=VODvV/0g17yvmophHw0TONBODxBGR5Rp8bS9J3ZFcGw=; b=hzwHgVOzYF39/wr5AnVJ+Zh7/+iqoscGmrAyxjWGgojpduxxHE2bKIfpJcruAm4E/K pSTVw9eQxq1OW3HY5uzZI62woIO0d09LGfgm1xKRJjHgt2s5NvWloOvAPU/WtSWiY5Ej XCDeUG+gyHZgp684R1SR9m9VABeyg/cnaUy7haDumtq7z9kMEWs3oKUcNq0EFUt4OKGC 8VnRxDZzsP1gEW9Br+sBVES870thlKbehval1HolkOVG9WVtJezdKVKQYa83PCovghyL I2OPJMRZcMW9OssdsnC3oaJ1jRdxYyV0sKD0pgtXKm+x3EUKqd22Eree4c8G/rF6EKcg 1gnw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=VcKOvIjn; spf=pass (google.com: domain of linux-kernel+bounces-23015-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-23015-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id s66-20020a632c45000000b005c660acad7asi159445pgs.4.2024.01.10.19.14.11 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Jan 2024 19:14:11 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-23015-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=VcKOvIjn; spf=pass (google.com: domain of linux-kernel+bounces-23015-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-23015-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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 6B5ECB276CD for ; Thu, 11 Jan 2024 03:11:23 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 659FB1FD2; Thu, 11 Jan 2024 03:11:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="VcKOvIjn" Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.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 2777517C1 for ; Thu, 11 Jan 2024 03:11:10 +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=1704942670; 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=PVa1KzmyYYorAZDdtVUttYweORkac6xnCaVp9EWXlys=; b=VcKOvIjnQwBpGyoM13caKUw7e74471acqUMlpVHtGqLh1uJ5BjZfDOL5VdKMNaKpxmCdW3 qVvGewyM1KkVBJCS/ipKdph3g3kTOgwH0SSchQXwLUCBD58AvOUBGwdSw4+q8wZXGRP4Xq CMOQNkVGoSL1NM/V9T7q6LPoCmUn8oU= Received: from mail-ot1-f71.google.com (mail-ot1-f71.google.com [209.85.210.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-494-B-yQeYg1MmWc-tLReNmEIA-1; Wed, 10 Jan 2024 22:11:08 -0500 X-MC-Unique: B-yQeYg1MmWc-tLReNmEIA-1 Received: by mail-ot1-f71.google.com with SMTP id 46e09a7af769-6dde701a6ccso2544917a34.3 for ; Wed, 10 Jan 2024 19:11:08 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704942667; x=1705547467; 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=PVa1KzmyYYorAZDdtVUttYweORkac6xnCaVp9EWXlys=; b=hBFx2LREm04Qgxj2UBA4jXNU523sOO5RPsNfGFwTXo79g+6bpLvnoQrTvKFf9Rqhz6 E2O6xH7sAAr8AeuCDnowWrENc80uxwgGXIicRl4o+FpH7ydMVHFBjecuA53WqECIQama vSADnlsbgDkpebJrvOckyiiCkB50wpF+2l7xh2Q6b2np1M0BR9rkzBI/lmJK8qNKexNi 6jju0bWvO4bGbhizUlKFYb2oD8TCpHntkv/OPBn2p/B+huo8koeqOME+aCOPKViBCBiB cs/rxxRjCz6KbETym15C+hcUuXHN6LqvHQ+CzmcxWNG+xvEGRxGSwYKEg9c0ycAdrHc0 YBTg== X-Gm-Message-State: AOJu0Yy2K54axk8NgrYk/vlnFFWY73IU2gV1KbHl9vooGg+cSZUL+AMd dZt6JGUyOf3XfiR8lDsQKDr/UxFpAoqxRZIWoAUPwL2AVccNamtaGbLKnJdu3bEm38S4g8H1DgV 09sj4FWZuR4hCER4pisGVuyu6EJVFQ/2eWyfZ4DbbeIvzA96cZg+wvrLX X-Received: by 2002:a9d:5e04:0:b0:6dc:4f4:f4e0 with SMTP id d4-20020a9d5e04000000b006dc04f4f4e0mr513024oti.45.1704942667345; Wed, 10 Jan 2024 19:11:07 -0800 (PST) X-Received: by 2002:a9d:5e04:0:b0:6dc:4f4:f4e0 with SMTP id d4-20020a9d5e04000000b006dc04f4f4e0mr513017oti.45.1704942667121; Wed, 10 Jan 2024 19:11:07 -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: Jason Wang Date: Thu, 11 Jan 2024 11:10:56 +0800 Message-ID: Subject: Re: [PATCH v7 2/3] vduse: Temporarily fail if control queue feature requested To: Maxime Coquelin Cc: mst@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 7:10=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: Jason Wang 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 >