From nobody Sat Nov 15 14:13:27 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=yandex-team.ru ARC-Seal: i=1; a=rsa-sha256; t=1751547278; cv=none; d=zohomail.com; s=zohoarc; b=g5PemMn9XTXhI7tbBBOHCHCcqS5stmrRvIEYkWFft2a7Olwerjuyed9Nof5bgVXYpVpioKzKKeOzaWgqyLiyo3axgS+E4Gx1OjKoN9+DPn7ggByPbc+a4zLnJ0bUgfETdUJeABz2aAGHJeHavkqLdE68WsCdzL4WKf3vpgtHSVA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1751547278; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=F84/vf+slKCAI1XpqnU8oxnofrZpTBeaYgujwpNDFAw=; b=ObCmEqk+leMTrlqnFDZzxfoaY7jIvKIQ23uW0xBF5YWk3cfKzmmCxotUb8kOa33y23oIXcRD7MbXqAJ8AhW7utH8rxcR7iX49TTRVtTlsg/JiTi7YRVZDKf078pfxruav+zZeqrC+/EDyMqQzuksJ4jtL+K7GkRuZ1kMOhLYPyY= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 175154727894849.18515874056516; Thu, 3 Jul 2025 05:54:38 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1uXJOB-00085A-Nj; Thu, 03 Jul 2025 08:50:08 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1uXJLm-0005lQ-MG; Thu, 03 Jul 2025 08:47:39 -0400 Received: from forwardcorp1b.mail.yandex.net ([178.154.239.136]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1uXJLf-0006np-4T; Thu, 03 Jul 2025 08:47:37 -0400 Received: from mail-nwsmtp-smtp-corp-canary-81.sas.yp-c.yandex.net (mail-nwsmtp-smtp-corp-canary-81.sas.yp-c.yandex.net [IPv6:2a02:6b8:c10:4a1:0:640:2691:0]) by forwardcorp1b.mail.yandex.net (Yandex) with ESMTPS id 17C5660CD1; Thu, 3 Jul 2025 15:47:20 +0300 (MSK) Received: from vsementsov-lin.. (unknown [2a02:6bf:8080:73d::1:28]) by mail-nwsmtp-smtp-corp-canary-81.sas.yp-c.yandex.net (smtpcorp/Yandex) with ESMTPSA id HlbMgQ0FgSw0-B6MCEwG0; Thu, 03 Jul 2025 15:47:19 +0300 X-Yandex-Fwd: 1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex-team.ru; s=default; t=1751546839; bh=F84/vf+slKCAI1XpqnU8oxnofrZpTBeaYgujwpNDFAw=; h=Message-ID:Date:In-Reply-To:Cc:Subject:References:To:From; b=YvcDsdkL0SE1IibwRdN5G3Vd22hJYZi5aW/d32fkKqbuPI0yICK0yzZuFnj5AAk9b G34I1XhhPaeWmN9brSmsWWRnOBJ8JJf4QxiE+GRzl2W0e5hUTpEdVqpj+hAujecIvJ A401lN/zoJ7jmjyM0tTGJ8HYcAskdVn3fiMwaXwc= Authentication-Results: mail-nwsmtp-smtp-corp-canary-81.sas.yp-c.yandex.net; dkim=pass header.i=@yandex-team.ru From: Vladimir Sementsov-Ogievskiy To: qemu-devel@nongnu.org, mst@redhat.com Cc: qemu-block@nongnu.org, fam@euphon.net, pbonzini@redhat.com, jasowang@redhat.com, hreitz@redhat.com, kwolf@redhat.com, sgarzare@redhat.com, raphael@enfabrica.net, Vladimir Sementsov-Ogievskiy Subject: [PATCH 2/4] vhost-user: stop use backend_features Date: Thu, 3 Jul 2025 15:47:10 +0300 Message-ID: <20250703124713.2530079-3-vsementsov@yandex-team.ru> X-Mailer: git-send-email 2.48.1 In-Reply-To: <20250703124713.2530079-1-vsementsov@yandex-team.ru> References: <20250703124713.2530079-1-vsementsov@yandex-team.ru> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=178.154.239.136; envelope-from=vsementsov@yandex-team.ru; helo=forwardcorp1b.mail.yandex.net X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.237, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @yandex-team.ru) X-ZM-MESSAGEID: 1751547279795116600 Content-Type: text/plain; charset="utf-8" Simply use features instead, we have same flag here. Signed-off-by: Vladimir Sementsov-Ogievskiy --- hw/virtio/vhost-user.c | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/hw/virtio/vhost-user.c b/hw/virtio/vhost-user.c index 1b2879a90cc..cf6f53801db 100644 --- a/hw/virtio/vhost-user.c +++ b/hw/virtio/vhost-user.c @@ -1232,7 +1232,7 @@ static int vhost_user_set_vring_base(struct vhost_dev= *dev, =20 static bool vhost_user_set_vring_enable_supported(struct vhost_dev *dev) { - return virtio_has_feature(dev->backend_features, + return virtio_has_feature(dev->features, VHOST_USER_F_PROTOCOL_FEATURES); } =20 @@ -1449,14 +1449,15 @@ static int vhost_user_set_features(struct vhost_dev= *dev, int ret; =20 /* - * We need to include any extra backend only feature bits that - * might be needed by our device. Currently this includes the - * VHOST_USER_F_PROTOCOL_FEATURES bit for enabling protocol - * features. + * Don't lose VHOST_USER_F_PROTOCOL_FEATURES, which is vhost-user + * specific. */ - ret =3D vhost_user_set_u64(dev, VHOST_USER_SET_FEATURES, - features | dev->backend_features, - log_enabled); + if (virtio_has_feature(dev->features, VHOST_USER_F_PROTOCOL_FEATURES))= { + features |=3D 1ULL << VHOST_USER_F_PROTOCOL_FEATURES; + } + + ret =3D vhost_user_set_u64(dev, VHOST_USER_SET_FEATURES, features, + log_enabled); =20 if (virtio_has_feature(dev->protocol_features, VHOST_USER_PROTOCOL_F_STATUS)) { @@ -2187,8 +2188,6 @@ static int vhost_user_backend_init(struct vhost_dev *= dev, void *opaque, (dev->config_ops && dev->config_ops->vhost_dev_config_notifier= ); uint64_t protocol_features; =20 - dev->backend_features |=3D 1ULL << VHOST_USER_F_PROTOCOL_FEATURES; - err =3D vhost_user_get_u64(dev, VHOST_USER_GET_PROTOCOL_FEATURES, &protocol_features); if (err < 0) { --=20 2.48.1