[Qemu-devel] [PATCH for-3.1 00/10] Move virtio-ccw devices to separate files

Thomas Huth posted 10 patches 7 years, 3 months ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/1532521224-27235-1-git-send-email-thuth@redhat.com
Test docker-mingw@fedora passed
Test checkpatch passed
Test docker-quick@centos7 passed
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
[Qemu-devel] [PATCH for-3.1 00/10] Move virtio-ccw devices to separate files
Posted by Thomas Huth 7 years, 3 months ago
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

-- 
1.8.3.1


Re: [Qemu-devel] [PATCH for-3.1 00/10] Move virtio-ccw devices to separate files
Posted by Cornelia Huck 7 years, 3 months ago
On Wed, 25 Jul 2018 14:20:14 +0200
Thomas Huth <thuth@redhat.com> 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...

I understand virtio-net-ccw (autogenerated network devices), but why
virtio-blk-ccw?

Regardless, it might make sense to split them out so that we get a
slimmed-down virtio-ccw.c.

> 
> 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
> 


Re: [Qemu-devel] [PATCH for-3.1 00/10] Move virtio-ccw devices to separate files
Posted by Thomas Huth 7 years, 3 months ago
On 25.07.2018 15:48, Cornelia Huck wrote:
> On Wed, 25 Jul 2018 14:20:14 +0200
> Thomas Huth <thuth@redhat.com> 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...
> 
> I understand virtio-net-ccw (autogenerated network devices), but why
> virtio-blk-ccw?

Because we set mc->block_default_type = IF_VIRTIO ==> if you disable
virtio-blk, the CLI options like -hda and -cdrom would not work anymore.

> Regardless, it might make sense to split them out so that we get a
> slimmed-down virtio-ccw.c.

OK.

 Thomas

Re: [Qemu-devel] [PATCH for-3.1 00/10] Move virtio-ccw devices to separate files
Posted by Cornelia Huck 7 years, 3 months ago
On Wed, 25 Jul 2018 19:20:59 +0200
Thomas Huth <thuth@redhat.com> wrote:

> On 25.07.2018 15:48, Cornelia Huck wrote:
> > On Wed, 25 Jul 2018 14:20:14 +0200
> > Thomas Huth <thuth@redhat.com> 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...  
> > 
> > I understand virtio-net-ccw (autogenerated network devices), but why
> > virtio-blk-ccw?  
> 
> Because we set mc->block_default_type = IF_VIRTIO ==> if you disable
> virtio-blk, the CLI options like -hda and -cdrom would not work anymore.

I see. Maybe we need some strategic #ifdefs to deal with this.

Re: [Qemu-devel] [PATCH for-3.1 00/10] Move virtio-ccw devices to separate files
Posted by Cornelia Huck 7 years, 2 months ago
On Wed, 25 Jul 2018 14:20:14 +0200
Thomas Huth <thuth@redhat.com> 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...

Thanks, applied (including the two patches on top.)

Re: [Qemu-devel] [PATCH for-3.1 00/10] Move virtio-ccw devices to separate files
Posted by Cornelia Huck 7 years, 2 months ago
On Wed, 25 Jul 2018 14:20:14 +0200
Thomas Huth <thuth@redhat.com> 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
> 

Trawling through my backlog... I don't think there were any issues with
this? I think I'll just go ahead and queue this (would not mind
reviews, though).

Re: [Qemu-devel] [PATCH for-3.1 00/10] Move virtio-ccw devices to separate files
Posted by Christian Borntraeger 7 years, 3 months ago
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
> 


Re: [Qemu-devel] [PATCH for-3.1 00/10] Move virtio-ccw devices to separate files
Posted by Juan Quintela 7 years, 3 months ago
Christian Borntraeger <borntraeger@de.ibm.com> wrote:
> 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.

+1 to that.

Later, Juan.

Re: [Qemu-devel] [PATCH for-3.1 00/10] Move virtio-ccw devices to separate files
Posted by Thomas Huth 7 years, 3 months ago
On 25.07.2018 18:21, Juan Quintela wrote:
> Christian Borntraeger <borntraeger@de.ibm.com> wrote:
>> 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.

Somebody™ should do it, yes. For the context, see:
 https://lists.gnu.org/archive/html/qemu-devel/2018-07/msg03935.html

> +1 to that.

I was hoping that you would take care of the pci while I'm handling the
ccw part, Juan ;-) But if you don't have spare time for this at all, I
can also put it on my todo list.

 Thomas