Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/1.2/patches/2225292/?format=api
{ "id": 2225292, "url": "http://patchwork.ozlabs.org/api/1.2/patches/2225292/?format=api", "web_url": "http://patchwork.ozlabs.org/project/qemu-devel/patch/20260420200339.708640-4-vsementsov@yandex-team.ru/", "project": { "id": 14, "url": "http://patchwork.ozlabs.org/api/1.2/projects/14/?format=api", "name": "QEMU Development", "link_name": "qemu-devel", "list_id": "qemu-devel.nongnu.org", "list_email": "qemu-devel@nongnu.org", "web_url": "", "scm_url": "", "webscm_url": "", "list_archive_url": "", "list_archive_url_format": "", "commit_url_format": "" }, "msgid": "<20260420200339.708640-4-vsementsov@yandex-team.ru>", "list_archive_url": null, "date": "2026-04-20T20:03:18", "name": "[v6,03/22] vhost-user: introduce vhost_user_has_protocol_feature() helper", "commit_ref": null, "pull_url": null, "state": "new", "archived": false, "hash": "0ae8de2632220cd0f611433a7a15bc531f7f2da4", "submitter": { "id": 84116, "url": "http://patchwork.ozlabs.org/api/1.2/people/84116/?format=api", "name": "Vladimir Sementsov-Ogievskiy", "email": "vsementsov@yandex-team.ru" }, "delegate": null, "mbox": "http://patchwork.ozlabs.org/project/qemu-devel/patch/20260420200339.708640-4-vsementsov@yandex-team.ru/mbox/", "series": [ { "id": 500672, "url": "http://patchwork.ozlabs.org/api/1.2/series/500672/?format=api", "web_url": "http://patchwork.ozlabs.org/project/qemu-devel/list/?series=500672", "date": "2026-04-20T20:03:18", "name": "vhost refactoring and fixes", "version": 6, "mbox": "http://patchwork.ozlabs.org/series/500672/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/2225292/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/2225292/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>", "X-Original-To": "incoming@patchwork.ozlabs.org", "Delivered-To": "patchwork-incoming@legolas.ozlabs.org", "Authentication-Results": [ "legolas.ozlabs.org;\n\tdkim=pass (1024-bit key;\n unprotected) header.d=yandex-team.ru header.i=@yandex-team.ru\n header.a=rsa-sha256 header.s=default header.b=Pi1D5+wj;\n\tdkim-atps=neutral", "legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org\n (client-ip=209.51.188.17; helo=lists1p.gnu.org;\n envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org;\n receiver=patchwork.ozlabs.org)", "mail-nwsmtp-smtp-corp-main-68.klg.yp-c.yandex.net;\n dkim=pass header.i=@yandex-team.ru" ], "Received": [ "from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17])\n\t(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4fzxK21Zj9z1yD4\n\tfor <incoming@patchwork.ozlabs.org>; Tue, 21 Apr 2026 06:04:22 +1000 (AEST)", "from localhost ([::1] helo=lists1p.gnu.org)\n\tby lists1p.gnu.org with esmtp (Exim 4.90_1)\n\t(envelope-from <qemu-devel-bounces@nongnu.org>)\n\tid 1wEuqt-0001QO-QV; Mon, 20 Apr 2026 16:04:18 -0400", "from eggs.gnu.org ([2001:470:142:3::10])\n by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)\n (Exim 4.90_1) (envelope-from <vsementsov@yandex-team.ru>)\n id 1wEuqf-0001KA-2n\n for qemu-devel@nongnu.org; Mon, 20 Apr 2026 16:04:04 -0400", "from forwardcorp1d.mail.yandex.net ([178.154.239.200])\n by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)\n (Exim 4.90_1) (envelope-from <vsementsov@yandex-team.ru>)\n id 1wEuqX-0001kS-Ka\n for qemu-devel@nongnu.org; Mon, 20 Apr 2026 16:03:57 -0400", "from mail-nwsmtp-smtp-corp-main-68.klg.yp-c.yandex.net\n (mail-nwsmtp-smtp-corp-main-68.klg.yp-c.yandex.net\n [IPv6:2a02:6b8:c42:94a9:0:640:a3fa:0])\n by forwardcorp1d.mail.yandex.net (Yandex) with ESMTPS id 57D2380663;\n Mon, 20 Apr 2026 23:03:52 +0300 (MSK)", "from vsementsov-lin (unknown [2a02:6bf:8080:54b::1:34])\n by mail-nwsmtp-smtp-corp-main-68.klg.yp-c.yandex.net (smtpcorp) with ESMTPSA\n id f3YMX10K1Sw0-hUBQjjhm; Mon, 20 Apr 2026 23:03:51 +0300" ], "Precedence": "bulk", "X-Yandex-Fwd": "1", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex-team.ru;\n s=default; t=1776715431;\n bh=wi8hBb/FxrPq6K5pIYsFChHST4eY8LX3PmM3S/gooyY=;\n h=Message-ID:Date:In-Reply-To:Cc:Subject:References:To:From;\n b=Pi1D5+wjB3yv3CuucS9KomuWQrVLm4PU5JBdMobGej/Q5W7+RG3HF8XC3Uc/5RKFm\n BM0ilmRF7uuuW0q3Qp6QlWGkVbh4LBLQW2SWcoQV/aTEB7bfv1tpXv6z2tbKqD/668\n OciqBzpWOxV9JxBiT6OzFayHJ4R2g8OzAFyJ6nA4=", "From": "Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>", "To": "mst@redhat.com", "Cc": "sgarzare@redhat.com, raphael@enfabrica.net, qemu-devel@nongnu.org,\n vsementsov@yandex-team.ru, yc-core@yandex-team.ru,\n d-tatianin@yandex-team.ru, Raphael Norwitz <raphael.s.norwitz@gmail.com>", "Subject": "[PATCH v6 03/22] vhost-user: introduce\n vhost_user_has_protocol_feature() helper", "Date": "Mon, 20 Apr 2026 23:03:18 +0300", "Message-ID": "<20260420200339.708640-4-vsementsov@yandex-team.ru>", "X-Mailer": "git-send-email 2.52.0", "In-Reply-To": "<20260420200339.708640-1-vsementsov@yandex-team.ru>", "References": "<20260420200339.708640-1-vsementsov@yandex-team.ru>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Received-SPF": "pass client-ip=178.154.239.200;\n envelope-from=vsementsov@yandex-team.ru; helo=forwardcorp1d.mail.yandex.net", "X-Spam_score_int": "-20", "X-Spam_score": "-2.1", "X-Spam_bar": "--", "X-Spam_report": "(-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1,\n DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_NONE=0.001,\n 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", "List-Id": "qemu development <qemu-devel.nongnu.org>", "List-Unsubscribe": "<https://lists.nongnu.org/mailman/options/qemu-devel>,\n <mailto:qemu-devel-request@nongnu.org?subject=unsubscribe>", "List-Archive": "<https://lists.nongnu.org/archive/html/qemu-devel>", "List-Post": "<mailto:qemu-devel@nongnu.org>", "List-Help": "<mailto:qemu-devel-request@nongnu.org?subject=help>", "List-Subscribe": "<https://lists.nongnu.org/mailman/listinfo/qemu-devel>,\n <mailto:qemu-devel-request@nongnu.org?subject=subscribe>", "Errors-To": "qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org", "Sender": "qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org" }, "content": "Make all protocol feature checks in the same way.\n\nSigned-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>\nReviewed-by: Daniil Tatianin <d-tatianin@yandex-team.ru>\nReviewed-by: Raphael Norwitz <raphael.s.norwitz@gmail.com>\n---\n hw/virtio/vhost-user.c | 120 +++++++++++++++++++++--------------------\n 1 file changed, 62 insertions(+), 58 deletions(-)", "diff": "diff --git a/hw/virtio/vhost-user.c b/hw/virtio/vhost-user.c\nindex 7ce17c5b2d8..72aeed26caa 100644\n--- a/hw/virtio/vhost-user.c\n+++ b/hw/virtio/vhost-user.c\n@@ -267,6 +267,12 @@ struct scrub_regions {\n int fd_idx;\n };\n \n+static bool vhost_user_has_protocol_feature(struct vhost_dev *dev,\n+ uint64_t feature)\n+{\n+ return virtio_has_feature(dev->protocol_features, feature);\n+}\n+\n static int vhost_user_read_header(struct vhost_dev *dev, VhostUserMsg *msg)\n {\n struct vhost_user *u = dev->opaque;\n@@ -430,8 +436,8 @@ static int vhost_user_set_log_base(struct vhost_dev *dev, uint64_t base,\n {\n int fds[VHOST_USER_MAX_RAM_SLOTS];\n size_t fd_num = 0;\n- bool shmfd = virtio_has_feature(dev->protocol_features,\n- VHOST_USER_PROTOCOL_F_LOG_SHMFD);\n+ bool shmfd =\n+ vhost_user_has_protocol_feature(dev, VHOST_USER_PROTOCOL_F_LOG_SHMFD);\n int ret;\n VhostUserMsg msg = {\n .hdr.request = VHOST_USER_SET_LOG_BASE,\n@@ -1001,11 +1007,11 @@ static int vhost_user_set_mem_table(struct vhost_dev *dev,\n int fds[VHOST_MEMORY_BASELINE_NREGIONS];\n size_t fd_num = 0;\n bool do_postcopy = u->postcopy_listen && u->postcopy_fd.handler;\n- bool reply_supported = virtio_has_feature(dev->protocol_features,\n- VHOST_USER_PROTOCOL_F_REPLY_ACK);\n+ bool reply_supported =\n+ vhost_user_has_protocol_feature(dev, VHOST_USER_PROTOCOL_F_REPLY_ACK);\n bool config_mem_slots =\n- virtio_has_feature(dev->protocol_features,\n- VHOST_USER_PROTOCOL_F_CONFIGURE_MEM_SLOTS);\n+ vhost_user_has_protocol_feature(\n+ dev, VHOST_USER_PROTOCOL_F_CONFIGURE_MEM_SLOTS);\n int ret;\n \n if (do_postcopy) {\n@@ -1053,8 +1059,9 @@ static int vhost_user_set_mem_table(struct vhost_dev *dev,\n static int vhost_user_set_vring_endian(struct vhost_dev *dev,\n struct vhost_vring_state *ring)\n {\n- bool cross_endian = virtio_has_feature(dev->protocol_features,\n- VHOST_USER_PROTOCOL_F_CROSS_ENDIAN);\n+ bool cross_endian =\n+ vhost_user_has_protocol_feature(\n+ dev, VHOST_USER_PROTOCOL_F_CROSS_ENDIAN);\n VhostUserMsg msg = {\n .hdr.request = VHOST_USER_SET_VRING_ENDIAN,\n .hdr.flags = VHOST_USER_VERSION,\n@@ -1124,8 +1131,9 @@ static int vhost_user_write_sync(struct vhost_dev *dev, VhostUserMsg *msg,\n int ret;\n \n if (wait_for_reply) {\n- bool reply_supported = virtio_has_feature(dev->protocol_features,\n- VHOST_USER_PROTOCOL_F_REPLY_ACK);\n+ bool reply_supported =\n+ vhost_user_has_protocol_feature(\n+ dev, VHOST_USER_PROTOCOL_F_REPLY_ACK);\n if (reply_supported) {\n msg->hdr.flags |= VHOST_USER_NEED_REPLY_MASK;\n }\n@@ -1475,8 +1483,7 @@ static int vhost_user_set_features(struct vhost_dev *dev,\n ret = vhost_user_set_u64(dev, VHOST_USER_SET_FEATURES, features,\n log_enabled);\n \n- if (virtio_has_feature(dev->protocol_features,\n- VHOST_USER_PROTOCOL_F_STATUS)) {\n+ if (vhost_user_has_protocol_feature(dev, VHOST_USER_PROTOCOL_F_STATUS)) {\n if (!ret) {\n return vhost_user_add_status(dev, VIRTIO_CONFIG_S_FEATURES_OK);\n }\n@@ -1530,8 +1537,8 @@ static int vhost_user_reset_device(struct vhost_dev *dev)\n * Historically, reset was not implemented so only reset devices\n * that are expecting it.\n */\n- if (!virtio_has_feature(dev->protocol_features,\n- VHOST_USER_PROTOCOL_F_RESET_DEVICE)) {\n+ if (!vhost_user_has_protocol_feature(\n+ dev, VHOST_USER_PROTOCOL_F_RESET_DEVICE)) {\n return -ENOSYS;\n }\n \n@@ -1588,8 +1595,8 @@ static int vhost_user_backend_handle_vring_host_notifier(struct vhost_dev *dev,\n void *addr;\n char *name;\n \n- if (!virtio_has_feature(dev->protocol_features,\n- VHOST_USER_PROTOCOL_F_HOST_NOTIFIER) ||\n+ if (!vhost_user_has_protocol_feature(\n+ dev, VHOST_USER_PROTOCOL_F_HOST_NOTIFIER) ||\n vdev == NULL || queue_idx >= virtio_get_num_queues(vdev)) {\n return -EINVAL;\n }\n@@ -1887,13 +1894,13 @@ static int vhost_setup_backend_channel(struct vhost_dev *dev)\n };\n struct vhost_user *u = dev->opaque;\n int sv[2], ret = 0;\n- bool reply_supported = virtio_has_feature(dev->protocol_features,\n- VHOST_USER_PROTOCOL_F_REPLY_ACK);\n+ bool reply_supported =\n+ vhost_user_has_protocol_feature(dev, VHOST_USER_PROTOCOL_F_REPLY_ACK);\n Error *local_err = NULL;\n QIOChannel *ioc;\n \n- if (!virtio_has_feature(dev->protocol_features,\n- VHOST_USER_PROTOCOL_F_BACKEND_REQ)) {\n+ if (!vhost_user_has_protocol_feature(\n+ dev, VHOST_USER_PROTOCOL_F_BACKEND_REQ)) {\n return 0;\n }\n \n@@ -2141,8 +2148,8 @@ static int vhost_user_postcopy_notifier(NotifierWithReturn *notifier,\n \n switch (pnd->reason) {\n case POSTCOPY_NOTIFY_PROBE:\n- if (!virtio_has_feature(dev->protocol_features,\n- VHOST_USER_PROTOCOL_F_PAGEFAULT)) {\n+ if (!vhost_user_has_protocol_feature(\n+ dev, VHOST_USER_PROTOCOL_F_PAGEFAULT)) {\n /* TODO: Get the device name into this error somehow */\n error_setg(errp,\n \"vhost-user backend not capable of postcopy\");\n@@ -2240,7 +2247,7 @@ static int vhost_user_backend_init(struct vhost_dev *dev, void *opaque,\n }\n \n /* query the max queues we support if backend supports Multiple Queue */\n- if (dev->protocol_features & (1ULL << VHOST_USER_PROTOCOL_F_MQ)) {\n+ if (vhost_user_has_protocol_feature(dev, VHOST_USER_PROTOCOL_F_MQ)) {\n err = vhost_user_get_u64(dev, VHOST_USER_GET_QUEUE_NUM,\n &dev->max_queues);\n if (err < 0) {\n@@ -2258,18 +2265,18 @@ static int vhost_user_backend_init(struct vhost_dev *dev, void *opaque,\n }\n \n if (virtio_has_feature(features, VIRTIO_F_IOMMU_PLATFORM) &&\n- !(virtio_has_feature(dev->protocol_features,\n- VHOST_USER_PROTOCOL_F_BACKEND_REQ) &&\n- virtio_has_feature(dev->protocol_features,\n- VHOST_USER_PROTOCOL_F_REPLY_ACK))) {\n+ !(vhost_user_has_protocol_feature(\n+ dev, VHOST_USER_PROTOCOL_F_BACKEND_REQ) &&\n+ vhost_user_has_protocol_feature(\n+ dev, VHOST_USER_PROTOCOL_F_REPLY_ACK))) {\n error_setg(errp, \"IOMMU support requires reply-ack and \"\n \"backend-req protocol features.\");\n return -EINVAL;\n }\n \n /* get max memory regions if backend supports configurable RAM slots */\n- if (!virtio_has_feature(dev->protocol_features,\n- VHOST_USER_PROTOCOL_F_CONFIGURE_MEM_SLOTS)) {\n+ if (!vhost_user_has_protocol_feature(\n+ dev, VHOST_USER_PROTOCOL_F_CONFIGURE_MEM_SLOTS)) {\n u->user->memory_slots = VHOST_MEMORY_BASELINE_NREGIONS;\n } else {\n err = vhost_user_get_max_memslots(dev, &ram_slots);\n@@ -2293,8 +2300,8 @@ static int vhost_user_backend_init(struct vhost_dev *dev, void *opaque,\n }\n \n if (dev->migration_blocker == NULL &&\n- !virtio_has_feature(dev->protocol_features,\n- VHOST_USER_PROTOCOL_F_LOG_SHMFD)) {\n+ !vhost_user_has_protocol_feature(\n+ dev, VHOST_USER_PROTOCOL_F_LOG_SHMFD)) {\n error_setg(&dev->migration_blocker,\n \"Migration disabled: vhost-user backend lacks \"\n \"VHOST_USER_PROTOCOL_F_LOG_SHMFD feature.\");\n@@ -2363,8 +2370,8 @@ static bool vhost_user_requires_shm_log(struct vhost_dev *dev)\n {\n assert(dev->vhost_ops->backend_type == VHOST_BACKEND_TYPE_USER);\n \n- return virtio_has_feature(dev->protocol_features,\n- VHOST_USER_PROTOCOL_F_LOG_SHMFD);\n+ return vhost_user_has_protocol_feature(\n+ dev, VHOST_USER_PROTOCOL_F_LOG_SHMFD);\n }\n \n static int vhost_user_migration_done(struct vhost_dev *dev, char* mac_addr)\n@@ -2379,8 +2386,7 @@ static int vhost_user_migration_done(struct vhost_dev *dev, char* mac_addr)\n }\n \n /* if backend supports VHOST_USER_PROTOCOL_F_RARP ask it to send the RARP */\n- if (virtio_has_feature(dev->protocol_features,\n- VHOST_USER_PROTOCOL_F_RARP)) {\n+ if (vhost_user_has_protocol_feature(dev, VHOST_USER_PROTOCOL_F_RARP)) {\n msg.hdr.request = VHOST_USER_SEND_RARP;\n msg.hdr.flags = VHOST_USER_VERSION;\n memcpy((char *)&msg.payload.u64, mac_addr, 6);\n@@ -2394,11 +2400,11 @@ static int vhost_user_migration_done(struct vhost_dev *dev, char* mac_addr)\n static int vhost_user_net_set_mtu(struct vhost_dev *dev, uint16_t mtu)\n {\n VhostUserMsg msg;\n- bool reply_supported = virtio_has_feature(dev->protocol_features,\n- VHOST_USER_PROTOCOL_F_REPLY_ACK);\n+ bool reply_supported =\n+ vhost_user_has_protocol_feature(dev, VHOST_USER_PROTOCOL_F_REPLY_ACK);\n int ret;\n \n- if (!(dev->protocol_features & (1ULL << VHOST_USER_PROTOCOL_F_NET_MTU))) {\n+ if (!vhost_user_has_protocol_feature(dev, VHOST_USER_PROTOCOL_F_NET_MTU)) {\n return 0;\n }\n \n@@ -2458,8 +2464,7 @@ static int vhost_user_get_config(struct vhost_dev *dev, uint8_t *config,\n .hdr.size = VHOST_USER_CONFIG_HDR_SIZE + config_len,\n };\n \n- if (!virtio_has_feature(dev->protocol_features,\n- VHOST_USER_PROTOCOL_F_CONFIG)) {\n+ if (!vhost_user_has_protocol_feature(dev, VHOST_USER_PROTOCOL_F_CONFIG)) {\n error_setg(errp, \"VHOST_USER_PROTOCOL_F_CONFIG not supported\");\n return -EINVAL;\n }\n@@ -2502,8 +2507,8 @@ static int vhost_user_set_config(struct vhost_dev *dev, const uint8_t *data,\n {\n int ret;\n uint8_t *p;\n- bool reply_supported = virtio_has_feature(dev->protocol_features,\n- VHOST_USER_PROTOCOL_F_REPLY_ACK);\n+ bool reply_supported =\n+ vhost_user_has_protocol_feature(dev, VHOST_USER_PROTOCOL_F_REPLY_ACK);\n \n VhostUserMsg msg = {\n .hdr.request = VHOST_USER_SET_CONFIG,\n@@ -2511,8 +2516,7 @@ static int vhost_user_set_config(struct vhost_dev *dev, const uint8_t *data,\n .hdr.size = VHOST_USER_CONFIG_HDR_SIZE + size,\n };\n \n- if (!virtio_has_feature(dev->protocol_features,\n- VHOST_USER_PROTOCOL_F_CONFIG)) {\n+ if (!vhost_user_has_protocol_feature(dev, VHOST_USER_PROTOCOL_F_CONFIG)) {\n return -ENOTSUP;\n }\n \n@@ -2547,8 +2551,9 @@ static int vhost_user_crypto_create_session(struct vhost_dev *dev,\n uint64_t *session_id)\n {\n int ret;\n- bool crypto_session = virtio_has_feature(dev->protocol_features,\n- VHOST_USER_PROTOCOL_F_CRYPTO_SESSION);\n+ bool crypto_session =\n+ vhost_user_has_protocol_feature(\n+ dev, VHOST_USER_PROTOCOL_F_CRYPTO_SESSION);\n CryptoDevBackendSessionInfo *backend_info = session_info;\n VhostUserMsg msg = {\n .hdr.request = VHOST_USER_CREATE_CRYPTO_SESSION,\n@@ -2649,8 +2654,9 @@ static int\n vhost_user_crypto_close_session(struct vhost_dev *dev, uint64_t session_id)\n {\n int ret;\n- bool crypto_session = virtio_has_feature(dev->protocol_features,\n- VHOST_USER_PROTOCOL_F_CRYPTO_SESSION);\n+ bool crypto_session =\n+ vhost_user_has_protocol_feature(\n+ dev, VHOST_USER_PROTOCOL_F_CRYPTO_SESSION);\n VhostUserMsg msg = {\n .hdr.request = VHOST_USER_CLOSE_CRYPTO_SESSION,\n .hdr.flags = VHOST_USER_VERSION,\n@@ -2695,8 +2701,8 @@ static int vhost_user_get_inflight_fd(struct vhost_dev *dev,\n .hdr.size = sizeof(msg.payload.inflight),\n };\n \n- if (!virtio_has_feature(dev->protocol_features,\n- VHOST_USER_PROTOCOL_F_INFLIGHT_SHMFD)) {\n+ if (!vhost_user_has_protocol_feature(\n+ dev, VHOST_USER_PROTOCOL_F_INFLIGHT_SHMFD)) {\n return 0;\n }\n \n@@ -2763,8 +2769,8 @@ static int vhost_user_set_inflight_fd(struct vhost_dev *dev,\n .hdr.size = sizeof(msg.payload.inflight),\n };\n \n- if (!virtio_has_feature(dev->protocol_features,\n- VHOST_USER_PROTOCOL_F_INFLIGHT_SHMFD)) {\n+ if (!vhost_user_has_protocol_feature(\n+ dev, VHOST_USER_PROTOCOL_F_INFLIGHT_SHMFD)) {\n return 0;\n }\n \n@@ -2863,8 +2869,7 @@ void vhost_user_async_close(DeviceState *d,\n \n static int vhost_user_dev_start(struct vhost_dev *dev, bool started)\n {\n- if (!virtio_has_feature(dev->protocol_features,\n- VHOST_USER_PROTOCOL_F_STATUS)) {\n+ if (!vhost_user_has_protocol_feature(dev, VHOST_USER_PROTOCOL_F_STATUS)) {\n return 0;\n }\n \n@@ -2889,16 +2894,15 @@ static void vhost_user_reset_status(struct vhost_dev *dev)\n return;\n }\n \n- if (virtio_has_feature(dev->protocol_features,\n- VHOST_USER_PROTOCOL_F_STATUS)) {\n+ if (vhost_user_has_protocol_feature(dev, VHOST_USER_PROTOCOL_F_STATUS)) {\n vhost_user_set_status(dev, 0);\n }\n }\n \n static bool vhost_user_supports_device_state(struct vhost_dev *dev)\n {\n- return virtio_has_feature(dev->protocol_features,\n- VHOST_USER_PROTOCOL_F_DEVICE_STATE);\n+ return vhost_user_has_protocol_feature(\n+ dev, VHOST_USER_PROTOCOL_F_DEVICE_STATE);\n }\n \n static int vhost_user_set_device_state_fd(struct vhost_dev *dev,\n", "prefixes": [ "v6", "03/22" ] }