From nobody Tue Nov 26 20:34:29 2024 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 ARC-Seal: i=1; a=rsa-sha256; t=1704385440; cv=none; d=zohomail.com; s=zohoarc; b=Ou/0Ph7QfOQrNlzVPo8kF/Tztv5/3kX0E5SZeey9pVEymlx6kVgFC1+8BQM4Rp71EJLqInAZjezmbvmfUNmUkx+ET3GM10nIXSOsfThCZ/iXp4U2Lp3yfSfdO872IEaV1fyggWuMx5BHMTAbAsv5O4KuVmQDPYK67kEWvuyz/+s= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1704385440; 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=EfKxUYQ13A2io63U/z9C73GpW8G5JHBFo6kLrV4HbDU=; b=DKtZ7NWVeihId+3gzjufkCeE9vyTxGdVv/rA6+lTlt1ITzxGjOFoVN7UMtasmPFoXLpy45N8zQVHRBKSLmZBiYI1bM7WHx6EXR1KsLByV2uBR6dHuOFRlOdFLpmA9XupfgLC/pa8dzILKFgslE/nvtM6VKgmS4KoqHZ0w0AT8Y8= 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 Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1704385440657475.20852262677147; Thu, 4 Jan 2024 08:24:00 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rLQUv-0000wC-7H; Thu, 04 Jan 2024 11:23:09 -0500 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 1rLQUr-0000vb-CE for qemu-devel@nongnu.org; Thu, 04 Jan 2024 11:23:05 -0500 Received: from mail-pl1-x632.google.com ([2607:f8b0:4864:20::632]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rLQUo-0006Dq-La for qemu-devel@nongnu.org; Thu, 04 Jan 2024 11:23:05 -0500 Received: by mail-pl1-x632.google.com with SMTP id d9443c01a7336-1d3e05abcaeso4492855ad.1 for ; Thu, 04 Jan 2024 08:21:02 -0800 (PST) Received: from localhost.localdomain ([118.114.59.173]) by smtp.gmail.com with ESMTPSA id 5-20020a170902ee4500b001d06b63bb98sm25987314plo.71.2024.01.04.08.20.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 04 Jan 2024 08:21:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=smartx-com.20230601.gappssmtp.com; s=20230601; t=1704385261; x=1704990061; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=EfKxUYQ13A2io63U/z9C73GpW8G5JHBFo6kLrV4HbDU=; b=aEq4WzqjgfdGtZ61ql8SYzQhD1yzpv2dXWtmpuVdKLFw1OsL+gt5+Du+FJgXYCmQpw 3yPTtAKNnN3W1sa/iypBF0YbEXL28EOyPnuaX7fHt6NAYuMAGVGrmGspU3J3SilICZy7 O8Oor/JPgjFWO133eMSGU4zOX0fvnDhMqSyFEQ7NydfKYMbFlFI9k/wb+PwPx594UeUM FzxQsLSCIAs/SuDCz2oX4Pw8RdfjqjQhIUdyf0kLwFOUG3rY2T1mFFPMJyRtOE9jaWGy ApT/4m/2pWdJbIV/8r5ezRbDB55fCStei/z0jzgR2+pP4BQ0jchAes5RRy1+ArUuUzR1 GOLg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704385261; x=1704990061; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=EfKxUYQ13A2io63U/z9C73GpW8G5JHBFo6kLrV4HbDU=; b=mazI79SDE9g9qsD91zyGtd8I6iUrplUY8wUIdxSWDINA9w/GZm0nQJTEut3yjLZo1u AVYPPswX1iJ455dYiVPmCrPHT5ahvF8OumDR0Op1l1fKzddMXqM59td3YQ9+8FVI6TRS Yl65BCMEQMyVpR3zHJrlfm5HMzDYasC3HRz79jZomin/RDCwSLk5/9ZwUCIjAZyclDlS 78FodKbpyR54nIAMBLwcXodtDzbphATcgOL8dYFMBcwovMh6h0+HOLVh/rd958QMB1FE w187TAkmIjaOdBahd2M96dbhMaEQFbumiQhvlQomN71/EiG1mvwNsGvVpbEoTUNHUbvB vBtg== X-Gm-Message-State: AOJu0YzcnXzdU2Q6fFeWfn8oYsdIz4oqASOZjKjNRyU2Yi93h76TmKzy SoOBcqwGU0Z7fiKWF1awd4A2S3kQcDV6tQ4XpvbWHvTtoUoqYyjl X-Google-Smtp-Source: AGHT+IGNzcPTu4+zn1oaFY3TpZDHl0+RbL/yyilQbx5x+dmRSUu97Lm8UnTROnvw5ZrDpvyDtiKu1Q== X-Received: by 2002:a17:903:228f:b0:1d4:cb8c:fafe with SMTP id b15-20020a170903228f00b001d4cb8cfafemr785329plh.74.1704385260420; Thu, 04 Jan 2024 08:21:00 -0800 (PST) From: Hyman Huang To: qemu-devel@nongnu.org Cc: "Michael S . Tsirkin" , Markus Armbruster , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Eric Blake , yong.huang@smartx.com Subject: [PATCH v2 1/2] qapi/virtio: Keep feature and status bits in the QMP output Date: Fri, 5 Jan 2024 00:19:34 +0800 Message-Id: <5a4bda9178716939cb641d40f9e628dc44209576.1704382761.git.yong.huang@smartx.com> X-Mailer: git-send-email 2.39.1 In-Reply-To: References: 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: none client-ip=2607:f8b0:4864:20::632; envelope-from=yong.huang@smartx.com; helo=mail-pl1-x632.google.com 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, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_NONE=0.001, T_SCC_BODY_TEXT_LINE=-0.01 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 @smartx-com.20230601.gappssmtp.com) X-ZM-MESSAGEID: 1704385441908100003 Content-Type: text/plain; charset="utf-8" Maintain the feature and status bits in the x-query-virtio-status output and, as usual, add human-readable output only in HMP. Applications may find it useful to compare features and status information directly. An upper application, for example, could use the QMP command x-query-virtio-status to retrieve vhost-user net device features and the "ovs-vsctl list interface" command to retrieve interface features (in number format) in order to verify the correctness of the virtio negotiation between guest, QEMU, and OVS-DPDK. The application could then compare the two features directly, without the need for additional feature encoding. Signed-off-by: Hyman Huang --- hw/virtio/virtio-hmp-cmds.c | 29 ++++-- hw/virtio/virtio-qmp.c | 23 ++--- qapi/virtio.json | 192 ++++-------------------------------- 3 files changed, 48 insertions(+), 196 deletions(-) diff --git a/hw/virtio/virtio-hmp-cmds.c b/hw/virtio/virtio-hmp-cmds.c index 477c97dea2..4fabba4f9c 100644 --- a/hw/virtio/virtio-hmp-cmds.c +++ b/hw/virtio/virtio-hmp-cmds.c @@ -6,6 +6,7 @@ */ =20 #include "qemu/osdep.h" +#include "virtio-qmp.h" #include "monitor/hmp.h" #include "monitor/monitor.h" #include "qapi/qapi-commands-virtio.h" @@ -13,8 +14,10 @@ =20 =20 static void hmp_virtio_dump_protocols(Monitor *mon, - VhostDeviceProtocols *pcol) + uint64_t bitmap) { + VhostDeviceProtocols *pcol =3D qmp_decode_protocols(bitmap); + strList *pcol_list =3D pcol->protocols; while (pcol_list) { monitor_printf(mon, "\t%s", pcol_list->value); @@ -31,8 +34,10 @@ static void hmp_virtio_dump_protocols(Monitor *mon, } =20 static void hmp_virtio_dump_status(Monitor *mon, - VirtioDeviceStatus *status) + uint64_t bitmap) { + VirtioDeviceStatus *status =3D qmp_decode_status(bitmap); + strList *status_list =3D status->statuses; while (status_list) { monitor_printf(mon, "\t%s", status_list->value); @@ -49,8 +54,12 @@ static void hmp_virtio_dump_status(Monitor *mon, } =20 static void hmp_virtio_dump_features(Monitor *mon, - VirtioDeviceFeatures *features) + uint16_t device_id, + uint64_t bitmap) { + VirtioDeviceFeatures *features =3D + qmp_decode_features(device_id, bitmap); + strList *transport_list =3D features->transports; while (transport_list) { monitor_printf(mon, "\t%s", transport_list->value); @@ -147,11 +156,11 @@ void hmp_virtio_status(Monitor *mon, const QDict *qdi= ct) monitor_printf(mon, " status:\n"); hmp_virtio_dump_status(mon, s->status); monitor_printf(mon, " Guest features:\n"); - hmp_virtio_dump_features(mon, s->guest_features); + hmp_virtio_dump_features(mon, s->device_id, s->guest_features); monitor_printf(mon, " Host features:\n"); - hmp_virtio_dump_features(mon, s->host_features); + hmp_virtio_dump_features(mon, s->device_id, s->host_features); monitor_printf(mon, " Backend features:\n"); - hmp_virtio_dump_features(mon, s->backend_features); + hmp_virtio_dump_features(mon, s->device_id, s->backend_features); =20 if (s->vhost_dev) { monitor_printf(mon, " VHost:\n"); @@ -172,11 +181,13 @@ void hmp_virtio_status(Monitor *mon, const QDict *qdi= ct) monitor_printf(mon, " log_size: %"PRId64"\n", s->vhost_dev->log_size); monitor_printf(mon, " Features:\n"); - hmp_virtio_dump_features(mon, s->vhost_dev->features); + hmp_virtio_dump_features(mon, s->device_id, s->vhost_dev->features= ); monitor_printf(mon, " Acked features:\n"); - hmp_virtio_dump_features(mon, s->vhost_dev->acked_features); + hmp_virtio_dump_features(mon, + s->device_id, s->vhost_dev->acked_features); monitor_printf(mon, " Backend features:\n"); - hmp_virtio_dump_features(mon, s->vhost_dev->backend_features); + hmp_virtio_dump_features(mon, + s->device_id, s->vhost_dev->backend_features); monitor_printf(mon, " Protocol features:\n"); hmp_virtio_dump_protocols(mon, s->vhost_dev->protocol_features); } diff --git a/hw/virtio/virtio-qmp.c b/hw/virtio/virtio-qmp.c index 1dd96ed20f..1660c17653 100644 --- a/hw/virtio/virtio-qmp.c +++ b/hw/virtio/virtio-qmp.c @@ -733,12 +733,9 @@ VirtioStatus *qmp_x_query_virtio_status(const char *pa= th, Error **errp) status->name =3D g_strdup(vdev->name); status->device_id =3D vdev->device_id; status->vhost_started =3D vdev->vhost_started; - status->guest_features =3D qmp_decode_features(vdev->device_id, - vdev->guest_features); - status->host_features =3D qmp_decode_features(vdev->device_id, - vdev->host_features); - status->backend_features =3D qmp_decode_features(vdev->device_id, - vdev->backend_features); + status->guest_features =3D vdev->guest_features; + status->host_features =3D vdev->host_features; + status->backend_features =3D vdev->backend_features; =20 switch (vdev->device_endian) { case VIRTIO_DEVICE_ENDIAN_LITTLE: @@ -753,7 +750,7 @@ VirtioStatus *qmp_x_query_virtio_status(const char *pat= h, Error **errp) } =20 status->num_vqs =3D virtio_get_num_queues(vdev); - status->status =3D qmp_decode_status(vdev->status); + status->status =3D vdev->status; status->isr =3D vdev->isr; status->queue_sel =3D vdev->queue_sel; status->vm_running =3D vdev->vm_running; @@ -775,14 +772,10 @@ VirtioStatus *qmp_x_query_virtio_status(const char *p= ath, Error **errp) status->vhost_dev->n_tmp_sections =3D hdev->n_tmp_sections; status->vhost_dev->nvqs =3D hdev->nvqs; status->vhost_dev->vq_index =3D hdev->vq_index; - status->vhost_dev->features =3D - qmp_decode_features(vdev->device_id, hdev->features); - status->vhost_dev->acked_features =3D - qmp_decode_features(vdev->device_id, hdev->acked_features); - status->vhost_dev->backend_features =3D - qmp_decode_features(vdev->device_id, hdev->backend_features); - status->vhost_dev->protocol_features =3D - qmp_decode_protocols(hdev->protocol_features); + status->vhost_dev->features =3D hdev->features; + status->vhost_dev->acked_features =3D hdev->acked_features; + status->vhost_dev->backend_features =3D hdev->backend_features; + status->vhost_dev->protocol_features =3D hdev->protocol_features; status->vhost_dev->max_queues =3D hdev->max_queues; status->vhost_dev->backend_cap =3D hdev->backend_cap; status->vhost_dev->log_enabled =3D hdev->log_enabled; diff --git a/qapi/virtio.json b/qapi/virtio.json index 19c7c36e36..26516fb29c 100644 --- a/qapi/virtio.json +++ b/qapi/virtio.json @@ -102,10 +102,10 @@ 'n-tmp-sections': 'int', 'nvqs': 'uint32', 'vq-index': 'int', - 'features': 'VirtioDeviceFeatures', - 'acked-features': 'VirtioDeviceFeatures', - 'backend-features': 'VirtioDeviceFeatures', - 'protocol-features': 'VhostDeviceProtocols', + 'features': 'uint64', + 'acked-features': 'uint64', + 'backend-features': 'uint64', + 'protocol-features': 'uint64', 'max-queues': 'uint64', 'backend-cap': 'uint64', 'log-enabled': 'bool', @@ -170,11 +170,11 @@ 'device-id': 'uint16', 'vhost-started': 'bool', 'device-endian': 'str', - 'guest-features': 'VirtioDeviceFeatures', - 'host-features': 'VirtioDeviceFeatures', - 'backend-features': 'VirtioDeviceFeatures', + 'guest-features': 'uint64', + 'host-features': 'uint64', + 'backend-features': 'uint64', 'num-vqs': 'int', - 'status': 'VirtioDeviceStatus', + 'status': 'uint8', 'isr': 'uint8', 'queue-sel': 'uint16', 'vm-running': 'bool', @@ -217,41 +217,14 @@ # "name": "virtio-crypto", # "started": true, # "device-id": 20, -# "backend-features": { -# "transports": [], -# "dev-features": [] -# }, +# "backend-features": 0, # "start-on-kick": false, # "isr": 1, # "broken": false, -# "status": { -# "statuses": [ -# "VIRTIO_CONFIG_S_ACKNOWLEDGE: Valid virtio device found= ", -# "VIRTIO_CONFIG_S_DRIVER: Guest OS compatible with devic= e", -# "VIRTIO_CONFIG_S_FEATURES_OK: Feature negotiation compl= ete", -# "VIRTIO_CONFIG_S_DRIVER_OK: Driver setup and ready" -# ] -# }, +# "status": 15, # "num-vqs": 2, -# "guest-features": { -# "dev-features": [], -# "transports": [ -# "VIRTIO_RING_F_EVENT_IDX: Used & avail. event fields en= abled", -# "VIRTIO_RING_F_INDIRECT_DESC: Indirect descriptors supp= orted", -# "VIRTIO_F_VERSION_1: Device compliant for v1 spec (lega= cy)" -# ] -# }, -# "host-features": { -# "unknown-dev-features": 1073741824, -# "dev-features": [], -# "transports": [ -# "VIRTIO_RING_F_EVENT_IDX: Used & avail. event fields en= abled", -# "VIRTIO_RING_F_INDIRECT_DESC: Indirect descriptors supp= orted", -# "VIRTIO_F_VERSION_1: Device compliant for v1 spec (lega= cy)", -# "VIRTIO_F_ANY_LAYOUT: Device accepts arbitrary desc. la= youts", -# "VIRTIO_F_NOTIFY_ON_EMPTY: Notify when device runs out = of avail. descs. on VQ" -# ] -# }, +# "guest-features": 5100273664, +# "host-features": 6325010432, # "use-guest-notifier-mask": true, # "vm-running": true, # "queue-sel": 1, @@ -279,147 +252,22 @@ # "max-queues": 1, # "backend-cap": 2, # "log-size": 0, -# "backend-features": { -# "dev-features": [], -# "transports": [] -# }, +# "backend-features": 0, # "nvqs": 2, -# "protocol-features": { -# "protocols": [] -# }, +# "protocol-features": 0, # "vq-index": 0, # "log-enabled": false, -# "acked-features": { -# "dev-features": [ -# "VIRTIO_NET_F_MRG_RXBUF: Driver can merge receive b= uffers" -# ], -# "transports": [ -# "VIRTIO_RING_F_EVENT_IDX: Used & avail. event field= s enabled", -# "VIRTIO_RING_F_INDIRECT_DESC: Indirect descriptors = supported", -# "VIRTIO_F_VERSION_1: Device compliant for v1 spec (= legacy)" -# ] -# }, -# "features": { -# "dev-features": [ -# "VHOST_F_LOG_ALL: Logging write descriptors support= ed", -# "VIRTIO_NET_F_MRG_RXBUF: Driver can merge receive b= uffers" -# ], -# "transports": [ -# "VIRTIO_RING_F_EVENT_IDX: Used & avail. event field= s enabled", -# "VIRTIO_RING_F_INDIRECT_DESC: Indirect descriptors = supported", -# "VIRTIO_F_IOMMU_PLATFORM: Device can be used on IOM= MU platform", -# "VIRTIO_F_VERSION_1: Device compliant for v1 spec (= legacy)", -# "VIRTIO_F_ANY_LAYOUT: Device accepts arbitrary desc= . layouts", -# "VIRTIO_F_NOTIFY_ON_EMPTY: Notify when device runs = out of avail. descs. on VQ" -# ] -# } -# }, -# "backend-features": { -# "dev-features": [ -# "VHOST_USER_F_PROTOCOL_FEATURES: Vhost-user protocol fe= atures negotiation supported", -# "VIRTIO_NET_F_GSO: Handling GSO-type packets supported", -# "VIRTIO_NET_F_CTRL_MAC_ADDR: MAC address set through co= ntrol channel", -# "VIRTIO_NET_F_GUEST_ANNOUNCE: Driver sending gratuitous= packets supported", -# "VIRTIO_NET_F_CTRL_RX_EXTRA: Extra RX mode control supp= orted", -# "VIRTIO_NET_F_CTRL_VLAN: Control channel VLAN filtering= supported", -# "VIRTIO_NET_F_CTRL_RX: Control channel RX mode supporte= d", -# "VIRTIO_NET_F_CTRL_VQ: Control channel available", -# "VIRTIO_NET_F_STATUS: Configuration status field availa= ble", -# "VIRTIO_NET_F_MRG_RXBUF: Driver can merge receive buffe= rs", -# "VIRTIO_NET_F_HOST_UFO: Device can receive UFO", -# "VIRTIO_NET_F_HOST_ECN: Device can receive TSO with ECN= ", -# "VIRTIO_NET_F_HOST_TSO6: Device can receive TSOv6", -# "VIRTIO_NET_F_HOST_TSO4: Device can receive TSOv4", -# "VIRTIO_NET_F_GUEST_UFO: Driver can receive UFO", -# "VIRTIO_NET_F_GUEST_ECN: Driver can receive TSO with EC= N", -# "VIRTIO_NET_F_GUEST_TSO6: Driver can receive TSOv6", -# "VIRTIO_NET_F_GUEST_TSO4: Driver can receive TSOv4", -# "VIRTIO_NET_F_MAC: Device has given MAC address", -# "VIRTIO_NET_F_CTRL_GUEST_OFFLOADS: Control channel offl= oading reconfig. supported", -# "VIRTIO_NET_F_GUEST_CSUM: Driver handling packets with = partial checksum supported", -# "VIRTIO_NET_F_CSUM: Device handling packets with partia= l checksum supported" -# ], -# "transports": [ -# "VIRTIO_RING_F_EVENT_IDX: Used & avail. event fields en= abled", -# "VIRTIO_RING_F_INDIRECT_DESC: Indirect descriptors supp= orted", -# "VIRTIO_F_VERSION_1: Device compliant for v1 spec (lega= cy)", -# "VIRTIO_F_ANY_LAYOUT: Device accepts arbitrary desc. la= youts", -# "VIRTIO_F_NOTIFY_ON_EMPTY: Notify when device runs out = of avail. descs. on VQ" -# ] +# "acked-features": 5100306432, +# "features": 13908344832, # }, +# "backend-features": 6337593319, # "start-on-kick": false, # "isr": 1, # "broken": false, -# "status": { -# "statuses": [ -# "VIRTIO_CONFIG_S_ACKNOWLEDGE: Valid virtio device found= ", -# "VIRTIO_CONFIG_S_DRIVER: Guest OS compatible with devic= e", -# "VIRTIO_CONFIG_S_FEATURES_OK: Feature negotiation compl= ete", -# "VIRTIO_CONFIG_S_DRIVER_OK: Driver setup and ready" -# ] -# }, +# "status": 15, # "num-vqs": 3, -# "guest-features": { -# "dev-features": [ -# "VIRTIO_NET_F_CTRL_MAC_ADDR: MAC address set through co= ntrol channel", -# "VIRTIO_NET_F_GUEST_ANNOUNCE: Driver sending gratuitous= packets supported", -# "VIRTIO_NET_F_CTRL_VLAN: Control channel VLAN filtering= supported", -# "VIRTIO_NET_F_CTRL_RX: Control channel RX mode supporte= d", -# "VIRTIO_NET_F_CTRL_VQ: Control channel available", -# "VIRTIO_NET_F_STATUS: Configuration status field availa= ble", -# "VIRTIO_NET_F_MRG_RXBUF: Driver can merge receive buffe= rs", -# "VIRTIO_NET_F_HOST_UFO: Device can receive UFO", -# "VIRTIO_NET_F_HOST_ECN: Device can receive TSO with ECN= ", -# "VIRTIO_NET_F_HOST_TSO6: Device can receive TSOv6", -# "VIRTIO_NET_F_HOST_TSO4: Device can receive TSOv4", -# "VIRTIO_NET_F_GUEST_UFO: Driver can receive UFO", -# "VIRTIO_NET_F_GUEST_ECN: Driver can receive TSO with EC= N", -# "VIRTIO_NET_F_GUEST_TSO6: Driver can receive TSOv6", -# "VIRTIO_NET_F_GUEST_TSO4: Driver can receive TSOv4", -# "VIRTIO_NET_F_MAC: Device has given MAC address", -# "VIRTIO_NET_F_CTRL_GUEST_OFFLOADS: Control channel offl= oading reconfig. supported", -# "VIRTIO_NET_F_GUEST_CSUM: Driver handling packets with = partial checksum supported", -# "VIRTIO_NET_F_CSUM: Device handling packets with partia= l checksum supported" -# ], -# "transports": [ -# "VIRTIO_RING_F_EVENT_IDX: Used & avail. event fields en= abled", -# "VIRTIO_RING_F_INDIRECT_DESC: Indirect descriptors supp= orted", -# "VIRTIO_F_VERSION_1: Device compliant for v1 spec (lega= cy)" -# ] -# }, -# "host-features": { -# "dev-features": [ -# "VHOST_USER_F_PROTOCOL_FEATURES: Vhost-user protocol fe= atures negotiation supported", -# "VIRTIO_NET_F_GSO: Handling GSO-type packets supported", -# "VIRTIO_NET_F_CTRL_MAC_ADDR: MAC address set through co= ntrol channel", -# "VIRTIO_NET_F_GUEST_ANNOUNCE: Driver sending gratuitous= packets supported", -# "VIRTIO_NET_F_CTRL_RX_EXTRA: Extra RX mode control supp= orted", -# "VIRTIO_NET_F_CTRL_VLAN: Control channel VLAN filtering= supported", -# "VIRTIO_NET_F_CTRL_RX: Control channel RX mode supporte= d", -# "VIRTIO_NET_F_CTRL_VQ: Control channel available", -# "VIRTIO_NET_F_STATUS: Configuration status field availa= ble", -# "VIRTIO_NET_F_MRG_RXBUF: Driver can merge receive buffe= rs", -# "VIRTIO_NET_F_HOST_UFO: Device can receive UFO", -# "VIRTIO_NET_F_HOST_ECN: Device can receive TSO with ECN= ", -# "VIRTIO_NET_F_HOST_TSO6: Device can receive TSOv6", -# "VIRTIO_NET_F_HOST_TSO4: Device can receive TSOv4", -# "VIRTIO_NET_F_GUEST_UFO: Driver can receive UFO", -# "VIRTIO_NET_F_GUEST_ECN: Driver can receive TSO with EC= N", -# "VIRTIO_NET_F_GUEST_TSO6: Driver can receive TSOv6", -# "VIRTIO_NET_F_GUEST_TSO4: Driver can receive TSOv4", -# "VIRTIO_NET_F_MAC: Device has given MAC address", -# "VIRTIO_NET_F_CTRL_GUEST_OFFLOADS: Control channel offl= oading reconfig. supported", -# "VIRTIO_NET_F_GUEST_CSUM: Driver handling packets with = partial checksum supported", -# "VIRTIO_NET_F_CSUM: Device handling packets with partia= l checksum supported" -# ], -# "transports": [ -# "VIRTIO_RING_F_EVENT_IDX: Used & avail. event fields en= abled", -# "VIRTIO_RING_F_INDIRECT_DESC: Indirect descriptors supp= orted", -# "VIRTIO_F_VERSION_1: Device compliant for v1 spec (lega= cy)", -# "VIRTIO_F_ANY_LAYOUT: Device accepts arbitrary desc. la= youts", -# "VIRTIO_F_NOTIFY_ON_EMPTY: Notify when device runs out = of avail. descs. on VQ" -# ] -# }, +# "guest-features": 5111807911, +# "host-features": 6337593319, # "use-guest-notifier-mask": true, # "vm-running": true, # "queue-sel": 2, --=20 2.39.1 From nobody Tue Nov 26 20:34:29 2024 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 ARC-Seal: i=1; a=rsa-sha256; t=1704385440; cv=none; d=zohomail.com; s=zohoarc; b=TAMim4wYPd+wkE8uR//RLeNszs8qHwVilDvjQ1iMTIabpg4eouf6vWWjG/bGJDTlG2dXS7H68B6ypOLtAbp3ObLSZcDGBWvwCHzN+b9GHvFbaVhr3cbejuO0yyr/5Fu7HvFOJ/pk9nY9oZUjTdk9moTnETARYy6h+tlstFyFN4c= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1704385440; 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=nLUzGfzUZUvPQFou46dKVJl/tbVU2f+F7XMXWWcrcu4=; b=Y06nCGGkXZB4Z6Qoiizjh/KIHleb8yK0hfTp02xB3+tdeRWNQh7KvVLDcsCHfX/LMlYf9fEpyrTSNfuZn3rED34olumyxYivQg3Yc6WOFeAmsYtJwe1ltwH+DRUd39W1GF34TSlP3Ht0o0CEtFmck7NrsBo1RUPj7dr0kgiIXMw= 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 Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1704385440482925.5306601779943; Thu, 4 Jan 2024 08:24:00 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rLQUv-0000x5-Dq; Thu, 04 Jan 2024 11:23:09 -0500 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 1rLQUt-0000wD-Ka for qemu-devel@nongnu.org; Thu, 04 Jan 2024 11:23:07 -0500 Received: from mail-pl1-x62b.google.com ([2607:f8b0:4864:20::62b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rLQUs-0006E8-4c for qemu-devel@nongnu.org; Thu, 04 Jan 2024 11:23:07 -0500 Received: by mail-pl1-x62b.google.com with SMTP id d9443c01a7336-1d3ed1ca402so4871595ad.2 for ; Thu, 04 Jan 2024 08:21:05 -0800 (PST) Received: from localhost.localdomain ([118.114.59.173]) by smtp.gmail.com with ESMTPSA id 5-20020a170902ee4500b001d06b63bb98sm25987314plo.71.2024.01.04.08.21.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 04 Jan 2024 08:21:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=smartx-com.20230601.gappssmtp.com; s=20230601; t=1704385264; x=1704990064; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=nLUzGfzUZUvPQFou46dKVJl/tbVU2f+F7XMXWWcrcu4=; b=Rns4f9QDBfDIPTJNv2NeMbnts2aUAg+rREb83TJfH1+WO3F2Ko7XzTuE5MmKewWNdl edyrXcLikOyCb43kffTcaXrE25OOxgpaeZkYCs5T3gXcbL2ln6pODgglMm+Rveq6acio 9Lygr36Suecgyssrvgl8HrsP+TKt6v9WtTsUMYb8rCqFJvoILEl6szPmFu/wwoPYTgzH GZ3qVUYTBQBw/4KEtisX5IGFWJ0nJLl+8j7yQejBv4Zj8EyTLuvNLrkvNLL0m46HwL+B vvCLMW/vnfen6qiWlF8V/oEAMFdTxfSyFHa2OF9dDJHkAOhGdLsaSWVFOC7ls6BeBmhU XLnQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704385264; x=1704990064; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=nLUzGfzUZUvPQFou46dKVJl/tbVU2f+F7XMXWWcrcu4=; b=KERWbDUdVS7HxONddNzWlq9mIF+2pin2rF920fEBlPeDXZf9QSDhzB5ZjPgIX6edDR kHfAg6RgyDvDbYPdfZVfcca+ZuYouuo0pCD8uQOV6QnEauga4f9Xn3KAzdyFramKpzpf 5ZGtdbzK4OuwXJ9QPvb3njwLEOH7q8s1JG2jOW6pw3Wr9tPw8gd6o2HtoUuOeUBPAHsB fBIfBq6hBXhKO+Ij0pMs6GVRua5Xp8so2mzfY3j+eOSivW1wS3cYInTcTp1OWFWGqzoG UvPkXNsoQuJ146966PmQo899VPH7KoANmfsIsIcNpaaWFd4xsdSwAle+G3jgVtUDMHSl 9M4Q== X-Gm-Message-State: AOJu0YwudLSU91HT4mEs3oA6H2CGMoZxtVRl1jEI7g803H56DVhVLckL M7HjCZ/Ack4c4+qR7hS0SuvUJt/1QIqE73/4KvV9OeLw8nrXtJu1 X-Google-Smtp-Source: AGHT+IH/rvZ2B2U4ykO+HTdOX5wgyl5IeV/ATxBXGncQ4oYm3E4O9cnhImHlsMfO6azoLiGr5nIH7g== X-Received: by 2002:a17:902:db09:b0:1d4:22ab:e378 with SMTP id m9-20020a170902db0900b001d422abe378mr873941plx.116.1704385263915; Thu, 04 Jan 2024 08:21:03 -0800 (PST) From: Hyman Huang To: qemu-devel@nongnu.org Cc: "Michael S . Tsirkin" , Markus Armbruster , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Eric Blake , yong.huang@smartx.com Subject: [PATCH v2 2/2] hmp: Drop unknown feature and status bits Date: Fri, 5 Jan 2024 00:19:35 +0800 Message-Id: <6f0de9a1c82f64c4055908573d82a1c86c4d99e8.1704382761.git.yong.huang@smartx.com> X-Mailer: git-send-email 2.39.1 In-Reply-To: References: 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: none client-ip=2607:f8b0:4864:20::62b; envelope-from=yong.huang@smartx.com; helo=mail-pl1-x62b.google.com 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, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_NONE=0.001, T_SCC_BODY_TEXT_LINE=-0.01 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 @smartx-com.20230601.gappssmtp.com) X-ZM-MESSAGEID: 1704385441821100001 Content-Type: text/plain; charset="utf-8" The QMP command "x-query-virtio-status" outputs the full feature and status bit information, so there is no need to maintain it in the HMP output; drop it. Signed-off-by: Hyman Huang --- hw/virtio/virtio-hmp-cmds.c | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/hw/virtio/virtio-hmp-cmds.c b/hw/virtio/virtio-hmp-cmds.c index 4fabba4f9c..ae27968523 100644 --- a/hw/virtio/virtio-hmp-cmds.c +++ b/hw/virtio/virtio-hmp-cmds.c @@ -27,10 +27,6 @@ static void hmp_virtio_dump_protocols(Monitor *mon, } } monitor_printf(mon, "\n"); - if (pcol->has_unknown_protocols) { - monitor_printf(mon, " unknown-protocols(0x%016"PRIx64")\n", - pcol->unknown_protocols); - } } =20 static void hmp_virtio_dump_status(Monitor *mon, @@ -47,10 +43,6 @@ static void hmp_virtio_dump_status(Monitor *mon, } } monitor_printf(mon, "\n"); - if (status->has_unknown_statuses) { - monitor_printf(mon, " unknown-statuses(0x%016"PRIx32")\n", - status->unknown_statuses); - } } =20 static void hmp_virtio_dump_features(Monitor *mon, @@ -81,11 +73,6 @@ static void hmp_virtio_dump_features(Monitor *mon, } monitor_printf(mon, "\n"); } - - if (features->has_unknown_dev_features) { - monitor_printf(mon, " unknown-features(0x%016"PRIx64")\n", - features->unknown_dev_features); - } } =20 void hmp_virtio_query(Monitor *mon, const QDict *qdict) --=20 2.39.1