Are you planning to do a similar thing for virtio-pci? I think it would be good to keep virtio-ccw similar to virtio-pci when it makes sense.
On 07/25/2018 02:20 PM, Thomas Huth wrote: > For more fine-grained control over the build process, it would be good > to have the possibility to disable single virtio devices, too. We already > have CONFIG_VIRTIO_* switches in the Makefiles, but currently all > virtio-ccw devices are compiled in anyway. Move them to separate files > so we can disable them in the Makefile more easily. > > NB: I did not move virtio-blk-ccw and virtio-net-ccw to a separate file > yet since they are essential for the s390x-virtio machine and thus it > does IMHO not make much sense to disable net and blk. But if somebody > needs that possibility, too, I can add two more patches on top... > > Thomas Huth (10): > hw/s390x/virtio-ccw: Consolidate calls to virtio_ccw_unrealize() > hw/s390x: Move virtio-ccw-serial code to a separate file > hw/s390x: Move virtio-ccw-balloon code to a separate file > hw/s390x: Move virtio-ccw-scsi code to a separate file > hw/s390x: Move virtio-ccw-rng code to a separate file > hw/s390x: Move virtio-ccw-9p code to a separate file > hw/s390x: Move virtio-ccw-crypto code to a separate file > hw/s390x: Move vhost-vsock-ccw code to a separate file > hw/s390x: Move virtio-ccw-gpu code to a separate file > hw/s390x: Move virtio-ccw-input code to a separate file > > MAINTAINERS | 2 +- > hw/s390x/Makefile.objs | 9 + > hw/s390x/vhost-vsock-ccw.c | 60 +++++ > hw/s390x/virtio-ccw-9p.c | 65 +++++ > hw/s390x/virtio-ccw-balloon.c | 70 +++++ > hw/s390x/virtio-ccw-crypto.c | 75 ++++++ > hw/s390x/virtio-ccw-gpu.c | 67 +++++ > hw/s390x/virtio-ccw-input.c | 118 +++++++++ > hw/s390x/virtio-ccw-rng.c | 74 ++++++ > hw/s390x/virtio-ccw-scsi.c | 125 +++++++++ > hw/s390x/virtio-ccw-serial.c | 78 ++++++ > hw/s390x/virtio-ccw.c | 581 > +----------------------------------------- > 12 files changed, 749 insertions(+), 575 deletions(-) > create mode 100644 hw/s390x/vhost-vsock-ccw.c > create mode 100644 hw/s390x/virtio-ccw-9p.c > create mode 100644 hw/s390x/virtio-ccw-balloon.c > create mode 100644 hw/s390x/virtio-ccw-crypto.c > create mode 100644 hw/s390x/virtio-ccw-gpu.c > create mode 100644 hw/s390x/virtio-ccw-input.c > create mode 100644 hw/s390x/virtio-ccw-rng.c > create mode 100644 hw/s390x/virtio-ccw-scsi.c > create mode 100644 hw/s390x/virtio-ccw-serial.c >