diff mbox series

[v2,2/2] hmp: Drop unknown feature and status bits

Message ID 6f0de9a1c82f64c4055908573d82a1c86c4d99e8.1704382761.git.yong.huang@smartx.com (mailing list archive)
State New, archived
Headers show
Series Adjust the output of x-query-virtio-status | expand

Commit Message

Yong Huang Jan. 4, 2024, 4:19 p.m. UTC
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 <yong.huang@smartx.com>
---
 hw/virtio/virtio-hmp-cmds.c | 13 -------------
 1 file changed, 13 deletions(-)

Comments

Markus Armbruster Jan. 12, 2024, 2:03 p.m. UTC | #1
Hyman Huang <yong.huang@smartx.com> writes:

> 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 <yong.huang@smartx.com>

I'm not sure hiding unknown bits from HMP users is a good idea.  Sure,
you can use QMP to find them, but why would you when HMP gives no clue
that its output is incomplete?

I'd simply keep them, i.e. drop this patch.
Yong Huang Jan. 12, 2024, 2:58 p.m. UTC | #2
On Fri, Jan 12, 2024 at 10:04 PM Markus Armbruster <armbru@redhat.com>
wrote:

> Hyman Huang <yong.huang@smartx.com> writes:
>
> > 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 <yong.huang@smartx.com>
>
> I'm not sure hiding unknown bits from HMP users is a good idea.  Sure,
> you can use QMP to find them, but why would you when HMP gives no clue
> that its output is incomplete?
>
> I'd simply keep them, i.e. drop this patch.
>
>
Ok, I'm not insisting on that.

Thanks,
Yong
diff mbox series

Patch

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);
-    }
 }
 
 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);
-    }
 }
 
 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);
-    }
 }
 
 void hmp_virtio_query(Monitor *mon, const QDict *qdict)