This series was spun off from: "[PATCH 0/3] virtio-net: Convert feature properties to OnOffAuto" (https://patchew.org/QEMU/[email protected]/)
Some features are not always available with vhost. Legacy features are not available with vp_vdpa in particular. virtio devices used to disable them when not available even if the corresponding properties were explicitly set to "on". QEMU already has OnOffAuto type, which includes the "auto" value to let it automatically decide the effective value. Convert feature properties to OnOffAuto and set them "auto" by default to utilize it. This allows QEMU to report an error if they are set "on" and the corresponding features are not available. Signed-off-by: Akihiko Odaki <[email protected]> --- Changes in v4: - Added patch "qapi: Do not consume a value if failed". - Link to v3: https://lore.kernel.org/r/[email protected] Changes in v3: - Rebased. - Link to v2: https://lore.kernel.org/r/[email protected] Changes in v2: - Expanded the message of patch "qdev-properties: Accept bool for OnOffAuto". - Link to v1: https://lore.kernel.org/r/[email protected] --- Akihiko Odaki (4): qapi: Do not consume a value if failed qdev-properties: Accept bool for OnOffAuto qdev-properties: Add DEFINE_PROP_ON_OFF_AUTO_BIT64() virtio: Convert feature properties to OnOffAuto include/hw/qdev-properties.h | 18 ++++++++ include/hw/virtio/virtio.h | 38 +++++++++------- hw/core/machine.c | 4 +- hw/core/qdev-properties.c | 83 +++++++++++++++++++++++++++++++++- hw/virtio/virtio-bus.c | 14 +++++- hw/virtio/virtio.c | 4 +- qapi/qobject-input-visitor.c | 103 +++++++++++++++++++++++++++++-------------- 7 files changed, 207 insertions(+), 57 deletions(-) --- base-commit: 38d0939b86e2eef6f6a622c6f1f7befda0146595 change-id: 20241013-virtio-164ea3f295c3 Best regards, -- Akihiko Odaki <[email protected]>
