On Wed, 22 Jul 2015 12:36:22 +0300 "Michael S. Tsirkin" <m...@redhat.com> wrote:
> Virtio 1 requires this, and all devices are clean by now, > so let's do it! > > Exceptions: > - virtio-blk > - compat machine types > > Signed-off-by: Michael S. Tsirkin <m...@redhat.com> > --- > > Untested - consider this pseudo-code - it just seems easier to write it > in C than try to explain it. > > include/hw/compat.h | 22 +++++++++++++++++++++- > include/hw/virtio/virtio.h | 4 +++- > hw/block/virtio-blk.c | 1 + > hw/net/virtio-net.c | 2 -- > hw/scsi/virtio-scsi.c | 2 -- > 5 files changed, 25 insertions(+), 6 deletions(-) > > diff --git a/include/hw/compat.h b/include/hw/compat.h > index 4a43466..94c8097 100644 > --- a/include/hw/compat.h > +++ b/include/hw/compat.h > @@ -2,7 +2,27 @@ > #define HW_COMPAT_H > > #define HW_COMPAT_2_3 \ > - /* empty */ > + {\ > + .driver = "virtio-blk-pci",\ > + .property = "any_layout",\ > + .value = "off",\ > + },{\ > + .driver = "virtio-balloon-pci",\ > + .property = "any_layout",\ > + .value = "off",\ > + },{\ > + .driver = "virtio-serial-pci",\ > + .property = "any_layout",\ > + .value = "off",\ > + },{\ > + .driver = "virtio-9p-pci",\ > + .property = "any_layout",\ > + .value = "off",\ > + },{\ > + .driver = "virtio-rng-pci",\ > + .property = "any_layout",\ > + .value = "off",\ > + }, Isn't that a bit late for 2.4? Especially as not all devices are clean yet, as Jason pointed out. If we do this for 2.5, we'll also need compat handlers for ccw. > > #define HW_COMPAT_2_2 \ > /* empty */