All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] s390x: express dependencies with Kconfig
       [not found] <3f01a301-d639-dbe7-f522-42a50e2d443e@redhat.com>
@ 2019-01-28 15:29 ` Thomas Huth
  2019-01-28 16:08   ` [Qemu-devel] [qemu-s390x] " Cornelia Huck
  2019-01-30  9:43 ` [Qemu-devel] [RFC PATCH 0/5] Kconfig dependencies for ppc machines Thomas Huth
  1 sibling, 1 reply; 33+ messages in thread
From: Thomas Huth @ 2019-01-28 15:29 UTC (permalink / raw)
  To: qemu-devel, yang.zhong; +Cc: pbonzini, qemu-s390x

Instead of hard-coding all config switches in the config file
default-configs/s390x-softmmu.mak, let's use the new Kconfig files
to express the necessary dependencies: The S390_CCW_VIRTIO config switch
for the "s390-ccw-virtio" machine now selects all non-optional devices.

And since we already have the VIRTIO_PCI and VIRTIO_MMIO config switches
for the other two virtio transports, this patch also introduces a new
config switch VIRTIO_CCW for the third, s390x-specific virtio transport,
so that all three virtio transports are now handled in the same way.

Signed-off-by: Thomas Huth <thuth@redhat.com>
---
 This goes on top of the curren Kconfig series:

 Based-on: 1548410831-19553-1-git-send-email-pbonzini@redhat.com

 default-configs/s390x-softmmu.mak | 12 ++++++++----
 hw/s390x/Kconfig                  |  4 ++++
 hw/s390x/Makefile.objs            |  2 +-
 hw/virtio/Kconfig                 |  4 ++++
 4 files changed, 17 insertions(+), 5 deletions(-)

diff --git a/default-configs/s390x-softmmu.mak b/default-configs/s390x-softmmu.mak
index 2be5059..08b1683 100644
--- a/default-configs/s390x-softmmu.mak
+++ b/default-configs/s390x-softmmu.mak
@@ -1,9 +1,13 @@
-CONFIG_PCI=y
+# Default configuration for s390x-softmmu
+
+# Optional devices:
+#
 CONFIG_VIRTIO_PCI=y
-CONFIG_SCLPCONSOLE=y
 CONFIG_TERMINAL3270=y
-CONFIG_S390_FLIC=y
 CONFIG_WDT_DIAG288=y
-CONFIG_S390_CCW_VIRTIO=y
 CONFIG_VFIO_CCW=y
 CONFIG_VFIO_AP=y
+
+# Boards:
+#
+CONFIG_S390_CCW_VIRTIO=y
diff --git a/hw/s390x/Kconfig b/hw/s390x/Kconfig
index 303db7f..9a36c39 100644
--- a/hw/s390x/Kconfig
+++ b/hw/s390x/Kconfig
@@ -1,2 +1,6 @@
 config S390_CCW_VIRTIO
     bool
+    select PCI
+    select S390_FLIC
+    select SCLPCONSOLE
+    select VIRTIO_CCW
diff --git a/hw/s390x/Makefile.objs b/hw/s390x/Makefile.objs
index a884aae..0dc798a 100644
--- a/hw/s390x/Makefile.objs
+++ b/hw/s390x/Makefile.objs
@@ -8,7 +8,7 @@ obj-y += ipl.o
 obj-y += css.o
 obj-y += s390-virtio-ccw.o
 obj-y += 3270-ccw.o
-obj-y += virtio-ccw.o
+obj-$(CONFIG_VIRTIO_CCW) += virtio-ccw.o
 obj-$(CONFIG_VIRTIO_SERIAL) += virtio-ccw-serial.o
 obj-$(CONFIG_VIRTIO_BALLOON) += virtio-ccw-balloon.o
 obj-$(CONFIG_VIRTIO_SCSI) += virtio-ccw-scsi.o
diff --git a/hw/virtio/Kconfig b/hw/virtio/Kconfig
index 74f4573..e0452de 100644
--- a/hw/virtio/Kconfig
+++ b/hw/virtio/Kconfig
@@ -16,6 +16,10 @@ config VIRTIO_MMIO
     bool
     select VIRTIO
 
+config VIRTIO_CCW
+    bool
+    select VIRTIO
+
 config VIRTIO_BALLOON
     bool
     default y
-- 
1.8.3.1

^ permalink raw reply related	[flat|nested] 33+ messages in thread

* Re: [Qemu-devel] [qemu-s390x] [PATCH] s390x: express dependencies with Kconfig
  2019-01-28 15:29 ` [Qemu-devel] [PATCH] s390x: express dependencies with Kconfig Thomas Huth
@ 2019-01-28 16:08   ` Cornelia Huck
  2019-01-29  9:08     ` Thomas Huth
  2019-01-29  9:42     ` [Qemu-devel] [PATCH v2] " Thomas Huth
  0 siblings, 2 replies; 33+ messages in thread
From: Cornelia Huck @ 2019-01-28 16:08 UTC (permalink / raw)
  To: Thomas Huth; +Cc: qemu-devel, yang.zhong, pbonzini, qemu-s390x

On Mon, 28 Jan 2019 16:29:26 +0100
Thomas Huth <thuth@redhat.com> wrote:

> Instead of hard-coding all config switches in the config file
> default-configs/s390x-softmmu.mak, let's use the new Kconfig files
> to express the necessary dependencies: The S390_CCW_VIRTIO config switch
> for the "s390-ccw-virtio" machine now selects all non-optional devices.
> 
> And since we already have the VIRTIO_PCI and VIRTIO_MMIO config switches
> for the other two virtio transports, this patch also introduces a new
> config switch VIRTIO_CCW for the third, s390x-specific virtio transport,
> so that all three virtio transports are now handled in the same way.

I haven't found time to look at the Kconfig patches, so take the
following with a generous amount of salt.

> 
> Signed-off-by: Thomas Huth <thuth@redhat.com>
> ---
>  This goes on top of the curren Kconfig series:
> 
>  Based-on: 1548410831-19553-1-git-send-email-pbonzini@redhat.com
> 
>  default-configs/s390x-softmmu.mak | 12 ++++++++----
>  hw/s390x/Kconfig                  |  4 ++++
>  hw/s390x/Makefile.objs            |  2 +-
>  hw/virtio/Kconfig                 |  4 ++++
>  4 files changed, 17 insertions(+), 5 deletions(-)
> 
> diff --git a/default-configs/s390x-softmmu.mak b/default-configs/s390x-softmmu.mak
> index 2be5059..08b1683 100644
> --- a/default-configs/s390x-softmmu.mak
> +++ b/default-configs/s390x-softmmu.mak
> @@ -1,9 +1,13 @@
> -CONFIG_PCI=y
> +# Default configuration for s390x-softmmu
> +
> +# Optional devices:
> +#
>  CONFIG_VIRTIO_PCI=y
> -CONFIG_SCLPCONSOLE=y
>  CONFIG_TERMINAL3270=y
> -CONFIG_S390_FLIC=y
>  CONFIG_WDT_DIAG288=y
> -CONFIG_S390_CCW_VIRTIO=y
>  CONFIG_VFIO_CCW=y
>  CONFIG_VFIO_AP=y

This looks sensible.

> +
> +# Boards:
> +#
> +CONFIG_S390_CCW_VIRTIO=y
> diff --git a/hw/s390x/Kconfig b/hw/s390x/Kconfig
> index 303db7f..9a36c39 100644
> --- a/hw/s390x/Kconfig
> +++ b/hw/s390x/Kconfig
> @@ -1,2 +1,6 @@
>  config S390_CCW_VIRTIO
>      bool
> +    select PCI
> +    select S390_FLIC
> +    select SCLPCONSOLE
> +    select VIRTIO_CCW

This also makes sense. (I assume CONFIG_PCI, CONFIG_S390_FLIC, and
CONFIG_SCLPCONSOLE are already defined in the base patch series.)

> diff --git a/hw/s390x/Makefile.objs b/hw/s390x/Makefile.objs
> index a884aae..0dc798a 100644
> --- a/hw/s390x/Makefile.objs
> +++ b/hw/s390x/Makefile.objs
> @@ -8,7 +8,7 @@ obj-y += ipl.o
>  obj-y += css.o
>  obj-y += s390-virtio-ccw.o
>  obj-y += 3270-ccw.o

Should this depend on TERMINAL3270 (at least in the future)?

> -obj-y += virtio-ccw.o
> +obj-$(CONFIG_VIRTIO_CCW) += virtio-ccw.o
>  obj-$(CONFIG_VIRTIO_SERIAL) += virtio-ccw-serial.o

Hm. Should the individual device types depend both on VIRTIO_<device>
and on VIRTIO_CCW? Making VIRTIO_<device> depend on VIRTIO_PCI ||
VIRTIO_CCW || VIRTIO_MMIO is probably not enough, as we could be trying
to build virtio-ccw devices if only VIRTIO_PCI is set (or virtio-pci
devices if only VIRTIO_CCW is set, for that matter.)

Or maybe I simply need to read the patches and find the answer there :)

>  obj-$(CONFIG_VIRTIO_BALLOON) += virtio-ccw-balloon.o
>  obj-$(CONFIG_VIRTIO_SCSI) += virtio-ccw-scsi.o
> diff --git a/hw/virtio/Kconfig b/hw/virtio/Kconfig
> index 74f4573..e0452de 100644
> --- a/hw/virtio/Kconfig
> +++ b/hw/virtio/Kconfig
> @@ -16,6 +16,10 @@ config VIRTIO_MMIO
>      bool
>      select VIRTIO
>  
> +config VIRTIO_CCW
> +    bool
> +    select VIRTIO
> +
>  config VIRTIO_BALLOON
>      bool
>      default y

^ permalink raw reply	[flat|nested] 33+ messages in thread

* Re: [Qemu-devel] [qemu-s390x] [PATCH] s390x: express dependencies with Kconfig
  2019-01-28 16:08   ` [Qemu-devel] [qemu-s390x] " Cornelia Huck
@ 2019-01-29  9:08     ` Thomas Huth
  2019-01-29  9:42     ` [Qemu-devel] [PATCH v2] " Thomas Huth
  1 sibling, 0 replies; 33+ messages in thread
From: Thomas Huth @ 2019-01-29  9:08 UTC (permalink / raw)
  To: Cornelia Huck; +Cc: qemu-devel, yang.zhong, pbonzini, qemu-s390x

On 2019-01-28 17:08, Cornelia Huck wrote:
> On Mon, 28 Jan 2019 16:29:26 +0100
> Thomas Huth <thuth@redhat.com> wrote:
> 
>> Instead of hard-coding all config switches in the config file
>> default-configs/s390x-softmmu.mak, let's use the new Kconfig files
>> to express the necessary dependencies: The S390_CCW_VIRTIO config switch
>> for the "s390-ccw-virtio" machine now selects all non-optional devices.
>>
>> And since we already have the VIRTIO_PCI and VIRTIO_MMIO config switches
>> for the other two virtio transports, this patch also introduces a new
>> config switch VIRTIO_CCW for the third, s390x-specific virtio transport,
>> so that all three virtio transports are now handled in the same way.
> 
> I haven't found time to look at the Kconfig patches, so take the
> following with a generous amount of salt.
> 
>>
>> Signed-off-by: Thomas Huth <thuth@redhat.com>
>> ---
>>  This goes on top of the curren Kconfig series:
>>
>>  Based-on: 1548410831-19553-1-git-send-email-pbonzini@redhat.com
>>
>>  default-configs/s390x-softmmu.mak | 12 ++++++++----
>>  hw/s390x/Kconfig                  |  4 ++++
>>  hw/s390x/Makefile.objs            |  2 +-
>>  hw/virtio/Kconfig                 |  4 ++++
>>  4 files changed, 17 insertions(+), 5 deletions(-)
>>
>> diff --git a/default-configs/s390x-softmmu.mak b/default-configs/s390x-softmmu.mak
>> index 2be5059..08b1683 100644
>> --- a/default-configs/s390x-softmmu.mak
>> +++ b/default-configs/s390x-softmmu.mak
>> @@ -1,9 +1,13 @@
>> -CONFIG_PCI=y
>> +# Default configuration for s390x-softmmu
>> +
>> +# Optional devices:
>> +#
>>  CONFIG_VIRTIO_PCI=y
>> -CONFIG_SCLPCONSOLE=y
>>  CONFIG_TERMINAL3270=y
>> -CONFIG_S390_FLIC=y
>>  CONFIG_WDT_DIAG288=y
>> -CONFIG_S390_CCW_VIRTIO=y
>>  CONFIG_VFIO_CCW=y
>>  CONFIG_VFIO_AP=y
> 
> This looks sensible.
> 
>> +
>> +# Boards:
>> +#
>> +CONFIG_S390_CCW_VIRTIO=y
>> diff --git a/hw/s390x/Kconfig b/hw/s390x/Kconfig
>> index 303db7f..9a36c39 100644
>> --- a/hw/s390x/Kconfig
>> +++ b/hw/s390x/Kconfig
>> @@ -1,2 +1,6 @@
>>  config S390_CCW_VIRTIO
>>      bool
>> +    select PCI
>> +    select S390_FLIC
>> +    select SCLPCONSOLE
>> +    select VIRTIO_CCW
> 
> This also makes sense. (I assume CONFIG_PCI, CONFIG_S390_FLIC, and
> CONFIG_SCLPCONSOLE are already defined in the base patch series.)

Yes, they are.

>> diff --git a/hw/s390x/Makefile.objs b/hw/s390x/Makefile.objs
>> index a884aae..0dc798a 100644
>> --- a/hw/s390x/Makefile.objs
>> +++ b/hw/s390x/Makefile.objs
>> @@ -8,7 +8,7 @@ obj-y += ipl.o
>>  obj-y += css.o
>>  obj-y += s390-virtio-ccw.o
>>  obj-y += 3270-ccw.o
> 
> Should this depend on TERMINAL3270 (at least in the future)?

Yes, this is related to TERMINAL3270 which is already used for
hw/char/terminal3270. So I think we could use $(CONFIG_TERMINAL3270)
here, too.

