[Qemu-devel] [PATCH 13/52] hw/s390/Makefile.objs: Create new CONFIG_* variables for s390x boards and devices

Paolo Bonzini posted 52 patches 7 years ago
Maintainers: Eduardo Habkost <ehabkost@redhat.com>, "Marc-André Lureau" <marcandre.lureau@redhat.com>, Palmer Dabbelt <palmer@sifive.com>, Max Filippov <jcmvbkbc@gmail.com>, Alistair Francis <alistair@alistair23.me>, Guan Xuetao <gxt@mprc.pku.edu.cn>, Max Reitz <mreitz@redhat.com>, Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>, Igor Mammedov <imammedo@redhat.com>, Aleksandar Markovic <amarkovic@wavecomp.com>, Fam Zheng <fam@euphon.net>, Cornelia Huck <cohuck@redhat.com>, Peter Crosthwaite <crosthwaite.peter@gmail.com>, Gerd Hoffmann <kraxel@redhat.com>, Aleksandar Rikalo <arikalo@wavecomp.com>, Corey Minyard <minyard@acm.org>, Sagar Karandikar <sagark@eecs.berkeley.edu>, Alex Williamson <alex.williamson@redhat.com>, Alberto Garcia <berto@igalia.com>, Anthony Green <green@moxielogic.com>, Jason Wang <jasowang@redhat.com>, Aurelien Jarno <aurelien@aurel32.net>, Richard Henderson <rth@twiddle.net>, Greg Kurz <groug@kaod.org>, "Daniel P. Berrangé" <berrange@redhat.com>, Alistair Francis <Alistair.Francis@wdc.com>, Marcel Apfelbaum <marcel.apfelbaum@gmail.com>, Michael Clark <mjc@sifive.com>, Kevin Wolf <kwolf@redhat.com>, Chris Wulff <crwulff@gmail.com>, "Michael S. Tsirkin" <mst@redhat.com>, Stafford Horne <shorne@gmail.com>, Michael Walle <michael@walle.cc>, "Edgar E. Iglesias" <edgar.iglesias@gmail.com>, David Hildenbrand <david@redhat.com>, Marek Vasut <marex@denx.de>, Paolo Bonzini <pbonzini@redhat.com>, David Gibson <david@gibson.dropbear.id.au>, Peter Maydell <peter.maydell@linaro.org>, Halil Pasic <pasic@linux.ibm.com>, Stefan Berger <stefanb@linux.ibm.com>, John Snow <jsnow@redhat.com>, Bastian Koppelmann <kbastian@mail.uni-paderborn.de>, Christian Borntraeger <borntraeger@de.ibm.com>, Artyom Tarasenko <atar4qemu@gmail.com>, Cleber Rosa <crosa@redhat.com>
There is a newer version of this series
[Qemu-devel] [PATCH 13/52] hw/s390/Makefile.objs: Create new CONFIG_* variables for s390x boards and devices
Posted by Paolo Bonzini 7 years ago
Make hw/s390x configurable and add new CONFIG_* to the default-configs/s390x*-softmmu.mak.
This will be used to enable/disable vfio-ccw.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Message-Id: <20190123065618.3520-10-yang.zhong@intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 default-configs/s390x-softmmu.mak | 1 +
 hw/s390x/Makefile.objs            | 2 ++
 2 files changed, 3 insertions(+)

diff --git a/default-configs/s390x-softmmu.mak b/default-configs/s390x-softmmu.mak
index 5eef375..8bb7e43 100644
--- a/default-configs/s390x-softmmu.mak
+++ b/default-configs/s390x-softmmu.mak
@@ -8,3 +8,4 @@ CONFIG_S390_FLIC_KVM=$(CONFIG_KVM)
 CONFIG_VFIO_CCW=$(CONFIG_LINUX)
 CONFIG_WDT_DIAG288=y
 CONFIG_VFIO_AP=$(CONFIG_LINUX)
