From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 9B896BE5A; Tue, 2 Jul 2024 17:09:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719940160; cv=none; b=BMkTTfy167gJKZ9/hYlXW6mCtwGpIyz1HhtNZp3OS4t1G5TOoqLR9QJk+vh2THGtNNoIK/O8VkS2n4YFOLMi0wJl2gFIs9gFnACTZNHXcEmI8vclzt/Z//85ZrxS/9H/TBieLPvxJaTqF2gttIW5qbWBeAvBG7s2wEfM/c+5RuA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719940160; c=relaxed/simple; bh=jE6eytjcdqdx4w4nsP7AGNmWr2jX/2ECWvsiLfvJxP8=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=OVZwoPbz39uWsPvJUxwK+bKpmGQ1JDlRPCyPG1iBwbkH3w4hVgCucz1/nIVU4vlGZ7n1kmjKsYUzFTTswkO8s7X3AQtxX1OsSwvOxRyLJdoiliMXv5hrH/RR+DHnBtQk/rfUZIhTO9DExhNgEerzvqi5HUW4N3NL73kxxU+zgv4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=1ohz6ON2; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="1ohz6ON2" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1B917C116B1; Tue, 2 Jul 2024 17:09:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1719940160; bh=jE6eytjcdqdx4w4nsP7AGNmWr2jX/2ECWvsiLfvJxP8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=1ohz6ON2p6LUA4hDN5QPXYRsEouekYoATR+1jL9U4FAsQ77xW/KKC5/+YUnpQp1CR V01A9DzwhwL4N1H1/gpMDFPQRpo9nVLO3qO7k2u+eCUQ0yFGNa2GMsrseR3JJbDt2Z PkyHR3K9Aabq4vPFdEWRXz0ddpPVKzAFMmXdK7tQ= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Maxime Coquelin , "Michael S. Tsirkin" , =?UTF-8?q?Eugenio=20P=C3=A9rez?= , Xie Yongji , Jason Wang , Sasha Levin Subject: [PATCH 6.9 070/222] vduse: Temporarily fail if control queue feature requested Date: Tue, 2 Jul 2024 19:01:48 +0200 Message-ID: <20240702170246.656359839@linuxfoundation.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240702170243.963426416@linuxfoundation.org> References: <20240702170243.963426416@linuxfoundation.org> User-Agent: quilt/0.67 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 6.9-stable review patch. If anyone has any objections, please let me know. ------------------ From: Maxime Coquelin [ Upstream commit 56e71885b0349241c07631a7b979b61e81afab6a ] 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 Message-Id: <20240109111025.1320976-3-maxime.coquelin@redhat.com> Signed-off-by: Michael S. Tsirkin Acked-by: Eugenio Pérez Reviewed-by: Xie Yongji Acked-by: Jason Wang Signed-off-by: Sasha Levin --- 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 7c3d117b22deb..ac8b5b52e3dc4 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" @@ -1714,6 +1716,9 @@ static bool features_is_valid(struct vduse_dev_config *config) if ((config->device_id == VIRTIO_ID_BLOCK) && (config->features & BIT_ULL(VIRTIO_BLK_F_CONFIG_WCE))) return false; + else if ((config->device_id == VIRTIO_ID_NET) && + (config->features & BIT_ULL(VIRTIO_NET_F_CTRL_VQ))) + return false; return true; } -- 2.43.0