>> -obj-y += virtio-ccw.o
>> +obj-$(CONFIG_VIRTIO_CCW) += virtio-ccw.o
>>  obj-$(CONFIG_VIRTIO_SERIAL) += virtio-ccw-serial.o
> 
> Hm. Should the individual device types depend both on VIRTIO_<device>
> and on VIRTIO_CCW? Making VIRTIO_<device> depend on VIRTIO_PCI ||
> VIRTIO_CCW || VIRTIO_MMIO is probably not enough, as we could be trying
> to build virtio-ccw devices if only VIRTIO_PCI is set (or virtio-pci
> devices if only VIRTIO_CCW is set, for that matter.)

You're right, the whole section should be fenced via

ifeq ($(CONFIG_VIRTIO_CCW),y)
...
endif

I'll update my patch accordingly and send a v2.

 Thanks,
  Thomas

^ permalink raw reply	[flat|nested] 33+ messages in thread

* [Qemu-devel] [PATCH v2] s390x: express dependencies with Kconfig
  2019-01-28 16:08   ` [Qemu-devel] [qemu-s390x] " Cornelia Huck
  2019-01-29  9:08     ` Thomas Huth
@ 2019-01-29  9:42     ` Thomas Huth
  2019-01-29  9:49       ` [Qemu-devel] [qemu-s390x] " Cornelia Huck
  1 sibling, 1 reply; 33+ messages in thread
From: Thomas Huth @ 2019-01-29  9:42 UTC (permalink / raw)
  To: qemu-devel, yang.zhong; +Cc: pbonzini, qemu-s390x

Instead of hard-coding all config switches in the config file
default-configs/s390x-softmmu.mak, let's use the new Kconfig files
to express the necessary dependencies: The S390_CCW_VIRTIO config switch
for the "s390-ccw-virtio" machine now selects all non-optional devices.

And since we already have the VIRTIO_PCI and VIRTIO_MMIO config switches
for the other two virtio transports, this patch also introduces a new
config switch VIRTIO_CCW for the third, s390x-specific virtio transport,
so that all three virtio transports are now handled in the same way.

Signed-off-by: Thomas Huth <thuth@redhat.com>
---
 v2:
 - Use CONFIG_TERMINAL3270 for 3270-ccw.o
 - Use CONFIG_VIRTIO_CCW for all related devices in the Makefile

 default-configs/s390x-softmmu.mak | 12 ++++++++----
 hw/s390x/Kconfig                  |  4 ++++
 hw/s390x/Makefile.objs            |  4 +++-
 hw/virtio/Kconfig                 |  4 ++++
 4 files changed, 19 insertions(+), 5 deletions(-)

diff --git a/default-configs/s390x-softmmu.mak b/default-configs/s390x-softmmu.mak
index 2be5059..08b1683 100644
--- a/default-configs/s390x-softmmu.mak
+++ b/default-configs/s390x-softmmu.mak
@@ -1,9 +1,13 @@
-CONFIG_PCI=y
+# Default configuration for s390x-softmmu
+
+# Optional devices:
+#
 CONFIG_VIRTIO_PCI=y
-CONFIG_SCLPCONSOLE=y
 CONFIG_TERMINAL3270=y
-CONFIG_S390_FLIC=y
 CONFIG_WDT_DIAG288=y
-CONFIG_S390_CCW_VIRTIO=y
 CONFIG_VFIO_CCW=y
 CONFIG_VFIO_AP=y
+
+# Boards:
+#
+CONFIG_S390_CCW_VIRTIO=y
diff --git a/hw/s390x/Kconfig b/hw/s390x/Kconfig
index 303db7f..9a36c39 100644
--- a/hw/s390x/Kconfig
+++ b/hw/s390x/Kconfig
@@ -1,2 +1,6 @@
 config S390_CCW_VIRTIO
     bool
+    select PCI
+    select S390_FLIC
+    select SCLPCONSOLE
+    select VIRTIO_CCW
diff --git a/hw/s390x/Makefile.objs b/hw/s390x/Makefile.objs
index a884aae..ac56a63 100644
--- a/hw/s390x/Makefile.objs
+++ b/hw/s390x/Makefile.objs
@@ -7,7 +7,8 @@ obj-y += sclpcpu.o
 obj-y += ipl.o
 obj-y += css.o
 obj-y += s390-virtio-ccw.o
-obj-y += 3270-ccw.o
+obj-$(CONFIG_TERMINAL3270) += 3270-ccw.o
+ifeq ($(CONFIG_VIRTIO_CCW),y)
 obj-y += virtio-ccw.o
 obj-$(CONFIG_VIRTIO_SERIAL) += virtio-ccw-serial.o
 obj-$(CONFIG_VIRTIO_BALLOON) += virtio-ccw-balloon.o
@@ -20,6 +21,7 @@ obj-$(CONFIG_VIRTIO_NET) += virtio-ccw-net.o
 obj-$(CONFIG_VIRTIO_BLK) += virtio-ccw-blk.o
 obj-$(call land,$(CONFIG_VIRTIO_9P),$(CONFIG_VIRTFS)) += virtio-ccw-9p.o
 obj-$(CONFIG_VHOST_VSOCK) += vhost-vsock-ccw.o
+endif
 obj-y += css-bridge.o
 obj-y += ccw-device.o
 obj-$(CONFIG_PCI) += s390-pci-bus.o s390-pci-inst.o
diff --git a/hw/virtio/Kconfig b/hw/virtio/Kconfig
index 74f4573..e0452de 100644
--- a/hw/virtio/Kconfig
+++ b/hw/virtio/Kconfig
@@ -16,6 +16,10 @@ config VIRTIO_MMIO
     bool
     select VIRTIO
 
+config VIRTIO_CCW
+    bool
+    select VIRTIO
+
 config VIRTIO_BALLOON
     bool
     default y
-- 
1.8.3.1

^ permalink raw reply related	[flat|nested] 33+ messages in thread

* Re: [Qemu-devel] [qemu-s390x] [PATCH v2] s390x: express dependencies with Kconfig
  2019-01-29  9:42     ` [Qemu-devel] [PATCH v2] " Thomas Huth
@ 2019-01-29  9:49       ` Cornelia Huck
  2019-01-29 10:07         ` Paolo Bonzini
  0 siblings, 1 reply; 33+ messages in thread
From: Cornelia Huck @ 2019-01-29  9:49 UTC (permalink / raw)
  To: Thomas Huth; +Cc: qemu-devel, yang.zhong, pbonzini, qemu-s390x

On Tue, 29 Jan 2019 10:42:14 +0100
Thomas Huth <thuth@redhat.com> wrote:

> Instead of hard-coding all config switches in the config file
> default-configs/s390x-softmmu.mak, let's use the new Kconfig files
> to express the necessary dependencies: The S390_CCW_VIRTIO config switch
> for the "s390-ccw-virtio" machine now selects all non-optional devices.
> 
> And since we already have the VIRTIO_PCI and VIRTIO_MMIO config switches
> for the other two virtio transports, this patch also introduces a new
> config switch VIRTIO_CCW for the third, s390x-specific virtio transport,
> so that all three virtio transports are now handled in the same way.
> 
> Signed-off-by: Thomas Huth <thuth@redhat.com>
> ---
>  v2:
>  - Use CONFIG_TERMINAL3270 for 3270-ccw.o
>  - Use CONFIG_VIRTIO_CCW for all related devices in the Makefile
> 
>  default-configs/s390x-softmmu.mak | 12 ++++++++----
>  hw/s390x/Kconfig                  |  4 ++++
>  hw/s390x/Makefile.objs            |  4 +++-
>  hw/virtio/Kconfig                 |  4 ++++
>  4 files changed, 19 insertions(+), 5 deletions(-)

Looks sane to me.

As I have not looked into the Kconfig infrastructure, I don't feel
comfortable enough to give a R-b, but have a

Acked-by: Cornelia Huck <cohuck@redhat.com>

^ permalink raw reply	[flat|nested] 33+ messages in thread

* Re: [Qemu-devel] [qemu-s390x] [PATCH v2] s390x: express dependencies with Kconfig
  2019-01-29  9:49       ` [Qemu-devel] [qemu-s390x] " Cornelia Huck
@ 2019-01-29 10:07         ` Paolo Bonzini
  2019-01-29 11:02           ` Yang Zhong
  0 siblings, 1 reply; 33+ messages in thread
From: Paolo Bonzini @ 2019-01-29 10:07 UTC (permalink / raw)
  To: Cornelia Huck, Thomas Huth; +Cc: qemu-devel, yang.zhong, qemu-s390x

On 29/01/19 10:49, Cornelia Huck wrote:
> On Tue, 29 Jan 2019 10:42:14 +0100
> Thomas Huth <thuth@redhat.com> wrote:
> 
>> Instead of hard-coding all config switches in the config file
>> default-configs/s390x-softmmu.mak, let's use the new Kconfig files
>> to express the necessary dependencies: The S390_CCW_VIRTIO config switch
>> for the "s390-ccw-virtio" machine now selects all non-optional devices.
>>
>> And since we already have the VIRTIO_PCI and VIRTIO_MMIO config switches
>> for the other two virtio transports, this patch also introduces a new
>> config switch VIRTIO_CCW for the third, s390x-specific virtio transport,
>> so that all three virtio transports are now handled in the same way.
>>
>> Signed-off-by: Thomas Huth <thuth@redhat.com>
>> ---
>>  v2:
>>  - Use CONFIG_TERMINAL3270 for 3270-ccw.o
>>  - Use CONFIG_VIRTIO_CCW for all related devices in the Makefile
>>
>>  default-configs/s390x-softmmu.mak | 12 ++++++++----
>>  hw/s390x/Kconfig                  |  4 ++++
>>  hw/s390x/Makefile.objs            |  4 +++-
>>  hw/virtio/Kconfig                 |  4 ++++
>>  4 files changed, 19 insertions(+), 5 deletions(-)
> 
> Looks sane to me.
> 
> As I have not looked into the Kconfig infrastructure, I don't feel
> comfortable enough to give a R-b, but have a
> 
> Acked-by: Cornelia Huck <cohuck@redhat.com>
> 

Thanks.  Yang, can you integrate it into the next version?

Paolo

^ permalink raw reply	[flat|nested] 33+ messages in thread

* Re: [Qemu-devel] [qemu-s390x] [PATCH v2] s390x: express dependencies with Kconfig
  2019-01-29 10:07         ` Paolo Bonzini
@ 2019-01-29 11:02           ` Yang Zhong
  0 siblings, 0 replies; 33+ messages in thread
From: Yang Zhong @ 2019-01-29 11:02 UTC (permalink / raw)
  To: Paolo Bonzini
  Cc: qemu-devel, qemu-s390x, Cornelia Huck, Thomas Huth, yang.zhong

On Tue, Jan 29, 2019 at 11:07:19AM +0100, Paolo Bonzini wrote:
> On 29/01/19 10:49, Cornelia Huck wrote:
> > On Tue, 29 Jan 2019 10:42:14 +0100
> > Thomas Huth <thuth@redhat.com> wrote:
> > 
> >> Instead of hard-coding all config switches in the config file
> >> default-configs/s390x-softmmu.mak, let's use the new Kconfig files
> >> to express the necessary dependencies: The S390_CCW_VIRTIO config switch
> >> for the "s390-ccw-virtio" machine now selects all non-optional devices.
> >>
> >> And since we already have the VIRTIO_PCI and VIRTIO_MMIO config switches
> >> for the other two virtio transports, this patch also introduces a new
> >> config switch VIRTIO_CCW for the third, s390x-specific virtio transport,
> >> so that all three virtio transports are now handled in the same way.
> >>
> >> Signed-off-by: Thomas Huth <thuth@redhat.com>
> >> ---
> >>  v2:
> >>  - Use CONFIG_TERMINAL3270 for 3270-ccw.o
> >>  - Use CONFIG_VIRTIO_CCW for all related devices in the Makefile
> >>
> >>  default-configs/s390x-softmmu.mak | 12 ++++++++----
> >>  hw/s390x/Kconfig                  |  4 ++++
> >>  hw/s390x/Makefile.objs            |  4 +++-
> >>  hw/virtio/Kconfig                 |  4 ++++
> >>  4 files changed, 19 insertions(+), 5 deletions(-)
> > 
> > Looks sane to me.
> > 
> > As I have not looked into the Kconfig infrastructure, I don't feel
> > comfortable enough to give a R-b, but have a
> > 
> > Acked-by: Cornelia Huck <cohuck@redhat.com>
> > 
> 
> Thanks.  Yang, can you integrate it into the next version?
> 
  Yes, i will integrate this patch into Kconfig series patches. thanks all!

  Regards,

  Yang

> Paolo

^ permalink raw reply	[flat|nested] 33+ messages in thread

* [Qemu-devel] [RFC PATCH 0/5] Kconfig dependencies for ppc machines
       [not found] <3f01a301-d639-dbe7-f522-42a50e2d443e@redhat.com>
  2019-01-28 15:29 ` [Qemu-devel] [PATCH] s390x: express dependencies with Kconfig Thomas Huth
@ 2019-01-30  9:43 ` Thomas Huth
  2019-01-30  9:43   ` [Qemu-devel] [RFC PATCH 1/5] ppc64: Express dependencies of 'pseries' and 'powernv' machines with kconfig Thomas Huth
                     ` (5 more replies)
  1 sibling, 6 replies; 33+ messages in thread
From: Thomas Huth @ 2019-01-30  9:43 UTC (permalink / raw)
  To: qemu-devel, yang.zhong; +Cc: pbonzini, qemu-ppc

Here's now my stab at expressing the ppc machine dependencies with
Kconfig. I've carefully stepped through the dependencies and tried to
built each machine separately (which should be possible now, apart
from some few quirks like the RTAS dependency in qtest.c which I will
address later).

Yang, unless there are complaints, could you please add these patches
to your Kconfig series? Thanks!