+CONFIG_S390_CCW_VIRTIO=y
diff --git a/hw/s390x/Makefile.objs b/hw/s390x/Makefile.objs
index ca68806..a884aae 100644
--- a/hw/s390x/Makefile.objs
+++ b/hw/s390x/Makefile.objs
@@ -1,3 +1,4 @@
+ifeq ($(CONFIG_S390_CCW_VIRTIO),y)
 obj-y += s390-virtio-hcall.o
 obj-y += sclp.o
 obj-y += event-facility.o
@@ -33,3 +34,4 @@ obj-$(CONFIG_KVM) += s390-stattrib-kvm.o
 obj-y += s390-ccw.o
 obj-y += ap-device.o
 obj-y += ap-bridge.o
+endif
-- 
1.8.3.1



Re: [Qemu-devel] [PATCH 13/52] hw/s390/Makefile.objs: Create new CONFIG_* variables for s390x boards and devices
Posted by Thomas Huth 7 years ago
On 2019-01-25 11:06, Paolo Bonzini wrote:
> Make hw/s390x configurable and add new CONFIG_* to the default-configs/s390x*-softmmu.mak.
> This will be used to enable/disable vfio-ccw.
> 
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> Message-Id: <20190123065618.3520-10-yang.zhong@intel.com>
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
>  default-configs/s390x-softmmu.mak | 1 +
>  hw/s390x/Makefile.objs            | 2 ++
>  2 files changed, 3 insertions(+)
> 
> diff --git a/default-configs/s390x-softmmu.mak b/default-configs/s390x-softmmu.mak
> index 5eef375..8bb7e43 100644
> --- a/default-configs/s390x-softmmu.mak
> +++ b/default-configs/s390x-softmmu.mak
> @@ -8,3 +8,4 @@ CONFIG_S390_FLIC_KVM=$(CONFIG_KVM)
>  CONFIG_VFIO_CCW=$(CONFIG_LINUX)
>  CONFIG_WDT_DIAG288=y
>  CONFIG_VFIO_AP=$(CONFIG_LINUX)
> +CONFIG_S390_CCW_VIRTIO=y
> diff --git a/hw/s390x/Makefile.objs b/hw/s390x/Makefile.objs
> index ca68806..a884aae 100644
> --- a/hw/s390x/Makefile.objs
> +++ b/hw/s390x/Makefile.objs
> @@ -1,3 +1,4 @@
> +ifeq ($(CONFIG_S390_CCW_VIRTIO),y)
>  obj-y += s390-virtio-hcall.o
>  obj-y += sclp.o
>  obj-y += event-facility.o
> @@ -33,3 +34,4 @@ obj-$(CONFIG_KVM) += s390-stattrib-kvm.o
>  obj-y += s390-ccw.o
>  obj-y += ap-device.o
>  obj-y += ap-bridge.o
> +endif

That won't really work, a lot of code in target/s390x still depends on
the functions in these files here. I suggest to just disable the file
that defines the machine initially, i.e.:

obj-$(CONFIG_S390_CCW_VIRTIO) += s390-virtio-ccw.o

We can still fine-tune this later.

 Thomas

Re: [Qemu-devel] [PATCH 13/52] hw/s390/Makefile.objs: Create new CONFIG_* variables for s390x boards and devices
Posted by Paolo Bonzini 7 years ago
On 25/01/19 16:17, Thomas Huth wrote:
>> +ifeq ($(CONFIG_S390_CCW_VIRTIO),y)
>>  obj-y += s390-virtio-hcall.o
>>  obj-y += sclp.o
>>  obj-y += event-facility.o
>> @@ -33,3 +34,4 @@ obj-$(CONFIG_KVM) += s390-stattrib-kvm.o
>>  obj-y += s390-ccw.o
>>  obj-y += ap-device.o
>>  obj-y += ap-bridge.o
>> +endif
> That won't really work, a lot of code in target/s390x still depends on
> the functions in these files here. I suggest to just disable the file
> that defines the machine initially, i.e.:
> 
> obj-$(CONFIG_S390_CCW_VIRTIO) += s390-virtio-ccw.o
> 
> We can still fine-tune this later.

Ok, I'll leave this and the other changes you suggest to Yang for v6. :)

Paolo