Skip to contentSkip to conversation

qemu: properties for feature compatibility

PATCH Superseded Michael S. Tsirkin 2 participants 2 messages Jan 4, 2010

v5 of 7 Superseded Latest is v7 →

lore
Share & tools
lore
#0 lore raw

v5 cover qemu: properties for feature compatibility

Here's what I came up with for solving the problem of differences in features in virtio between 0.12 and 0.11. This also enables migration between different backends, e.g. between host where tap supports virtio net header and where it does not: management just needs to set features appropriately.
Compat bits are yet to be set, will be done when this patch is applied.

Changes since v4:
- Save bit offset in a separate field, offset is in bytes

Changes since RFC v2:
- we already have a flag to control write cache feature, let's not add another one

Changes since RFC:
- add symbolic names for properties
- only optional features can be changed
Comments? Gerd, what do you think?

Michael S. Tsirkin (2):
qdev: add bit property type
virtio: add features as qdev properties

 hw/qdev-properties.c |   62 ++++++++++++++++++++++++++++++++++++++++++++-----
 hw/qdev.h            |   11 +++++++++
 hw/s390-virtio-bus.c |   12 +++++++--
 hw/s390-virtio-bus.h |    1 +
 hw/syborg_virtio.c   |   12 +++++----
 hw/virtio-balloon.c  |    4 +-
 hw/virtio-blk.c      |    6 +----
 hw/virtio-blk.h      |    8 ++++++
 hw/virtio-console.c  |    4 +-
 hw/virtio-net.c      |   39 +++++++++++++------------------
 hw/virtio-net.h      |   20 ++++++++++++++++
 hw/virtio-pci.c      |   25 +++++++++++++------
 hw/virtio.c          |    2 +-
 hw/virtio.h          |    7 +++++-
 14 files changed, 156 insertions(+), 57 deletions(-)
Acked-by on the v5 series
#1 lore raw
Quoted 5 lines · Michael S. Tsirkin

Here's what I came up with for solving the problem of differences in features in virtio between 0.12 and 0.11. This also enables migration between different backends, e.g. between host where tap supports virtio net header and where it does not: management just needs to set features appropriately.

Looks good to me now.

cheers,
Gerd