Thomas Huth (5):
  ppc64: Express dependencies of 'pseries' and 'powernv' machines with
    kconfig
  ppc: Express dependencies of the 'prep' and '40p' machines with
    kconfig
  ppc: Express dependencies of the Mac machines with kconfig
  ppc: Express dependencies of the Sam460EX machines with kconfig
  ppc: Express dependencies of the embedded machines with kconfig

 default-configs/ppc-softmmu.mak   | 51 +++------------------------------------
 default-configs/ppc64-softmmu.mak |  7 ------
 hw/display/Kconfig                |  1 +
 hw/intc/Kconfig                   |  4 +--
 hw/mem/Kconfig                    |  1 +
 hw/misc/Kconfig                   |  8 ++++++
 hw/net/Kconfig                    |  2 ++
 hw/pci-host/Kconfig               |  4 ++-
 hw/ppc/Kconfig                    | 48 ++++++++++++++++++++++++++++++++++++
 hw/usb/Kconfig                    |  2 +-
 10 files changed, 69 insertions(+), 59 deletions(-)

-- 
1.8.3.1

^ permalink raw reply	[flat|nested] 33+ messages in thread

* [Qemu-devel] [RFC PATCH 1/5] ppc64: Express dependencies of 'pseries' and 'powernv' machines with kconfig
  2019-01-30  9:43 ` [Qemu-devel] [RFC PATCH 0/5] Kconfig dependencies for ppc machines Thomas Huth
@ 2019-01-30  9:43   ` Thomas Huth
  2019-01-30  9:57     ` Paolo Bonzini
  2019-01-30 11:00     ` Cédric Le Goater
  2019-01-30  9:43   ` [Qemu-devel] [RFC PATCH 2/5] ppc: Express dependencies of the 'prep' and '40p' " Thomas Huth
                     ` (4 subsequent siblings)
  5 siblings, 2 replies; 33+ messages in thread
From: Thomas Huth @ 2019-01-30  9:43 UTC (permalink / raw)
  To: qemu-devel, yang.zhong; +Cc: pbonzini, qemu-ppc, Cédric Le Goater

The POWERNV switch should always select ISA_IPMI_BT, then the other
IPMI options are turned on automatically now.
CONFIG_DIMM should always be selected by the pseries machine,
which in turn depends on CONFIG_MEM_DEVICE since DIMM implements
this interface.
CONFIG_VIRTIO_VGA can be dropped from default-configs/ppc64-softmmu.mak
completely since this device is already automatically enabled via
hw/display/Kconfig now.
CONFIG_SPAPR_RNG should stay in the ppc-softmmu.mak file since this
is a completely optional device.

Cc: Cédric Le Goater <clg@kaod.org>
Signed-off-by: Thomas Huth <thuth@redhat.com>
---
 default-configs/ppc64-softmmu.mak | 7 -------
 hw/intc/Kconfig                   | 4 +---
 hw/mem/Kconfig                    | 1 +
 hw/ppc/Kconfig                    | 9 +++++++++
 4 files changed, 11 insertions(+), 10 deletions(-)

diff --git a/default-configs/ppc64-softmmu.mak b/default-configs/ppc64-softmmu.mak
index a0a9151..6f8d7ea 100644
--- a/default-configs/ppc64-softmmu.mak
+++ b/default-configs/ppc64-softmmu.mak
@@ -5,14 +5,7 @@ include ppc-softmmu.mak
 
 # For PowerNV
 CONFIG_POWERNV=y
-CONFIG_IPMI=y
-CONFIG_IPMI_LOCAL=y
-CONFIG_IPMI_EXTERN=y
-CONFIG_ISA_IPMI_BT=y
 
 # For pSeries
 CONFIG_PSERIES=y
-CONFIG_VIRTIO_VGA=y
-CONFIG_MEM_DEVICE=y
-CONFIG_DIMM=y
 CONFIG_SPAPR_RNG=y
diff --git a/hw/intc/Kconfig b/hw/intc/Kconfig
index 6eea14e..1e819d0 100644
--- a/hw/intc/Kconfig
+++ b/hw/intc/Kconfig
@@ -31,13 +31,11 @@ config OPENPIC_KVM
 
 config XICS
     bool
-    default y
-    depends on PSERIES
 
 config XICS_SPAPR
     bool
     default y
-    depends on PSERIES
+    depends on XICS && PSERIES
 
 config XICS_KVM
     bool
diff --git a/hw/mem/Kconfig b/hw/mem/Kconfig
index d1e635c..620fd4c 100644
--- a/hw/mem/Kconfig
+++ b/hw/mem/Kconfig
@@ -1,5 +1,6 @@
 config DIMM
     bool
+    select MEM_DEVICE
 
 config MEM_DEVICE
     bool
diff --git a/hw/ppc/Kconfig b/hw/ppc/Kconfig
index b0095e1..b44e3bd 100644
--- a/hw/ppc/Kconfig
+++ b/hw/ppc/Kconfig
@@ -1,11 +1,20 @@
 config PSERIES
     bool
+    select DIMM
+    select PCI
+    select VFIO
+    select XICS
 
 config SPAPR_RNG
     bool
+    depends on PSERIES
 
 config POWERNV
     bool
+    select ISA_IPMI_BT
+    select ISA_BUS
+    select MC146818RTC
+    select XICS
 
 config PPC405
     bool
-- 
1.8.3.1

^ permalink raw reply related	[flat|nested] 33+ messages in thread

* [Qemu-devel] [RFC PATCH 2/5] ppc: Express dependencies of the 'prep' and '40p' machines with kconfig
  2019-01-30  9:43 ` [Qemu-devel] [RFC PATCH 0/5] Kconfig dependencies for ppc machines Thomas Huth
  2019-01-30  9:43   ` [Qemu-devel] [RFC PATCH 1/5] ppc64: Express dependencies of 'pseries' and 'powernv' machines with kconfig Thomas Huth
@ 2019-01-30  9:43   ` Thomas Huth
  2019-01-30 10:17     ` Paolo Bonzini
  2019-01-30  9:43   ` [Qemu-devel] [RFC PATCH 3/5] ppc: Express dependencies of the Mac " Thomas Huth
                     ` (3 subsequent siblings)
  5 siblings, 1 reply; 33+ messages in thread
From: Thomas Huth @ 2019-01-30  9:43 UTC (permalink / raw)
  To: qemu-devel, yang.zhong; +Cc: pbonzini, qemu-ppc, Hervé Poussineau

Select the required devices in hw/ppc/Kconfig instead, so that
ppc-softmmu.mak only contains the user-selectable PREP switch.
Plug-in devices like NE2000_ISA are pulled in automatically by the
Kconfig build system now.

Cc: Hervé Poussineau <hpoussin@reactos.org>
Signed-off-by: Thomas Huth <thuth@redhat.com>
---
 default-configs/ppc-softmmu.mak | 8 --------
 hw/ppc/Kconfig                  | 8 ++++++++
 2 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/default-configs/ppc-softmmu.mak b/default-configs/ppc-softmmu.mak
index 05ba726..422f1b7 100644
--- a/default-configs/ppc-softmmu.mak
+++ b/default-configs/ppc-softmmu.mak
@@ -57,11 +57,3 @@ CONFIG_MAC_NEWWORLD=y
 
 # For PReP
 CONFIG_PREP=y
-CONFIG_PREP_PCI=y
-CONFIG_RS6000_MC=y
-CONFIG_I82374=y
-CONFIG_I82378=y
-CONFIG_PCKBD=y
-CONFIG_NE2000_ISA=y
-CONFIG_PC87312=y
-CONFIG_CS4231A=y
diff --git a/hw/ppc/Kconfig b/hw/ppc/Kconfig
index b44e3bd..809830e 100644
--- a/hw/ppc/Kconfig
+++ b/hw/ppc/Kconfig
@@ -30,6 +30,14 @@ config SAM460EX
 
 config PREP
     bool
+    select CS4231A
+    select PREP_PCI
+    select I82374
+    select I82378
+    select LSI_SCSI_PCI
+    select M48T59
+    select PC87312
+    select RS6000_MC
 
 config RS6000_MC
     bool
-- 
1.8.3.1

^ permalink raw reply related	[flat|nested] 33+ messages in thread

* [Qemu-devel] [RFC PATCH 3/5] ppc: Express dependencies of the Mac machines with kconfig
  2019-01-30  9:43 ` [Qemu-devel] [RFC PATCH 0/5] Kconfig dependencies for ppc machines Thomas Huth
  2019-01-30  9:43   ` [Qemu-devel] [RFC PATCH 1/5] ppc64: Express dependencies of 'pseries' and 'powernv' machines with kconfig Thomas Huth
  2019-01-30  9:43   ` [Qemu-devel] [RFC PATCH 2/5] ppc: Express dependencies of the 'prep' and '40p' " Thomas Huth
@ 2019-01-30  9:43   ` Thomas Huth
  2019-01-30 10:18     ` Paolo Bonzini
  2019-01-30 17:13     ` Mark Cave-Ayland
  2019-01-30  9:43   ` [Qemu-devel] [RFC PATCH 4/5] ppc: Express dependencies of the Sam460EX " Thomas Huth
                     ` (2 subsequent siblings)
  5 siblings, 2 replies; 33+ messages in thread
From: Thomas Huth @ 2019-01-30  9:43 UTC (permalink / raw)
  To: qemu-devel, yang.zhong; +Cc: pbonzini, qemu-ppc, Mark Cave-Ayland

This will make it for example easier if the users want to disable
one of the two machines for their builds.

Cc: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Signed-off-by: Thomas Huth <thuth@redhat.com>
---
 default-configs/ppc-softmmu.mak | 15 ---------------
 hw/misc/Kconfig                 |  8 ++++++++
 hw/net/Kconfig                  |  2 ++
 hw/pci-host/Kconfig             |  4 +++-
 hw/ppc/Kconfig                  |  7 +++++++
 5 files changed, 20 insertions(+), 16 deletions(-)

diff --git a/default-configs/ppc-softmmu.mak b/default-configs/ppc-softmmu.mak
index 422f1b7..513a8e9 100644
--- a/default-configs/ppc-softmmu.mak
+++ b/default-configs/ppc-softmmu.mak
@@ -37,21 +37,6 @@ CONFIG_VGA_CIRRUS=y
 CONFIG_SMBUS_EEPROM=y
 
 # For Macs
-CONFIG_ESCC=y
-CONFIG_MACIO=y
-CONFIG_MACIO_GPIO=y
-CONFIG_SUNGEM=y
-CONFIG_MOS6522=y
-CONFIG_CUDA=y
-CONFIG_ADB=y
-CONFIG_MAC_NVRAM=y
-CONFIG_MAC_DBDMA=y
-CONFIG_MAC_PMU=y
-CONFIG_HEATHROW_PIC=y
-CONFIG_GRACKLE_PCI=y
-CONFIG_UNIN_PCI=y
-CONFIG_DEC_PCI=y
-CONFIG_IDE_MACIO=y
 CONFIG_MAC_OLDWORLD=y
 CONFIG_MAC_NEWWORLD=y
 
diff --git a/hw/misc/Kconfig b/hw/misc/Kconfig
index 3ebe30f..f392502 100644
--- a/hw/misc/Kconfig
+++ b/hw/misc/Kconfig
@@ -59,6 +59,14 @@ config MOS6522
 
 config MACIO
     bool
+    select CUDA
+    select ESCC
+    select IDE_MACIO
+    select MACIO_GPIO
+    select MAC_DBDMA
+    select MAC_NVRAM
+    select MAC_PMU
+    select MOS6522
 
 config IVSHMEM_DEVICE
     bool
diff --git a/hw/net/Kconfig b/hw/net/Kconfig
index 47368d7..9047f6d 100644
--- a/hw/net/Kconfig
+++ b/hw/net/Kconfig
@@ -85,6 +85,8 @@ config FTGMAC100
 
 config SUNGEM
     bool
+    default y if (MAC_OLDWORLD || MAC_NEWWORLD)
+    depends on PCI
 
 config COLDFIRE
     bool
diff --git a/hw/pci-host/Kconfig b/hw/pci-host/Kconfig
index ff4080c..b39ea29 100644
--- a/hw/pci-host/Kconfig
+++ b/hw/pci-host/Kconfig
@@ -10,8 +10,10 @@ config GRACKLE_PCI
     bool
 
 config UNIN_PCI
-    select PCI
     bool
+    select PCI
+    select DEC_PCI
+    select OPENPIC
 
 config PPCE500_PCI
     select PCI
diff --git a/hw/ppc/Kconfig b/hw/ppc/Kconfig
index 809830e..f6b4206 100644
--- a/hw/ppc/Kconfig
+++ b/hw/ppc/Kconfig
@@ -44,9 +44,16 @@ config RS6000_MC
 
 config MAC_OLDWORLD
     bool
+    select ADB
+    select GRACKLE_PCI
+    select HEATHROW_PIC
+    select MACIO
 
 config MAC_NEWWORLD
     bool
+    select ADB
+    select MACIO
+    select UNIN_PCI
 
 config E500
     bool
-- 
1.8.3.1

^ permalink raw reply related	[flat|nested] 33+ messages in thread

* [Qemu-devel] [RFC PATCH 4/5] ppc: Express dependencies of the Sam460EX machines with kconfig
  2019-01-30  9:43 ` [Qemu-devel] [RFC PATCH 0/5] Kconfig dependencies for ppc machines Thomas Huth
                     ` (2 preceding siblings ...)
  2019-01-30  9:43   ` [Qemu-devel] [RFC PATCH 3/5] ppc: Express dependencies of the Mac " Thomas Huth
@ 2019-01-30  9:43   ` Thomas Huth
  2019-01-30 10:18     ` Paolo Bonzini
  2019-01-30 11:29     ` BALATON Zoltan
  2019-01-30  9:43   ` [Qemu-devel] [RFC PATCH 5/5] ppc: Express dependencies of the embedded " Thomas Huth
  2019-01-30 10:59   ` [Qemu-devel] [RFC PATCH 0/5] Kconfig dependencies for ppc machines Yang Zhong
  5 siblings, 2 replies; 33+ messages in thread
From: Thomas Huth @ 2019-01-30  9:43 UTC (permalink / raw)
  To: qemu-devel, yang.zhong; +Cc: pbonzini, qemu-ppc, BALATON Zoltan

Most of the dependencies are now directly selected by the SAM460EX
switch. We can drop CONFIG_VGA_CIRRUS since this device is already
selected automatically when CONFIG_PCI_DEVICES is set.

