Skip to content

virtio: Convert feature properties to OnOffAuto

Akihiko Odaki qemu-devel 5 versions – In review

Get series with b4
b4 am [email protected] change-id 20241013-virtio-164ea3f295c3

Versions newest first

  1. v6 Latest4 patches 5 repliesIn review
  2. v54 patches 2 repliesSuperseded
  3. v44 patches 26 repliesSuperseded
Earlier versions · 2
VersionPostedPatchesRepliesStatus
v33 patches3 repliesSuperseded
v23 patches8 repliesSuperseded

Changes in v6 from the cover letter

Patches in v6 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4qapi: Do not consume a value if failedqapi/qobject-input-visitor.c+69 -340 replies
2/4qapi: Accept bool for OnOffAuto and OnOffSplithw/core/qdev-properties.c scripts/qapi/visit.py+40 -10 replies
3/4qdev-properties: Add DEFINE_PROP_ON_OFF_AUTO_BIT64()hw/core/qdev-properties.c include/hw/qdev-properties.h+83 -10 replies
4/4virtio: Convert feature properties to OnOffAutohw/core/machine.c hw/virtio/virtio-bus.c hw/virtio/virtio.c +1 more+37 -200 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v6 yet.

Read the v6 thread

Cover letter [PATCH v6 0/4] virtio: Convert feature properties to OnOffAuto

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.

---
Changes in v6:
- Rebased.
- Link to v5: https://lore.kernel.org/qemu-devel/[email protected]

Changes in v5:
- Covered QAPI more than just qdev.
- Expanded the description of patch
"qapi: Accept bool for OnOffAuto and OnOffSplit".
- Rebased.
- Link to v4: https://lore.kernel.org/r/[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
qapi: Accept bool for OnOffAuto and OnOffSplit
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            |   1 +
 hw/core/qdev-properties.c    |  83 +++++++++++++++++++++++++++++++++-
 hw/virtio/virtio-bus.c       |  14 +++++-
 hw/virtio/virtio.c           |   4 +-
 qapi/qobject-input-visitor.c | 103 +++++++++++++++++++++++++++++--------------
 scripts/qapi/visit.py        |  24 ++++++++++
 8 files changed, 229 insertions(+), 56 deletions(-)

---
base-commit: b69801dd6b1eb4d107f7c2f643adf0a4e3ec9124
change-id: 20241013-virtio-164ea3f295c3

Best regards,

Signature · 1 line
Akihiko Odaki <[email protected]>