vmm: config: Fix generic vhost-user parsing

The generic vhost-user device took its virtio device type on the
command line via the `virtio_id` parameter, but the same value is
called `device_type` in the API and the resulting config struct. This
irregularity was due to churn during the review process, `device_type`
was the intended name.

Accept `device_type` on the command line and keep `virtio_id` as a
deprecated alias that logs a warning. The alias will then be removed in
a later release.

Fixes: #8545

Assisted-by: Claude:Opus-4.8
Signed-off-by: Rob Bradford <rbradford@meta.com>
This commit is contained in:
Rob Bradford
2026-07-08 12:18:58 -07:00
parent 30c0fdaff1
commit 818fc07266
4 changed files with 32 additions and 14 deletions

View File

@@ -957,7 +957,7 @@ pub(crate) fn _test_virtio_fs(
"socket={},id=myfs0,{}{}",
virtiofsd_socket_path,
if use_generic_vhost_user {
"queue_sizes=[1024,1024],virtio_id=26"
"queue_sizes=[1024,1024],device_type=26"
} else {
"tag=myfs,num_queues=1,queue_size=1024"
},
@@ -1090,7 +1090,7 @@ pub(crate) fn _test_virtio_fs(
"id=myfs0,socket={},{}{}",
virtiofsd_socket_path,
if use_generic_vhost_user {
"queue_sizes=[1024,1024],virtio_id=26"
"queue_sizes=[1024,1024],device_type=26"
} else {
"tag=myfs,num_queues=1,queue_size=1024"
},