Cc: BALATON Zoltan <balaton@eik.bme.hu>
Signed-off-by: Thomas Huth <thuth@redhat.com>
---
 default-configs/ppc-softmmu.mak | 10 ----------
 hw/display/Kconfig              |  1 +
 hw/ppc/Kconfig                  | 12 ++++++++++++
 hw/usb/Kconfig                  |  2 +-
 4 files changed, 14 insertions(+), 11 deletions(-)

diff --git a/default-configs/ppc-softmmu.mak b/default-configs/ppc-softmmu.mak
index 513a8e9..5265d8a 100644
--- a/default-configs/ppc-softmmu.mak
+++ b/default-configs/ppc-softmmu.mak
@@ -25,16 +25,6 @@ CONFIG_PCI_EXPRESS=y
 
 # For Sam460ex
 CONFIG_SAM460EX=y
-CONFIG_USB_EHCI_SYSBUS=y
-CONFIG_SM501=y
-CONFIG_DDC=y
-CONFIG_IDE_SII3112=y
-CONFIG_I2C=y
-CONFIG_AT24C=y
-CONFIG_BITBANG_I2C=y
-CONFIG_M41T80=y
-CONFIG_VGA_CIRRUS=y
-CONFIG_SMBUS_EEPROM=y
 
 # For Macs
 CONFIG_MAC_OLDWORLD=y
diff --git a/hw/display/Kconfig b/hw/display/Kconfig
index c784fe8..f8e6136 100644
--- a/hw/display/Kconfig
+++ b/hw/display/Kconfig
@@ -76,6 +76,7 @@ config MILKYMIST_TMU2
 config SM501
     bool
     depends on I2C
+    select DDC
 
 config TCX
     bool
diff --git a/hw/ppc/Kconfig b/hw/ppc/Kconfig
index f6b4206..8bd25ed 100644
--- a/hw/ppc/Kconfig
+++ b/hw/ppc/Kconfig
@@ -24,9 +24,21 @@ config PPC440
 
 config PPC4XX
     bool
+    select BITBANG_I2C
+    select PCI
 
 config SAM460EX
     bool
+    select AT24C
+    select PFLASH_CFI01
+    select IDE_SII3112
+    select ISA_BUS          # FIXME: Currently required for IDE_SII3112
+    select M41T80
+    select PPC440
+    select SM501
+    select SMBUS_EEPROM
+    select USB_EHCI_SYSBUS
+    select USB_OHCI
 
 config PREP
     bool
diff --git a/hw/usb/Kconfig b/hw/usb/Kconfig
index a1b7acb..871ea47 100644
--- a/hw/usb/Kconfig
+++ b/hw/usb/Kconfig
@@ -21,7 +21,7 @@ config USB_EHCI
 
 config USB_EHCI_SYSBUS
     bool
-    select USB
+    select USB_EHCI
 
 config USB_XHCI
     bool
-- 
1.8.3.1

^ permalink raw reply related	[flat|nested] 33+ messages in thread

* [Qemu-devel] [RFC PATCH 5/5] ppc: Express dependencies of the embedded machines with kconfig
  2019-01-30  9:43 ` [Qemu-devel] [RFC PATCH 0/5] Kconfig dependencies for ppc machines Thomas Huth
                     ` (3 preceding siblings ...)
  2019-01-30  9:43   ` [Qemu-devel] [RFC PATCH 4/5] ppc: Express dependencies of the Sam460EX " Thomas Huth
@ 2019-01-30  9:43   ` Thomas Huth
  2019-01-30 10:18     ` Paolo Bonzini
  2019-01-30 10:59   ` [Qemu-devel] [RFC PATCH 0/5] Kconfig dependencies for ppc machines Yang Zhong
  5 siblings, 1 reply; 33+ messages in thread
From: Thomas Huth @ 2019-01-30  9:43 UTC (permalink / raw)
  To: qemu-devel, yang.zhong; +Cc: pbonzini, qemu-ppc, Edgar E. Iglesias

This makes it much easier if the users want to disable some of
the embedded machines for their builds.

Cc: Edgar E. Iglesias <edgar.iglesias@gmail.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
---
 default-configs/ppc-softmmu.mak | 18 ++++--------------
 hw/ppc/Kconfig                  | 12 ++++++++++++
 2 files changed, 16 insertions(+), 14 deletions(-)

diff --git a/default-configs/ppc-softmmu.mak b/default-configs/ppc-softmmu.mak
index 5265d8a..5192aca 100644
--- a/default-configs/ppc-softmmu.mak
+++ b/default-configs/ppc-softmmu.mak
@@ -1,27 +1,17 @@
 # Default configuration for ppc-softmmu
 
-CONFIG_PCI=y
 CONFIG_PCI_DEVICES=y
-CONFIG_ISA_BUS=y
 CONFIG_TEST_DEVICES=y
 
-# For embedded PPCs:
-CONFIG_PPC4XX=y
-CONFIG_M48T59=y
+# FIXME: CONFIG_SERIAL is currently still required to link all of the
+# ppc machines (due to the usage of serial_mm_init() in ppc405_uc.c).
 CONFIG_SERIAL=y
-CONFIG_OPENPIC=y
-CONFIG_PPCE500_PCI=y
-CONFIG_PFLASH_CFI01=y
-CONFIG_PFLASH_CFI02=y
-CONFIG_XILINX=y
-CONFIG_XILINX_ETHLITE=y
+
+# For embedded PPCs:
 CONFIG_E500=y
-CONFIG_PLATFORM_BUS=y
-CONFIG_ETSEC=y
 CONFIG_PPC405=y
 CONFIG_PPC440=y
 CONFIG_VIRTEX=y
-CONFIG_PCI_EXPRESS=y
 
 # For Sam460ex
 CONFIG_SAM460EX=y
diff --git a/hw/ppc/Kconfig b/hw/ppc/Kconfig
index 8bd25ed..ab9b828 100644
--- a/hw/ppc/Kconfig
+++ b/hw/ppc/Kconfig
@@ -18,9 +18,14 @@ config POWERNV
 
 config PPC405
     bool
+    select M48T59
+    select PFLASH_CFI02
+    select PPC4XX
 
 config PPC440
     bool
+    select PCI_EXPRESS
+    select PPC4XX
 
 config PPC4XX
     bool
@@ -69,9 +74,16 @@ config MAC_NEWWORLD
 
 config E500
     bool
+    select ETSEC
+    select OPENPIC
+    select PLATFORM_BUS
+    select PPCE500_PCI
 
 config VIRTEX
     bool
+    select PFLASH_CFI01
+    select XILINX
+    select XILINX_ETHLITE
 
 config MAC_DBDMA
     bool
-- 
1.8.3.1

^ permalink raw reply related	[flat|nested] 33+ messages in thread

* Re: [Qemu-devel] [RFC PATCH 1/5] ppc64: Express dependencies of 'pseries' and 'powernv' machines with kconfig
  2019-01-30  9:43   ` [Qemu-devel] [RFC PATCH 1/5] ppc64: Express dependencies of 'pseries' and 'powernv' machines with kconfig Thomas Huth
@ 2019-01-30  9:57     ` Paolo Bonzini
  2019-01-30 10:02       ` Thomas Huth
  2019-01-30 11:00     ` Cédric Le Goater
  1 sibling, 1 reply; 33+ messages in thread
From: Paolo Bonzini @ 2019-01-30  9:57 UTC (permalink / raw)
  To: Thomas Huth, qemu-devel, yang.zhong; +Cc: qemu-ppc, Cédric Le Goater

On 30/01/19 10:43, Thomas Huth wrote:
> CONFIG_SPAPR_RNG should stay in the ppc-softmmu.mak file since this
> is a completely optional device.

What about making it

    default y

and adding to the .mak file this:

#CONFIG_SPAPR_RNG=n

I think the two approaches are more or less equivalent, but
"#CONFIG_FOO=n" has a small advantage when the feature has a build-time
dependency, such as CONFIG_MILKYMIST_TMU2's dependency on OpenGL.  In
that case,

   CONFIG_MILKYMIST_TMU2=y

would report a contradiction if OpenGL is not available at build time, while

   default y
   ...
   #CONFIG_MILKYMIST_TMU2=n

would not.

In any case, there are many many such cases in x86 (QXL, HYPERV, FDC,
SEV, ISA_IPMI_*, APPLESMC, SGA, HPET, VTD, AMD_IOMMU, PVPANIC, TPM_TIS,
TPM_CRB) and they should be handled in the same way---and especially
they should be mentioned in the default-configs/ file under "Optional
devices".  So thanks for noticing this case!

Paolo

^ permalink raw reply	[flat|nested] 33+ messages in thread

* Re: [Qemu-devel] [RFC PATCH 1/5] ppc64: Express dependencies of 'pseries' and 'powernv' machines with kconfig
  2019-01-30  9:57     ` Paolo Bonzini
@ 2019-01-30 10:02       ` Thomas Huth
  2019-01-30 10:15         ` Paolo Bonzini
  0 siblings, 1 reply; 33+ messages in thread
From: Thomas Huth @ 2019-01-30 10:02 UTC (permalink / raw)
  To: Paolo Bonzini, qemu-devel, yang.zhong; +Cc: qemu-ppc, Cédric Le Goater

On 2019-01-30 10:57, Paolo Bonzini wrote:
> On 30/01/19 10:43, Thomas Huth wrote:
>> CONFIG_SPAPR_RNG should stay in the ppc-softmmu.mak file since this
>> is a completely optional device.
> 
> What about making it
> 
>     default y
> 
> and adding to the .mak file this:
> 
> #CONFIG_SPAPR_RNG=n
> 
> I think the two approaches are more or less equivalent, but
> "#CONFIG_FOO=n" has a small advantage when the feature has a build-time
> dependency, such as CONFIG_MILKYMIST_TMU2's dependency on OpenGL.  In
> that case,
> 
>    CONFIG_MILKYMIST_TMU2=y
> 
> would report a contradiction if OpenGL is not available at build time, while
> 
>    default y
>    ...
>    #CONFIG_MILKYMIST_TMU2=n
> 
> would not.

I somehow dislike the idea of adding lines that are commented out by
default. For example, if someone later renames or removes the config
switch in the Kconfig files, the comment could stay there without being
noticed, while a CONFIG_XXX=y would cause a clean build failure if the
option is not available anymore.

 Thomas

^ permalink raw reply	[flat|nested] 33+ messages in thread

* Re: [Qemu-devel] [RFC PATCH 1/5] ppc64: Express dependencies of 'pseries' and 'powernv' machines with kconfig
  2019-01-30 10:02       ` Thomas Huth
@ 2019-01-30 10:15         ` Paolo Bonzini
  0 siblings, 0 replies; 33+ messages in thread
From: Paolo Bonzini @ 2019-01-30 10:15 UTC (permalink / raw)
  To: Thomas Huth, qemu-devel, yang.zhong; +Cc: qemu-ppc, Cédric Le Goater

On 30/01/19 11:02, Thomas Huth wrote:
>> I think the two approaches are more or less equivalent, but
>> "#CONFIG_FOO=n" has a small advantage when the feature has a build-time
>> dependency, such as CONFIG_MILKYMIST_TMU2's dependency on OpenGL.  In
>> that case,
>>
>>    CONFIG_MILKYMIST_TMU2=y
>>
>> would report a contradiction if OpenGL is not available at build time, while
>>
>>    default y
>>    ...
>>    #CONFIG_MILKYMIST_TMU2=n
>>
>> would not.
> I somehow dislike the idea of adding lines that are commented out by
> default. For example, if someone later renames or removes the config
> switch in the Kconfig files, the comment could stay there without being
> noticed, while a CONFIG_XXX=y would cause a clean build failure if the
> option is not available anymore.

I agree.  On the other hand I don't see another solution for the
MILKYMIST_TMU2 and QXL cases, and consistency is a plus too.

How often are config switches renamed or removed, especially
user-visible optional devices though?  I see CONFIG_MEM_DEVICE,
CONFIG_PCI_APB, CONFIG_LIBDECNUMBER, CONFIG_XEN_I386,
CONFIG_MIPS_BOSTON, CONFIG_PIIX_PCI, CONFIG_ISA_MMIO, CONFIG_ICC_BUS
over the last few years but none probably would have been optional
devices in default-configs/ but rather in Kconfig files.

(Long term default-configs/ should probably be built automatically,
possibly by adding a description field to the Kconfig files, and that
would also ameliorate the issue you describe).

Paolo

^ permalink raw reply	[flat|nested] 33+ messages in thread

* Re: [Qemu-devel] [RFC PATCH 2/5] ppc: Express dependencies of the 'prep' and '40p' machines with kconfig
  2019-01-30  9:43   ` [Qemu-devel] [RFC PATCH 2/5] ppc: Express dependencies of the 'prep' and '40p' " Thomas Huth
@ 2019-01-30 10:17     ` Paolo Bonzini
  2019-01-30 10:25       ` Thomas Huth
  0 siblings, 1 reply; 33+ messages in thread
From: Paolo Bonzini @ 2019-01-30 10:17 UTC (permalink / raw)
  To: Thomas Huth, qemu-devel, yang.zhong; +Cc: qemu-ppc, Hervé Poussineau

On 30/01/19 10:43, Thomas Huth wrote:
> +    select LSI_SCSI_PCI

Should NE2000_ISA and LSI_SCSI_PCI be handled the same?  Either rely on
"default y" for both, or select both (I think I prefer the former).

Paolo

^ permalink raw reply	[flat|nested] 33+ messages in thread

