[PATCH v0] machine: remove non existent device tuning

Denis Plotnikov posted 1 patch 2 years, 6 months ago
Test checkpatch passed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20210909125155.71120-1-den-plotnikov@yandex-team.ru
Maintainers: Eduardo Habkost <ehabkost@redhat.com>, Marcel Apfelbaum <marcel.apfelbaum@gmail.com>
hw/core/machine.c | 1 -
1 file changed, 1 deletion(-)
[PATCH v0] machine: remove non existent device tuning
Posted by Denis Plotnikov 2 years, 6 months ago
Device "vhost-blk-device" doesn't exist in qemu yet.
So, its compatibility tuning is meaningless.

The line with the non existent device was introduced with
"1bf8a989a566b virtio: make seg_max virtqueue size dependent"
patch by mistake. The oriiginal patch was meant to set
"seg-max-adjust" property for "vhost-scsi" device instead of
"vhost-blk-device".

So now, we have "seg-max-adjust" property enabled for all machine
types using binaries with implemented "seg-max-adjust".

Replacing "vhost-blk-device" with "vhost-scsi" instead of removing
the line seems to be a bad idea. Now, because of the mistake, "seg-max"
for "vhost-scsi" device is queue-size dependent even for machine types
using "hw_compat_4_2" and older on new binaries.
Thus, now we have two behaviors:
* on old binaries (before the original patch) - seg_max is always 126
* on new binaries - seg_max is queue-size dependent
Replacing the line will split the behavior of new binaries into two.
This would make an investigation in case of related problems harder.

To not make things worse, this patch just removes the line
to keep behavior like it is now.

Signed-off-by: Denis Plotnikov <den-plotnikov@yandex-team.ru>
---
 hw/core/machine.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/hw/core/machine.c b/hw/core/machine.c
index 067f42b528fd..d4f70cc01af0 100644
--- a/hw/core/machine.c
+++ b/hw/core/machine.c
@@ -87,7 +87,6 @@ GlobalProperty hw_compat_4_2[] = {
     { "virtio-blk-device", "x-enable-wce-if-config-wce", "off" },
     { "virtio-blk-device", "seg-max-adjust", "off"},
     { "virtio-scsi-device", "seg_max_adjust", "off"},
-    { "vhost-blk-device", "seg_max_adjust", "off"},
     { "usb-host", "suppress-remote-wake", "off" },
     { "usb-redir", "suppress-remote-wake", "off" },
     { "qxl", "revision", "4" },
-- 
2.25.1