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

Hyman Huang posted 2 patches 10 months, 3 weeks ago
Maintainers: "Michael S. Tsirkin" <mst@redhat.com>, Eric Blake <eblake@redhat.com>, Markus Armbruster <armbru@redhat.com>
There is a newer version of this series
[PATCH v2 2/2] hmp: Drop unknown feature and status bits
Posted by Hyman Huang 10 months, 3 weeks ago
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(-)

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)
-- 
2.39.1
Re: [PATCH v2 2/2] hmp: Drop unknown feature and status bits
Posted by Markus Armbruster 10 months, 2 weeks ago
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.
Re: [PATCH v2 2/2] hmp: Drop unknown feature and status bits
Posted by Yong Huang 10 months, 2 weeks ago
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

-- 
Best regards