* Re: [Qemu-devel] [RFC PATCH 3/5] ppc: Express dependencies of the Mac machines with kconfig
  2019-01-30  9:43   ` [Qemu-devel] [RFC PATCH 3/5] ppc: Express dependencies of the Mac " Thomas Huth
@ 2019-01-30 10:18     ` Paolo Bonzini
  2019-01-30 17:13     ` Mark Cave-Ayland
  1 sibling, 0 replies; 33+ messages in thread
From: Paolo Bonzini @ 2019-01-30 10:18 UTC (permalink / raw)
  To: Thomas Huth, qemu-devel, yang.zhong; +Cc: qemu-ppc, Mark Cave-Ayland

On 30/01/19 10:43, Thomas Huth wrote:
> This will make it for example easier if the users want to disable
> one of the two machines for their builds.
> 
> Cc: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
> Signed-off-by: Thomas Huth <thuth@redhat.com>

Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>

> ---
>  default-configs/ppc-softmmu.mak | 15 ---------------
>  hw/misc/Kconfig                 |  8 ++++++++
>  hw/net/Kconfig                  |  2 ++
>  hw/pci-host/Kconfig             |  4 +++-
>  hw/ppc/Kconfig                  |  7 +++++++
>  5 files changed, 20 insertions(+), 16 deletions(-)
> 
> diff --git a/default-configs/ppc-softmmu.mak b/default-configs/ppc-softmmu.mak
> index 422f1b7..513a8e9 100644
> --- a/default-configs/ppc-softmmu.mak
> +++ b/default-configs/ppc-softmmu.mak
> @@ -37,21 +37,6 @@ CONFIG_VGA_CIRRUS=y
>  CONFIG_SMBUS_EEPROM=y
>  
>  # For Macs
> -CONFIG_ESCC=y
> -CONFIG_MACIO=y
> -CONFIG_MACIO_GPIO=y
> -CONFIG_SUNGEM=y
> -CONFIG_MOS6522=y
> -CONFIG_CUDA=y
> -CONFIG_ADB=y
> -CONFIG_MAC_NVRAM=y
> -CONFIG_MAC_DBDMA=y
> -CONFIG_MAC_PMU=y
> -CONFIG_HEATHROW_PIC=y
> -CONFIG_GRACKLE_PCI=y
> -CONFIG_UNIN_PCI=y
> -CONFIG_DEC_PCI=y
> -CONFIG_IDE_MACIO=y
>  CONFIG_MAC_OLDWORLD=y
>  CONFIG_MAC_NEWWORLD=y
>  
> diff --git a/hw/misc/Kconfig b/hw/misc/Kconfig
> index 3ebe30f..f392502 100644
> --- a/hw/misc/Kconfig
> +++ b/hw/misc/Kconfig
> @@ -59,6 +59,14 @@ config MOS6522
>  
>  config MACIO
>      bool
> +    select CUDA
> +    select ESCC
> +    select IDE_MACIO
> +    select MACIO_GPIO
> +    select MAC_DBDMA
> +    select MAC_NVRAM
> +    select MAC_PMU
> +    select MOS6522
>  
>  config IVSHMEM_DEVICE
>      bool
> diff --git a/hw/net/Kconfig b/hw/net/Kconfig
> index 47368d7..9047f6d 100644
> --- a/hw/net/Kconfig
> +++ b/hw/net/Kconfig
> @@ -85,6 +85,8 @@ config FTGMAC100
>  
>  config SUNGEM
>      bool
> +    default y if (MAC_OLDWORLD || MAC_NEWWORLD)
> +    depends on PCI
>  
>  config COLDFIRE
>      bool
> diff --git a/hw/pci-host/Kconfig b/hw/pci-host/Kconfig
> index ff4080c..b39ea29 100644
> --- a/hw/pci-host/Kconfig
> +++ b/hw/pci-host/Kconfig
> @@ -10,8 +10,10 @@ config GRACKLE_PCI
>      bool
>  
>  config UNIN_PCI
> -    select PCI
>      bool
> +    select PCI
> +    select DEC_PCI
> +    select OPENPIC
>  
>  config PPCE500_PCI
>      select PCI
> diff --git a/hw/ppc/Kconfig b/hw/ppc/Kconfig
> index 809830e..f6b4206 100644
> --- a/hw/ppc/Kconfig
> +++ b/hw/ppc/Kconfig
> @@ -44,9 +44,16 @@ config RS6000_MC
>  
>  config MAC_OLDWORLD
>      bool
> +    select ADB
> +    select GRACKLE_PCI
> +    select HEATHROW_PIC
> +    select MACIO
>  
>  config MAC_NEWWORLD
>      bool
> +    select ADB
> +    select MACIO
> +    select UNIN_PCI
>  
>  config E500
>      bool
> 

^ permalink raw reply	[flat|nested] 33+ messages in thread

* Re: [Qemu-devel] [RFC PATCH 4/5] ppc: Express dependencies of the Sam460EX machines with kconfig
  2019-01-30  9:43   ` [Qemu-devel] [RFC PATCH 4/5] ppc: Express dependencies of the Sam460EX " Thomas Huth
@ 2019-01-30 10:18     ` Paolo Bonzini
  2019-01-30 11:29     ` BALATON Zoltan
  1 sibling, 0 replies; 33+ messages in thread
From: Paolo Bonzini @ 2019-01-30 10:18 UTC (permalink / raw)
  To: Thomas Huth, qemu-devel, yang.zhong; +Cc: qemu-ppc, BALATON Zoltan

On 30/01/19 10:43, Thomas Huth wrote:
> Most of the dependencies are now directly selected by the SAM460EX
> switch. We can drop CONFIG_VGA_CIRRUS since this device is already
> selected automatically when CONFIG_PCI_DEVICES is set.
> 
> Cc: BALATON Zoltan <balaton@eik.bme.hu>
> Signed-off-by: Thomas Huth <thuth@redhat.com>

Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>

> ---
>  default-configs/ppc-softmmu.mak | 10 ----------
>  hw/display/Kconfig              |  1 +
>  hw/ppc/Kconfig                  | 12 ++++++++++++
>  hw/usb/Kconfig                  |  2 +-
>  4 files changed, 14 insertions(+), 11 deletions(-)
> 
> diff --git a/default-configs/ppc-softmmu.mak b/default-configs/ppc-softmmu.mak
> index 513a8e9..5265d8a 100644
> --- a/default-configs/ppc-softmmu.mak
> +++ b/default-configs/ppc-softmmu.mak
> @@ -25,16 +25,6 @@ CONFIG_PCI_EXPRESS=y
>  
>  # For Sam460ex
>  CONFIG_SAM460EX=y
> -CONFIG_USB_EHCI_SYSBUS=y
> -CONFIG_SM501=y
> -CONFIG_DDC=y
> -CONFIG_IDE_SII3112=y
> -CONFIG_I2C=y
> -CONFIG_AT24C=y
> -CONFIG_BITBANG_I2C=y
> -CONFIG_M41T80=y
> -CONFIG_VGA_CIRRUS=y
> -CONFIG_SMBUS_EEPROM=y
>  
>  # For Macs
>  CONFIG_MAC_OLDWORLD=y
> diff --git a/hw/display/Kconfig b/hw/display/Kconfig
> index c784fe8..f8e6136 100644
> --- a/hw/display/Kconfig
> +++ b/hw/display/Kconfig
> @@ -76,6 +76,7 @@ config MILKYMIST_TMU2
>  config SM501
>      bool
>      depends on I2C
> +    select DDC
>  
>  config TCX
>      bool
> diff --git a/hw/ppc/Kconfig b/hw/ppc/Kconfig
> index f6b4206..8bd25ed 100644
> --- a/hw/ppc/Kconfig
> +++ b/hw/ppc/Kconfig
> @@ -24,9 +24,21 @@ config PPC440
>  
>  config PPC4XX
>      bool
> +    select BITBANG_I2C
> +    select PCI
>  
>  config SAM460EX
>      bool
> +    select AT24C
> +    select PFLASH_CFI01
> +    select IDE_SII3112
> +    select ISA_BUS          # FIXME: Currently required for IDE_SII3112
> +    select M41T80
> +    select PPC440
> +    select SM501
> +    select SMBUS_EEPROM
> +    select USB_EHCI_SYSBUS
> +    select USB_OHCI
>  
>  config PREP
>      bool
> diff --git a/hw/usb/Kconfig b/hw/usb/Kconfig
> index a1b7acb..871ea47 100644
> --- a/hw/usb/Kconfig
> +++ b/hw/usb/Kconfig
> @@ -21,7 +21,7 @@ config USB_EHCI
>  
>  config USB_EHCI_SYSBUS
>      bool
> -    select USB
> +    select USB_EHCI
>  
>  config USB_XHCI
>      bool
> 

^ permalink raw reply	[flat|nested] 33+ messages in thread

* Re: [Qemu-devel] [RFC PATCH 5/5] ppc: Express dependencies of the embedded machines with kconfig
  2019-01-30  9:43   ` [Qemu-devel] [RFC PATCH 5/5] ppc: Express dependencies of the embedded " Thomas Huth
@ 2019-01-30 10:18     ` Paolo Bonzini
  0 siblings, 0 replies; 33+ messages in thread
From: Paolo Bonzini @ 2019-01-30 10:18 UTC (permalink / raw)
  To: Thomas Huth, qemu-devel, yang.zhong; +Cc: qemu-ppc, Edgar E. Iglesias

On 30/01/19 10:43, Thomas Huth wrote:
> This makes it much easier if the users want to disable some of
> the embedded machines for their builds.
> 
> Cc: Edgar E. Iglesias <edgar.iglesias@gmail.com>
> Signed-off-by: Thomas Huth <thuth@redhat.com>

Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>

> ---
>  default-configs/ppc-softmmu.mak | 18 ++++--------------
>  hw/ppc/Kconfig                  | 12 ++++++++++++
>  2 files changed, 16 insertions(+), 14 deletions(-)
> 
> diff --git a/default-configs/ppc-softmmu.mak b/default-configs/ppc-softmmu.mak
> index 5265d8a..5192aca 100644
> --- a/default-configs/ppc-softmmu.mak
> +++ b/default-configs/ppc-softmmu.mak
> @@ -1,27 +1,17 @@
>  # Default configuration for ppc-softmmu
>  
> -CONFIG_PCI=y
>  CONFIG_PCI_DEVICES=y
> -CONFIG_ISA_BUS=y
>  CONFIG_TEST_DEVICES=y
>  
> -# For embedded PPCs:
> -CONFIG_PPC4XX=y
> -CONFIG_M48T59=y
> +# FIXME: CONFIG_SERIAL is currently still required to link all of the
> +# ppc machines (due to the usage of serial_mm_init() in ppc405_uc.c).
>  CONFIG_SERIAL=y
> -CONFIG_OPENPIC=y
> -CONFIG_PPCE500_PCI=y
> -CONFIG_PFLASH_CFI01=y
> -CONFIG_PFLASH_CFI02=y
> -CONFIG_XILINX=y
> -CONFIG_XILINX_ETHLITE=y
> +
> +# For embedded PPCs:
>  CONFIG_E500=y
> -CONFIG_PLATFORM_BUS=y
> -CONFIG_ETSEC=y
>  CONFIG_PPC405=y
>  CONFIG_PPC440=y
>  CONFIG_VIRTEX=y
> -CONFIG_PCI_EXPRESS=y
>  
>  # For Sam460ex
>  CONFIG_SAM460EX=y
> diff --git a/hw/ppc/Kconfig b/hw/ppc/Kconfig
> index 8bd25ed..ab9b828 100644
> --- a/hw/ppc/Kconfig
> +++ b/hw/ppc/Kconfig
> @@ -18,9 +18,14 @@ config POWERNV
>  
>  config PPC405
>      bool
> +    select M48T59
> +    select PFLASH_CFI02
> +    select PPC4XX
>  
>  config PPC440
>      bool
> +    select PCI_EXPRESS
> +    select PPC4XX
>  
>  config PPC4XX
>      bool
> @@ -69,9 +74,16 @@ config MAC_NEWWORLD
>  
>  config E500
>      bool
> +    select ETSEC
> +    select OPENPIC
> +    select PLATFORM_BUS
> +    select PPCE500_PCI
>  
>  config VIRTEX
>      bool
> +    select PFLASH_CFI01
> +    select XILINX
> +    select XILINX_ETHLITE
>  
>  config MAC_DBDMA
>      bool
> 

^ permalink raw reply	[flat|nested] 33+ messages in thread

* Re: [Qemu-devel] [RFC PATCH 2/5] ppc: Express dependencies of the 'prep' and '40p' machines with kconfig
  2019-01-30 10:17     ` Paolo Bonzini
@ 2019-01-30 10:25       ` Thomas Huth
  2019-01-30 11:02         ` Thomas Huth
  2019-01-30 11:09         ` Paolo Bonzini
  0 siblings, 2 replies; 33+ messages in thread
From: Thomas Huth @ 2019-01-30 10:25 UTC (permalink / raw)
  To: Paolo Bonzini, qemu-devel, yang.zhong; +Cc: qemu-ppc, Hervé Poussineau

On 2019-01-30 11:17, Paolo Bonzini wrote:
> On 30/01/19 10:43, Thomas Huth wrote:
>> +    select LSI_SCSI_PCI
> 
> Should NE2000_ISA and LSI_SCSI_PCI be handled the same?  Either rely on
> "default y" for both, or select both (I think I prefer the former).

Yes. IMHO we should use "select XXX" if the machine has a hard
requirement for a device, and "default y" if it can also somehow work
without the device. In this case, I did not look carefully enough, since
it is apparently possible to use the 40p machine also without the LSI
controller when you specify "-nodefaults". So I'll remove this in v2 and
rely on the "default y" instead.

 Thomas

^ permalink raw reply	[flat|nested] 33+ messages in thread

* Re: [Qemu-devel] [RFC PATCH 0/5] Kconfig dependencies for ppc machines
  2019-01-30  9:43 ` [Qemu-devel] [RFC PATCH 0/5] Kconfig dependencies for ppc machines Thomas Huth
                     ` (4 preceding siblings ...)
  2019-01-30  9:43   ` [Qemu-devel] [RFC PATCH 5/5] ppc: Express dependencies of the embedded " Thomas Huth
@ 2019-01-30 10:59   ` Yang Zhong
  5 siblings, 0 replies; 33+ messages in thread
From: Yang Zhong @ 2019-01-30 10:59 UTC (permalink / raw)
  To: Thomas Huth; +Cc: qemu-devel, qemu-ppc, pbonzini, yang.zhong

On Wed, Jan 30, 2019 at 10:43:02AM +0100, Thomas Huth wrote:
> Here's now my stab at expressing the ppc machine dependencies with
> Kconfig. I've carefully stepped through the dependencies and tried to
> built each machine separately (which should be possible now, apart
> from some few quirks like the RTAS dependency in qtest.c which I will
> address later).
> 
> Yang, unless there are complaints, could you please add these patches
> to your Kconfig series? Thanks!
>
  Yes, i will send Kconfig v6 after chinese new year holiday(one week + 2 days vocation). 
  before this holiday, i need send out non-RFC patch 1-27 as Paolo's mentioned in v5.

  Regards,

  Yang 
 
> Thomas Huth (5):
>   ppc64: Express dependencies of 'pseries' and 'powernv' machines with
>     kconfig
>   ppc: Express dependencies of the 'prep' and '40p' machines with
>     kconfig
>   ppc: Express dependencies of the Mac machines with kconfig
>   ppc: Express dependencies of the Sam460EX machines with kconfig
>   ppc: Express dependencies of the embedded machines with kconfig
> 
>  default-configs/ppc-softmmu.mak   | 51 +++------------------------------------
>  default-configs/ppc64-softmmu.mak |  7 ------
>  hw/display/Kconfig                |  1 +
>  hw/intc/Kconfig                   |  4 +--
>  hw/mem/Kconfig                    |  1 +
>  hw/misc/Kconfig                   |  8 ++++++
>  hw/net/Kconfig                    |  2 ++
>  hw/pci-host/Kconfig               |  4 ++-
>  hw/ppc/Kconfig                    | 48 ++++++++++++++++++++++++++++++++++++
>  hw/usb/Kconfig                    |  2 +-
>  10 files changed, 69 insertions(+), 59 deletions(-)
> 
> -- 
> 1.8.3.1

^ permalink raw reply	[flat|nested] 33+ messages in thread

* Re: [Qemu-devel] [RFC PATCH 1/5] ppc64: Express dependencies of 'pseries' and 'powernv' machines with kconfig
  2019-01-30  9:43   ` [Qemu-devel] [RFC PATCH 1/5] ppc64: Express dependencies of 'pseries' and 'powernv' machines with kconfig Thomas Huth
  2019-01-30  9:57     ` Paolo Bonzini
@ 2019-01-30 11:00     ` Cédric Le Goater
  2019-01-30 11:04       ` Thomas Huth
  1 sibling, 1 reply; 33+ messages in thread
From: Cédric Le Goater @ 2019-01-30 11:00 UTC (permalink / raw)
  To: Thomas Huth, qemu-devel, yang.zhong; +Cc: pbonzini, qemu-ppc

On 1/30/19 10:43 AM, Thomas Huth wrote:
> The POWERNV switch should always select ISA_IPMI_BT, then the other
> IPMI options are turned on automatically now.
> CONFIG_DIMM should always be selected by the pseries machine,
> which in turn depends on CONFIG_MEM_DEVICE since DIMM implements
> this interface.
> CONFIG_VIRTIO_VGA can be dropped from default-configs/ppc64-softmmu.mak
> completely since this device is already automatically enabled via
> hw/display/Kconfig now.
> CONFIG_SPAPR_RNG should stay in the ppc-softmmu.mak file since this
> is a completely optional device.
> 
> Cc: Cédric Le Goater <clg@kaod.org>
> Signed-off-by: Thomas Huth <thuth@redhat.com>
> ---
>  default-configs/ppc64-softmmu.mak | 7 -------
>  hw/intc/Kconfig                   | 4 +---
>  hw/mem/Kconfig                    | 1 +
>  hw/ppc/Kconfig                    | 9 +++++++++
>  4 files changed, 11 insertions(+), 10 deletions(-)
> 
> diff --git a/default-configs/ppc64-softmmu.mak b/default-configs/ppc64-softmmu.mak
> index a0a9151..6f8d7ea 100644
> --- a/default-configs/ppc64-softmmu.mak
> +++ b/default-configs/ppc64-softmmu.mak
> @@ -5,14 +5,7 @@ include ppc-softmmu.mak
>  
>  # For PowerNV
>  CONFIG_POWERNV=y
> -CONFIG_IPMI=y
> -CONFIG_IPMI_LOCAL=y
> -CONFIG_IPMI_EXTERN=y
> -CONFIG_ISA_IPMI_BT=y
>  
>  # For pSeries
>  CONFIG_PSERIES=y
> -CONFIG_VIRTIO_VGA=y
> -CONFIG_MEM_DEVICE=y
> -CONFIG_DIMM=y
>  CONFIG_SPAPR_RNG=y
> diff --git a/hw/intc/Kconfig b/hw/intc/Kconfig
> index 6eea14e..1e819d0 100644
> --- a/hw/intc/Kconfig
> +++ b/hw/intc/Kconfig
> @@ -31,13 +31,11 @@ config OPENPIC_KVM
>  
>  config XICS
>      bool
> -    default y
> -    depends on PSERIES
>  
>  config XICS_SPAPR
>      bool
>      default y
> -    depends on PSERIES
> +    depends on XICS && PSERIES
>  
>  config XICS_KVM
>      bool
> diff --git a/hw/mem/Kconfig b/hw/mem/Kconfig
> index d1e635c..620fd4c 100644
> --- a/hw/mem/Kconfig
> +++ b/hw/mem/Kconfig
> @@ -1,5 +1,6 @@
>  config DIMM
>      bool
> +    select MEM_DEVICE
>  
>  config MEM_DEVICE
>      bool
> diff --git a/hw/ppc/Kconfig b/hw/ppc/Kconfig
> index b0095e1..b44e3bd 100644
> --- a/hw/ppc/Kconfig
> +++ b/hw/ppc/Kconfig
> @@ -1,11 +1,20 @@
>  config PSERIES
>      bool
> +    select DIMM
> +    select PCI
> +    select VFIO
> +    select XICS

Don't we want XICS_SPAPR ? or is there another toggle with KVM ?

>  config SPAPR_RNG
>      bool
> +    depends on PSERIES
>  
>  config POWERNV
>      bool
> +    select ISA_IPMI_BT

yes.

It is possible to start a PowerNV machine without defining a 
BT device but the machine relies on the BT device and the IPMI 
backend attached to it to powerdown. 

Ideally I would have preferred to define the device internally 
in the machine and plug it on the ISA bus but I couldn't find 
a way to do it cleanly. 

> +    select ISA_BUS
> +    select MC146818RTC
> +    select XICS

only for POWER8 machines. POWER9 uses XIVE.

Thanks,

C.

>  
>  config PPC405
>      bool
> 

^ permalink raw reply	[flat|nested] 33+ messages in thread

* Re: [Qemu-devel] [RFC PATCH 2/5] ppc: Express dependencies of the 'prep' and '40p' machines with kconfig
  2019-01-30 10:25       ` Thomas Huth
@ 2019-01-30 11:02         ` Thomas Huth
  2019-01-30 11:10           ` Paolo Bonzini
  2019-01-30 11:09         ` Paolo Bonzini
  1 sibling, 1 reply; 33+ messages in thread
From: Thomas Huth @ 2019-01-30 11:02 UTC (permalink / raw)
  To: Paolo Bonzini, qemu-devel, yang.zhong; +Cc: Hervé Poussineau, qemu-ppc

On 2019-01-30 11:25, Thomas Huth wrote:
> On 2019-01-30 11:17, Paolo Bonzini wrote:
>> On 30/01/19 10:43, Thomas Huth wrote:
>>> +    select LSI_SCSI_PCI
>>
>> Should NE2000_ISA and LSI_SCSI_PCI be handled the same?  Either rely on
>> "default y" for both, or select both (I think I prefer the former).
> 
> Yes. IMHO we should use "select XXX" if the machine has a hard
> requirement for a device, and "default y" if it can also somehow work
> without the device. In this case, I did not look carefully enough, since
> it is apparently possible to use the 40p machine also without the LSI
> controller when you specify "-nodefaults". So I'll remove this in v2 and
> rely on the "default y" instead.

Scratch that. The "select LSI_SCSI_PCI" is currently a hard requirement
here, otherwise I get a linker error like this:

 hw/ppc/prep.c:705: undefined reference to `lsi53c8xx_handle_legacy_cmdline'

So I think we should keep this patch in its current shape. Of course
we still can clean that up later, but this should not be part of the
initial Kconfig patch series (which is already big enough).

 Thomas

^ permalink raw reply	[flat|nested] 33+ messages in thread

* Re: [Qemu-devel] [RFC PATCH 1/5] ppc64: Express dependencies of 'pseries' and 'powernv' machines with kconfig
  2019-01-30 11:00     ` Cédric Le Goater
@ 2019-01-30 11:04       ` Thomas Huth
  2019-01-30 11:12         ` Cédric Le Goater
  0 siblings, 1 reply; 33+ messages in thread
From: Thomas Huth @ 2019-01-30 11:04 UTC (permalink / raw)
  To: Cédric Le Goater, qemu-devel, yang.zhong; +Cc: pbonzini, qemu-ppc

On 2019-01-30 12:00, Cédric Le Goater wrote:
> On 1/30/19 10:43 AM, Thomas Huth wrote:
>> The POWERNV switch should always select ISA_IPMI_BT, then the other
>> IPMI options are turned on automatically now.
>> CONFIG_DIMM should always be selected by the pseries machine,
>> which in turn depends on CONFIG_MEM_DEVICE since DIMM implements
>> this interface.
>> CONFIG_VIRTIO_VGA can be dropped from default-configs/ppc64-softmmu.mak
>> completely since this device is already automatically enabled via
>> hw/display/Kconfig now.
>> CONFIG_SPAPR_RNG should stay in the ppc-softmmu.mak file since this
>> is a completely optional device.
>>
>> Cc: Cédric Le Goater <clg@kaod.org>
>> Signed-off-by: Thomas Huth <thuth@redhat.com>
>> ---
>>  default-configs/ppc64-softmmu.mak | 7 -------
>>  hw/intc/Kconfig                   | 4 +---
>>  hw/mem/Kconfig                    | 1 +
>>  hw/ppc/Kconfig                    | 9 +++++++++
>>  4 files changed, 11 insertions(+), 10 deletions(-)
>>
>> diff --git a/default-configs/ppc64-softmmu.mak b/default-configs/ppc64-softmmu.mak
>> index a0a9151..6f8d7ea 100644
>> --- a/default-configs/ppc64-softmmu.mak
>> +++ b/default-configs/ppc64-softmmu.mak
>> @@ -5,14 +5,7 @@ include ppc-softmmu.mak
>>  
>>  # For PowerNV
>>  CONFIG_POWERNV=y
>> -CONFIG_IPMI=y
>> -CONFIG_IPMI_LOCAL=y
>> -CONFIG_IPMI_EXTERN=y
>> -CONFIG_ISA_IPMI_BT=y
>>  
>>  # For pSeries
>>  CONFIG_PSERIES=y
>> -CONFIG_VIRTIO_VGA=y
>> -CONFIG_MEM_DEVICE=y
>> -CONFIG_DIMM=y
>>  CONFIG_SPAPR_RNG=y
>> diff --git a/hw/intc/Kconfig b/hw/intc/Kconfig
>> index 6eea14e..1e819d0 100644
>> --- a/hw/intc/Kconfig
>> +++ b/hw/intc/Kconfig
>> @@ -31,13 +31,11 @@ config OPENPIC_KVM
>>  
>>  config XICS
>>      bool
>> -    default y
>> -    depends on PSERIES
>>  
>>  config XICS_SPAPR
>>      bool
>>      default y
>> -    depends on PSERIES
>> +    depends on XICS && PSERIES
>>  
>>  config XICS_KVM
>>      bool
>> diff --git a/hw/mem/Kconfig b/hw/mem/Kconfig
>> index d1e635c..620fd4c 100644
>> --- a/hw/mem/Kconfig
>> +++ b/hw/mem/Kconfig
>> @@ -1,5 +1,6 @@
>>  config DIMM
>>      bool
>> +    select MEM_DEVICE
>>  
>>  config MEM_DEVICE
>>      bool
>> diff --git a/hw/ppc/Kconfig b/hw/ppc/Kconfig
>> index b0095e1..b44e3bd 100644
>> --- a/hw/ppc/Kconfig
>> +++ b/hw/ppc/Kconfig
>> @@ -1,11 +1,20 @@
>>  config PSERIES
>>      bool
>> +    select DIMM
>> +    select PCI
>> +    select VFIO
>> +    select XICS
> 
> Don't we want XICS_SPAPR ? or is there another toggle with KVM ?
> 
>>  config SPAPR_RNG
>>      bool
>> +    depends on PSERIES
>>  
>>  config POWERNV
>>      bool
>> +    select ISA_IPMI_BT
> 
> yes.
> 
> It is possible to start a PowerNV machine without defining a 
> BT device but the machine relies on the BT device and the IPMI 
> backend attached to it to powerdown. 
> 
> Ideally I would have preferred to define the device internally 
> in the machine and plug it on the ISA bus but I couldn't find 
> a way to do it cleanly. 
> 
>> +    select ISA_BUS
>> +    select MC146818RTC
>> +    select XICS
> 
> only for POWER8 machines. POWER9 uses XIVE.

Sure, but you don't know at compile time yet whether the user wants to
use a POWER8 or a POWER9 CPU. So this currently always needs to be selected.

 Thomas

^ permalink raw reply	[flat|nested] 33+ messages in thread

* Re: [Qemu-devel] [RFC PATCH 2/5] ppc: Express dependencies of the 'prep' and '40p' machines with kconfig
  2019-01-30 10:25       ` Thomas Huth
  2019-01-30 11:02         ` Thomas Huth
@ 2019-01-30 11:09         ` Paolo Bonzini
  1 sibling, 0 replies; 33+ messages in thread
From: Paolo Bonzini @ 2019-01-30 11:09 UTC (permalink / raw)
  To: Thomas Huth, qemu-devel, yang.zhong; +Cc: qemu-ppc, Hervé Poussineau

On 30/01/19 11:25, Thomas Huth wrote:
> On 2019-01-30 11:17, Paolo Bonzini wrote:
>> On 30/01/19 10:43, Thomas Huth wrote:
>>> +    select LSI_SCSI_PCI
>>
>> Should NE2000_ISA and LSI_SCSI_PCI be handled the same?  Either rely on
>> "default y" for both, or select both (I think I prefer the former).
> 
> Yes. IMHO we should use "select XXX" if the machine has a hard
> requirement for a device, and "default y" if it can also somehow work
> without the device.

I agree.

Paolo

^ permalink raw reply	[flat|nested] 33+ messages in thread

* Re: [Qemu-devel] [RFC PATCH 2/5] ppc: Express dependencies of the 'prep' and '40p' machines with kconfig
  2019-01-30 11:02         ` Thomas Huth
@ 2019-01-30 11:10           ` Paolo Bonzini
  0 siblings, 0 replies; 33+ messages in thread
From: Paolo Bonzini @ 2019-01-30 11:10 UTC (permalink / raw)
  To: Thomas Huth, qemu-devel, yang.zhong; +Cc: Hervé Poussineau, qemu-ppc

On 30/01/19 12:02, Thomas Huth wrote:
> On 2019-01-30 11:25, Thomas Huth wrote:
>> On 2019-01-30 11:17, Paolo Bonzini wrote:
>>> On 30/01/19 10:43, Thomas Huth wrote:
>>>> +    select LSI_SCSI_PCI
>>>
>>> Should NE2000_ISA and LSI_SCSI_PCI be handled the same?  Either rely on
>>> "default y" for both, or select both (I think I prefer the former).
>>
>> Yes. IMHO we should use "select XXX" if the machine has a hard
>> requirement for a device, and "default y" if it can also somehow work
>> without the device. In this case, I did not look carefully enough, since
>> it is apparently possible to use the 40p machine also without the LSI
>> controller when you specify "-nodefaults". So I'll remove this in v2 and
>> rely on the "default y" instead.
> 
> Scratch that. The "select LSI_SCSI_PCI" is currently a hard requirement
> here, otherwise I get a linker error like this:
> 
>  hw/ppc/prep.c:705: undefined reference to `lsi53c8xx_handle_legacy_cmdline'
> 
> So I think we should keep this patch in its current shape. Of course
> we still can clean that up later, but this should not be part of the
> initial Kconfig patch series (which is already big enough).

Sounds good!

Paolo

^ permalink raw reply	[flat|nested] 33+ messages in thread

* Re: [Qemu-devel] [RFC PATCH 1/5] ppc64: Express dependencies of 'pseries' and 'powernv' machines with kconfig
  2019-01-30 11:04       ` Thomas Huth
@ 2019-01-30 11:12         ` Cédric Le Goater
  0 siblings, 0 replies; 33+ messages in thread
From: Cédric Le Goater @ 2019-01-30 11:12 UTC (permalink / raw)
  To: Thomas Huth, qemu-devel, yang.zhong; +Cc: pbonzini, qemu-ppc

On 1/30/19 12:04 PM, Thomas Huth wrote:
> On 2019-01-30 12:00, Cédric Le Goater wrote:
>> On 1/30/19 10:43 AM, Thomas Huth wrote:
>>> The POWERNV switch should always select ISA_IPMI_BT, then the other
>>> IPMI options are turned on automatically now.
>>> CONFIG_DIMM should always be selected by the pseries machine,
>>> which in turn depends on CONFIG_MEM_DEVICE since DIMM implements
>>> this interface.
>>> CONFIG_VIRTIO_VGA can be dropped from default-configs/ppc64-softmmu.mak
>>> completely since this device is already automatically enabled via
>>> hw/display/Kconfig now.
>>> CONFIG_SPAPR_RNG should stay in the ppc-softmmu.mak file since this
>>> is a completely optional device.
>>>
>>> Cc: Cédric Le Goater <clg@kaod.org>
>>> Signed-off-by: Thomas Huth <thuth@redhat.com>
>>> ---
>>>  default-configs/ppc64-softmmu.mak | 7 -------
>>>  hw/intc/Kconfig                   | 4 +---
>>>  hw/mem/Kconfig                    | 1 +
>>>  hw/ppc/Kconfig                    | 9 +++++++++
>>>  4 files changed, 11 insertions(+), 10 deletions(-)
>>>
>>> diff --git a/default-configs/ppc64-softmmu.mak b/default-configs/ppc64-softmmu.mak
>>> index a0a9151..6f8d7ea 100644
>>> --- a/default-configs/ppc64-softmmu.mak
>>> +++ b/default-configs/ppc64-softmmu.mak
>>> @@ -5,14 +5,7 @@ include ppc-softmmu.mak
>>>  
>>>  # For PowerNV
>>>  CONFIG_POWERNV=y
>>> -CONFIG_IPMI=y
>>> -CONFIG_IPMI_LOCAL=y
>>> -CONFIG_IPMI_EXTERN=y
>>> -CONFIG_ISA_IPMI_BT=y
>>>  
>>>  # For pSeries
>>>  CONFIG_PSERIES=y
>>> -CONFIG_VIRTIO_VGA=y
>>> -CONFIG_MEM_DEVICE=y
>>> -CONFIG_DIMM=y
>>>  CONFIG_SPAPR_RNG=y
>>> diff --git a/hw/intc/Kconfig b/hw/intc/Kconfig
>>> index 6eea14e..1e819d0 100644
>>> --- a/hw/intc/Kconfig
>>> +++ b/hw/intc/Kconfig
>>> @@ -31,13 +31,11 @@ config OPENPIC_KVM
>>>  
>>>  config XICS
>>>      bool
>>> -    default y
>>> -    depends on PSERIES
>>>  
>>>  config XICS_SPAPR
>>>      bool
>>>      default y
>>> -    depends on PSERIES
>>> +    depends on XICS && PSERIES
>>>  
>>>  config XICS_KVM
>>>      bool
>>> diff --git a/hw/mem/Kconfig b/hw/mem/Kconfig
>>> index d1e635c..620fd4c 100644
>>> --- a/hw/mem/Kconfig
>>> +++ b/hw/mem/Kconfig
>>> @@ -1,5 +1,6 @@
>>>  config DIMM
>>>      bool
>>> +    select MEM_DEVICE
>>>  
>>>  config MEM_DEVICE
>>>      bool
>>> diff --git a/hw/ppc/Kconfig b/hw/ppc/Kconfig
>>> index b0095e1..b44e3bd 100644
>>> --- a/hw/ppc/Kconfig
>>> +++ b/hw/ppc/Kconfig
>>> @@ -1,11 +1,20 @@
>>>  config PSERIES
>>>      bool
>>> +    select DIMM
>>> +    select PCI
>>> +    select VFIO
>>> +    select XICS
>>
>> Don't we want XICS_SPAPR ? or is there another toggle with KVM ?
>>
>>>  config SPAPR_RNG
>>>      bool
>>> +    depends on PSERIES
>>>  
>>>  config POWERNV
>>>      bool
>>> +    select ISA_IPMI_BT
>>
>> yes.
>>
>> It is possible to start a PowerNV machine without defining a 
>> BT device but the machine relies on the BT device and the IPMI 
>> backend attached to it to powerdown. 
>>
>> Ideally I would have preferred to define the device internally 
>> in the machine and plug it on the ISA bus but I couldn't find 
>> a way to do it cleanly. 
>>
>>> +    select ISA_BUS
>>> +    select MC146818RTC
>>> +    select XICS
>>
>> only for POWER8 machines. POWER9 uses XIVE.
> 
> Sure, but you don't know at compile time yet whether the user wants to
> use a POWER8 or a POWER9 CPU. So this currently always needs to be selected.

ah yes :) Please add XIVE then. I should get the Pnv model merged one day.

Thanks,

C. 

^ permalink raw reply	[flat|nested] 33+ messages in thread

* Re: [Qemu-devel] [RFC PATCH 4/5] ppc: Express dependencies of the Sam460EX machines with kconfig
  2019-01-30  9:43   ` [Qemu-devel] [RFC PATCH 4/5] ppc: Express dependencies of the Sam460EX " Thomas Huth
  2019-01-30 10:18     ` Paolo Bonzini
@ 2019-01-30 11:29     ` BALATON Zoltan
  2019-01-30 12:03       ` Thomas Huth
  1 sibling, 1 reply; 33+ messages in thread
From: BALATON Zoltan @ 2019-01-30 11:29 UTC (permalink / raw)
  To: Thomas Huth; +Cc: qemu-devel, yang.zhong, pbonzini, qemu-ppc

Hello,

On Wed, 30 Jan 2019, Thomas Huth wrote:
> Most of the dependencies are now directly selected by the SAM460EX
> switch. We can drop CONFIG_VGA_CIRRUS since this device is already
> selected automatically when CONFIG_PCI_DEVICES is set.
>
> Cc: BALATON Zoltan <balaton@eik.bme.hu>
> Signed-off-by: Thomas Huth <thuth@redhat.com>
> ---
> default-configs/ppc-softmmu.mak | 10 ----------
> hw/display/Kconfig              |  1 +
> hw/ppc/Kconfig                  | 12 ++++++++++++
> hw/usb/Kconfig                  |  2 +-
> 4 files changed, 14 insertions(+), 11 deletions(-)
>
> diff --git a/default-configs/ppc-softmmu.mak b/default-configs/ppc-softmmu.mak
> index 513a8e9..5265d8a 100644
> --- a/default-configs/ppc-softmmu.mak
> +++ b/default-configs/ppc-softmmu.mak
> @@ -25,16 +25,6 @@ CONFIG_PCI_EXPRESS=y
>
> # For Sam460ex
> CONFIG_SAM460EX=y
> -CONFIG_USB_EHCI_SYSBUS=y
> -CONFIG_SM501=y
> -CONFIG_DDC=y
> -CONFIG_IDE_SII3112=y
> -CONFIG_I2C=y
> -CONFIG_AT24C=y
> -CONFIG_BITBANG_I2C=y
> -CONFIG_M41T80=y
> -CONFIG_VGA_CIRRUS=y
> -CONFIG_SMBUS_EEPROM=y
>
> # For Macs
> CONFIG_MAC_OLDWORLD=y
> diff --git a/hw/display/Kconfig b/hw/display/Kconfig
> index c784fe8..f8e6136 100644
> --- a/hw/display/Kconfig
> +++ b/hw/display/Kconfig
> @@ -76,6 +76,7 @@ config MILKYMIST_TMU2
> config SM501
>     bool
>     depends on I2C
> +    select DDC
>
> config TCX
>     bool
> diff --git a/hw/ppc/Kconfig b/hw/ppc/Kconfig
> index f6b4206..8bd25ed 100644
> --- a/hw/ppc/Kconfig
> +++ b/hw/ppc/Kconfig
> @@ -24,9 +24,21 @@ config PPC440
>
> config PPC4XX
>     bool
> +    select BITBANG_I2C
> +    select PCI
>
> config SAM460EX
>     bool
> +    select AT24C

I don't recognise this as needed. Is it for dependency of something?

> +    select PFLASH_CFI01
> +    select IDE_SII3112
> +    select ISA_BUS          # FIXME: Currently required for IDE_SII3112

This is not really a dependency of SII3112 but of ide/core so this maybe 
this belongs to IDE config?

Otherwise I don't care much if it still compiles so

Reviewed-by: BALATON Zoltan <balaton@eik.bme.hu>

Regards,
BALATON Zoltan

> +    select M41T80
> +    select PPC440
> +    select SM501
> +    select SMBUS_EEPROM
> +    select USB_EHCI_SYSBUS
> +    select USB_OHCI
>
> config PREP
>     bool
> diff --git a/hw/usb/Kconfig b/hw/usb/Kconfig
> index a1b7acb..871ea47 100644
> --- a/hw/usb/Kconfig
> +++ b/hw/usb/Kconfig
> @@ -21,7 +21,7 @@ config USB_EHCI
>
> config USB_EHCI_SYSBUS
>     bool
> -    select USB
> +    select USB_EHCI
>
> config USB_XHCI
>     bool
>

^ permalink raw reply	[flat|nested] 33+ messages in thread

* Re: [Qemu-devel] [RFC PATCH 4/5] ppc: Express dependencies of the Sam460EX machines with kconfig
  2019-01-30 11:29     ` BALATON Zoltan
@ 2019-01-30 12:03       ` Thomas Huth
  0 siblings, 0 replies; 33+ messages in thread
From: Thomas Huth @ 2019-01-30 12:03 UTC (permalink / raw)
  To: BALATON Zoltan; +Cc: qemu-devel, yang.zhong, pbonzini, qemu-ppc

On 2019-01-30 12:29, BALATON Zoltan wrote:
> Hello,
> 
> On Wed, 30 Jan 2019, Thomas Huth wrote:
>> Most of the dependencies are now directly selected by the SAM460EX
>> switch. We can drop CONFIG_VGA_CIRRUS since this device is already
>> selected automatically when CONFIG_PCI_DEVICES is set.
>>
>> Cc: BALATON Zoltan <balaton@eik.bme.hu>
>> Signed-off-by: Thomas Huth <thuth@redhat.com>
>> ---
>> default-configs/ppc-softmmu.mak | 10 ----------
>> hw/display/Kconfig              |  1 +
>> hw/ppc/Kconfig                  | 12 ++++++++++++
>> hw/usb/Kconfig                  |  2 +-
>> 4 files changed, 14 insertions(+), 11 deletions(-)
>>
>> diff --git a/default-configs/ppc-softmmu.mak
>> b/default-configs/ppc-softmmu.mak
>> index 513a8e9..5265d8a 100644
>> --- a/default-configs/ppc-softmmu.mak
>> +++ b/default-configs/ppc-softmmu.mak
>> @@ -25,16 +25,6 @@ CONFIG_PCI_EXPRESS=y
>>
>> # For Sam460ex
>> CONFIG_SAM460EX=y
>> -CONFIG_USB_EHCI_SYSBUS=y
>> -CONFIG_SM501=y
>> -CONFIG_DDC=y
>> -CONFIG_IDE_SII3112=y
>> -CONFIG_I2C=y
>> -CONFIG_AT24C=y
>> -CONFIG_BITBANG_I2C=y
>> -CONFIG_M41T80=y
>> -CONFIG_VGA_CIRRUS=y
>> -CONFIG_SMBUS_EEPROM=y
>>
>> # For Macs
>> CONFIG_MAC_OLDWORLD=y
>> diff --git a/hw/display/Kconfig b/hw/display/Kconfig
>> index c784fe8..f8e6136 100644
>> --- a/hw/display/Kconfig
>> +++ b/hw/display/Kconfig
>> @@ -76,6 +76,7 @@ config MILKYMIST_TMU2
>> config SM501
>>     bool
>>     depends on I2C
>> +    select DDC
>>
>> config TCX
>>     bool
>> diff --git a/hw/ppc/Kconfig b/hw/ppc/Kconfig
>> index f6b4206..8bd25ed 100644
>> --- a/hw/ppc/Kconfig
>> +++ b/hw/ppc/Kconfig
>> @@ -24,9 +24,21 @@ config PPC440
>>
>> config PPC4XX
>>     bool
>> +    select BITBANG_I2C
>> +    select PCI
>>
>> config SAM460EX
>>     bool
>> +    select AT24C
> 
> I don't recognise this as needed. Is it for dependency of something?

Oh, sorry, I apparently missed that one up. The device has been
added for the e500 machine instead:

 https://lists.gnu.org/archive/html/qemu-devel/2017-11/msg03492.html

... so this line belongs to the "config E500" section instead.

>> +    select PFLASH_CFI01
>> +    select IDE_SII3112
>> +    select ISA_BUS          # FIXME: Currently required for IDE_SII3112
> 
> This is not really a dependency of SII3112 but of ide/core so this maybe
> this belongs to IDE config?

It definitely needs fixing, that's why I've got a FIXME here :-)

I've now had a closer look, and the problem is that CONFIG_IDE_PCI
currently causes ioport.o to be pulled in. That seems unnecessary. I'll
continue the discussion in the related patch ("ide: split ioport
registration to a separate file")...

> Otherwise I don't care much if it still compiles so
> 
> Reviewed-by: BALATON Zoltan <balaton@eik.bme.hu>

Thanks!

  Thomas

^ permalink raw reply	[flat|nested] 33+ messages in thread

* Re: [Qemu-devel] [RFC PATCH 3/5] ppc: Express dependencies of the Mac machines with kconfig
  2019-01-30  9:43   ` [Qemu-devel] [RFC PATCH 3/5] ppc: Express dependencies of the Mac " Thomas Huth
  2019-01-30 10:18     ` Paolo Bonzini
@ 2019-01-30 17:13     ` Mark Cave-Ayland
  2019-01-30 17:21       ` Paolo Bonzini
  2019-01-31  5:23       ` Thomas Huth
  1 sibling, 2 replies; 33+ messages in thread
From: Mark Cave-Ayland @ 2019-01-30 17:13 UTC (permalink / raw)
  To: Thomas Huth, qemu-devel, yang.zhong; +Cc: pbonzini, qemu-ppc

On 30/01/2019 09:43, Thomas Huth wrote:

> This will make it for example easier if the users want to disable
> one of the two machines for their builds.
> 
> Cc: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
> Signed-off-by: Thomas Huth <thuth@redhat.com>
> ---
>  default-configs/ppc-softmmu.mak | 15 ---------------
>  hw/misc/Kconfig                 |  8 ++++++++
>  hw/net/Kconfig                  |  2 ++
>  hw/pci-host/Kconfig             |  4 +++-
>  hw/ppc/Kconfig                  |  7 +++++++
>  5 files changed, 20 insertions(+), 16 deletions(-)
> 
> diff --git a/default-configs/ppc-softmmu.mak b/default-configs/ppc-softmmu.mak
> index 422f1b7..513a8e9 100644
> --- a/default-configs/ppc-softmmu.mak
> +++ b/default-configs/ppc-softmmu.mak
> @@ -37,21 +37,6 @@ CONFIG_VGA_CIRRUS=y
>  CONFIG_SMBUS_EEPROM=y
>  
>  # For Macs
> -CONFIG_ESCC=y
> -CONFIG_MACIO=y
> -CONFIG_MACIO_GPIO=y
> -CONFIG_SUNGEM=y
> -CONFIG_MOS6522=y
> -CONFIG_CUDA=y
> -CONFIG_ADB=y
> -CONFIG_MAC_NVRAM=y
> -CONFIG_MAC_DBDMA=y
> -CONFIG_MAC_PMU=y
> -CONFIG_HEATHROW_PIC=y
> -CONFIG_GRACKLE_PCI=y
> -CONFIG_UNIN_PCI=y
> -CONFIG_DEC_PCI=y
> -CONFIG_IDE_MACIO=y
>  CONFIG_MAC_OLDWORLD=y
>  CONFIG_MAC_NEWWORLD=y
>  
> diff --git a/hw/misc/Kconfig b/hw/misc/Kconfig
> index 3ebe30f..f392502 100644
> --- a/hw/misc/Kconfig
> +++ b/hw/misc/Kconfig
> @@ -59,6 +59,14 @@ config MOS6522
>  
>  config MACIO
>      bool
> +    select CUDA
> +    select ESCC
> +    select IDE_MACIO
> +    select MACIO_GPIO
> +    select MAC_DBDMA
> +    select MAC_NVRAM
> +    select MAC_PMU
> +    select MOS6522

Technically MACIO_GPIO and MAC_PMU are MAC_NEWWORLD only, so we might want to split
this down further?

>  config IVSHMEM_DEVICE
>      bool
> diff --git a/hw/net/Kconfig b/hw/net/Kconfig
> index 47368d7..9047f6d 100644
> --- a/hw/net/Kconfig
> +++ b/hw/net/Kconfig
> @@ -85,6 +85,8 @@ config FTGMAC100
>  
>  config SUNGEM
>      bool
> +    default y if (MAC_OLDWORLD || MAC_NEWWORLD)
> +    depends on PCI
>  
>  config COLDFIRE
>      bool
> diff --git a/hw/pci-host/Kconfig b/hw/pci-host/Kconfig
> index ff4080c..b39ea29 100644
> --- a/hw/pci-host/Kconfig
> +++ b/hw/pci-host/Kconfig
> @@ -10,8 +10,10 @@ config GRACKLE_PCI
>      bool
>  
>  config UNIN_PCI
> -    select PCI
>      bool
> +    select PCI
> +    select DEC_PCI
> +    select OPENPIC
>  
>  config PPCE500_PCI
>      select PCI
> diff --git a/hw/ppc/Kconfig b/hw/ppc/Kconfig
> index 809830e..f6b4206 100644
> --- a/hw/ppc/Kconfig
> +++ b/hw/ppc/Kconfig
> @@ -44,9 +44,16 @@ config RS6000_MC
>  
>  config MAC_OLDWORLD
>      bool
> +    select ADB
> +    select GRACKLE_PCI
> +    select HEATHROW_PIC
> +    select MACIO
>  
>  config MAC_NEWWORLD
>      bool
> +    select ADB
> +    select MACIO
> +    select UNIN_PCI

Also MAC_NEWWORLD has an in-built USB PCI bridge (OHCI) which populates with a USB
keyboard/mouse rather than ADB when using -M mac99,via=pmu, but I presume USB is
handled elsewhere?

>  config E500
>      bool
> 


ATB,

Mark.

^ permalink raw reply	[flat|nested] 33+ messages in thread

* Re: [Qemu-devel] [RFC PATCH 3/5] ppc: Express dependencies of the Mac machines with kconfig
  2019-01-30 17:13     ` Mark Cave-Ayland
@ 2019-01-30 17:21       ` Paolo Bonzini
  2019-01-31  5:23       ` Thomas Huth
  1 sibling, 0 replies; 33+ messages in thread
From: Paolo Bonzini @ 2019-01-30 17:21 UTC (permalink / raw)
  To: Mark Cave-Ayland, Thomas Huth, qemu-devel, yang.zhong; +Cc: qemu-ppc

On 30/01/19 18:13, Mark Cave-Ayland wrote:
>>  config MAC_NEWWORLD
>>      bool
>> +    select ADB
>> +    select MACIO
>> +    select UNIN_PCI
> Also MAC_NEWWORLD has an in-built USB PCI bridge (OHCI) which populates with a USB
> keyboard/mouse rather than ADB when using -M mac99,via=pmu, but I presume USB is
> handled elsewhere?

I guess in that case it's optional, and it is enabled already by
CONFIG_PCI_DEVICES.

But maybe it's a good idea to mark OHCI as "default y on PCI_DEVICES ||
MAC_NEWWORLD" just to document things better.

Paolo

^ permalink raw reply	[flat|nested] 33+ messages in thread

* Re: [Qemu-devel] [RFC PATCH 3/5] ppc: Express dependencies of the Mac machines with kconfig
  2019-01-30 17:13     ` Mark Cave-Ayland
  2019-01-30 17:21       ` Paolo Bonzini
@ 2019-01-31  5:23       ` Thomas Huth
  1 sibling, 0 replies; 33+ messages in thread
From: Thomas Huth @ 2019-01-31  5:23 UTC (permalink / raw)
  To: Mark Cave-Ayland, qemu-devel, yang.zhong; +Cc: pbonzini, qemu-ppc

On 2019-01-30 18:13, Mark Cave-Ayland wrote:
> On 30/01/2019 09:43, Thomas Huth wrote:
> 
>> This will make it for example easier if the users want to disable
>> one of the two machines for their builds.
>>
>> Cc: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
>> Signed-off-by: Thomas Huth <thuth@redhat.com>
>> ---
[...]
>> diff --git a/hw/misc/Kconfig b/hw/misc/Kconfig
>> index 3ebe30f..f392502 100644
>> --- a/hw/misc/Kconfig
>> +++ b/hw/misc/Kconfig
>> @@ -59,6 +59,14 @@ config MOS6522
>>  
>>  config MACIO
>>      bool
>> +    select CUDA
>> +    select ESCC
>> +    select IDE_MACIO
>> +    select MACIO_GPIO
>> +    select MAC_DBDMA
>> +    select MAC_NVRAM
>> +    select MAC_PMU
>> +    select MOS6522
> 
> Technically MACIO_GPIO and MAC_PMU are MAC_NEWWORLD only, so we might want to split
> this down further?

I can also change the lines into:

    select MACIO_GPIO if MAC_NEWWORLD
    select MAC_PMU if MAC_NEWWORLD

>> diff --git a/hw/ppc/Kconfig b/hw/ppc/Kconfig
>> index 809830e..f6b4206 100644
>> --- a/hw/ppc/Kconfig
>> +++ b/hw/ppc/Kconfig
>> @@ -44,9 +44,16 @@ config RS6000_MC
>>  
>>  config MAC_OLDWORLD
>>      bool
>> +    select ADB
>> +    select GRACKLE_PCI
>> +    select HEATHROW_PIC
>> +    select MACIO
>>  
>>  config MAC_NEWWORLD
>>      bool
>> +    select ADB
>> +    select MACIO
>> +    select UNIN_PCI
> 
> Also MAC_NEWWORLD has an in-built USB PCI bridge (OHCI) which populates with a USB
> keyboard/mouse rather than ADB when using -M mac99,via=pmu, but I presume USB is
> handled elsewhere?

Yes, in hw/usb/Kconfig we have:

config USB_OHCI
    bool
    default y if PCI_DEVICES
    depends on PCI
    select USB

 Thomas

^ permalink raw reply	[flat|nested] 33+ messages in thread

end of thread, other threads:[~2019-01-31  5:24 UTC | newest]

Thread overview: 33+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <3f01a301-d639-dbe7-f522-42a50e2d443e@redhat.com>
2019-01-28 15:29 ` [Qemu-devel] [PATCH] s390x: express dependencies with Kconfig Thomas Huth
2019-01-28 16:08   ` [Qemu-devel] [qemu-s390x] " Cornelia Huck
2019-01-29  9:08     ` Thomas Huth
2019-01-29  9:42     ` [Qemu-devel] [PATCH v2] " Thomas Huth
2019-01-29  9:49       ` [Qemu-devel] [qemu-s390x] " Cornelia Huck
2019-01-29 10:07         ` Paolo Bonzini
2019-01-29 11:02           ` Yang Zhong
2019-01-30  9:43 ` [Qemu-devel] [RFC PATCH 0/5] Kconfig dependencies for ppc machines Thomas Huth
2019-01-30  9:43   ` [Qemu-devel] [RFC PATCH 1/5] ppc64: Express dependencies of 'pseries' and 'powernv' machines with kconfig Thomas Huth
2019-01-30  9:57     ` Paolo Bonzini
2019-01-30 10:02       ` Thomas Huth
2019-01-30 10:15         ` Paolo Bonzini
2019-01-30 11:00     ` Cédric Le Goater
2019-01-30 11:04       ` Thomas Huth
2019-01-30 11:12         ` Cédric Le Goater
2019-01-30  9:43   ` [Qemu-devel] [RFC PATCH 2/5] ppc: Express dependencies of the 'prep' and '40p' " Thomas Huth
2019-01-30 10:17     ` Paolo Bonzini
2019-01-30 10:25       ` Thomas Huth
2019-01-30 11:02         ` Thomas Huth
2019-01-30 11:10           ` Paolo Bonzini
2019-01-30 11:09         ` Paolo Bonzini
2019-01-30  9:43   ` [Qemu-devel] [RFC PATCH 3/5] ppc: Express dependencies of the Mac " Thomas Huth
2019-01-30 10:18     ` Paolo Bonzini
2019-01-30 17:13     ` Mark Cave-Ayland
2019-01-30 17:21       ` Paolo Bonzini
2019-01-31  5:23       ` Thomas Huth
2019-01-30  9:43   ` [Qemu-devel] [RFC PATCH 4/5] ppc: Express dependencies of the Sam460EX " Thomas Huth
2019-01-30 10:18     ` Paolo Bonzini
2019-01-30 11:29     ` BALATON Zoltan
2019-01-30 12:03       ` Thomas Huth
2019-01-30  9:43   ` [Qemu-devel] [RFC PATCH 5/5] ppc: Express dependencies of the embedded " Thomas Huth
2019-01-30 10:18     ` Paolo Bonzini
2019-01-30 10:59   ` [Qemu-devel] [RFC PATCH 0/5] Kconfig dependencies for ppc machines Yang Zhong

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.