diff mbox series

[v2,3/5] hw/isa/Kconfig: i82378 SuperIO requires PC speaker device

Message ID 20190316223918.11917-4-philmd@redhat.com (mailing list archive)
State New, archived
Headers show
Series hw/Kconfig: Fixes when running ./configure --without-default-devices | expand

Commit Message

Philippe Mathieu-Daudé March 16, 2019, 10:39 p.m. UTC
This fixes when configuring with --without-default-devices:

  $ qemu-system-ppc -M prep --nodefaults
  qemu-system-ppc: Machine type 'prep' is deprecated: use 40p machine type instead
  qemu-system-ppc: Unknown device 'isa-pcspk' for bus 'ISA'
  Aborted (core dumped)

  (gdb) bt
  #1  0x00007ffff5a11895 in __GI_abort () at abort.c:79
  #2  0x0000555555845db3 in qdev_create (bus=0x55555641e360, name=name@entry=0x555555b1f338 "isa-pcspk") at hw/core/qdev.c:131
  #3  0x000055555586b03e in isa_create (bus=bus@entry=0x55555641e360, name=name@entry=0x555555b1f338 "isa-pcspk") at hw/isa/isa-bus.c:162
  #4  0x000055555586bf7b in pcspk_init (pit=0x5555561696b0, bus=0x55555641e360) at include/hw/audio/pcspk.h:38
  #5  0x000055555586bf7b in i82378_realize (pci=<optimized out>, errp=0x7fffffffc960) at hw/isa/i82378.c:104
  #6  0x000055555587e288 in pci_qdev_realize (qdev=0x55555641be60, errp=<optimized out>) at hw/pci/pci.c:2076
  #7  0x0000555555846fb4 in device_set_realized (obj=<optimized out>, value=<optimized out>, errp=0x7fffffffcaf0) at hw/core/qdev.c:834
  #8  0x00005555559273f7 in property_set_bool (obj=0x55555641be60, v=<optimized out>, name=<optimized out>, opaque=0x5555563df1c0, errp=0x7fffffffcaf0) at qom/object.c:2074
  #9  0x000055555592ba1f in object_property_set_qobject (obj=obj@entry=0x55555641be60, value=value@entry=0x55555641d2b0, name=name@entry=0x555555b17175 "realized", errp=errp@entry=0x7fffffffcaf0) at qom/qom-qobject.c:27
  #10 0x0000555555929355 in object_property_set_bool (obj=0x55555641be60, value=<optimized out>, name=0x555555b17175 "realized", errp=0x7fffffffcaf0) at qom/object.c:1332
  #11 0x0000555555845f42 in qdev_init_nofail (dev=dev@entry=0x55555641be60) at hw/core/qdev.c:321
  #12 0x000055555587ce06 in pci_create_simple_multifunction (name=name@entry=0x555555b1f346 "i82378", multifunction=false, devfn=devfn@entry=8, bus=bus@entry=0x55555628cfe8) at hw/pci/pci.c:2115
  #13 0x000055555587ce06 in pci_create_simple (bus=bus@entry=0x55555628cfe8, devfn=devfn@entry=8, name=name@entry=0x555555b1f346 "i82378") at hw/pci/pci.c:2126
  #14 0x000055555575e62c in ppc_prep_init (machine=0x55555609af00) at hw/ppc/prep.c:516
  #15 0x000055555584d57b in machine_run_board_init (machine=0x55555609af00) at hw/core/machine.c:1030

Fixes: dd0ff8191ab
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
 hw/isa/Kconfig | 1 +
 1 file changed, 1 insertion(+)

Comments

Thomas Huth March 25, 2019, 5:01 a.m. UTC | #1
On 16/03/2019 23.39, Philippe Mathieu-Daudé wrote:
> This fixes when configuring with --without-default-devices:
> 
>   $ qemu-system-ppc -M prep --nodefaults
>   qemu-system-ppc: Machine type 'prep' is deprecated: use 40p machine type instead
>   qemu-system-ppc: Unknown device 'isa-pcspk' for bus 'ISA'
>   Aborted (core dumped)
> 
>   (gdb) bt
>   #1  0x00007ffff5a11895 in __GI_abort () at abort.c:79
>   #2  0x0000555555845db3 in qdev_create (bus=0x55555641e360, name=name@entry=0x555555b1f338 "isa-pcspk") at hw/core/qdev.c:131
>   #3  0x000055555586b03e in isa_create (bus=bus@entry=0x55555641e360, name=name@entry=0x555555b1f338 "isa-pcspk") at hw/isa/isa-bus.c:162
>   #4  0x000055555586bf7b in pcspk_init (pit=0x5555561696b0, bus=0x55555641e360) at include/hw/audio/pcspk.h:38
>   #5  0x000055555586bf7b in i82378_realize (pci=<optimized out>, errp=0x7fffffffc960) at hw/isa/i82378.c:104
>   #6  0x000055555587e288 in pci_qdev_realize (qdev=0x55555641be60, errp=<optimized out>) at hw/pci/pci.c:2076
>   #7  0x0000555555846fb4 in device_set_realized (obj=<optimized out>, value=<optimized out>, errp=0x7fffffffcaf0) at hw/core/qdev.c:834
>   #8  0x00005555559273f7 in property_set_bool (obj=0x55555641be60, v=<optimized out>, name=<optimized out>, opaque=0x5555563df1c0, errp=0x7fffffffcaf0) at qom/object.c:2074
>   #9  0x000055555592ba1f in object_property_set_qobject (obj=obj@entry=0x55555641be60, value=value@entry=0x55555641d2b0, name=name@entry=0x555555b17175 "realized", errp=errp@entry=0x7fffffffcaf0) at qom/qom-qobject.c:27
>   #10 0x0000555555929355 in object_property_set_bool (obj=0x55555641be60, value=<optimized out>, name=0x555555b17175 "realized", errp=0x7fffffffcaf0) at qom/object.c:1332
>   #11 0x0000555555845f42 in qdev_init_nofail (dev=dev@entry=0x55555641be60) at hw/core/qdev.c:321
>   #12 0x000055555587ce06 in pci_create_simple_multifunction (name=name@entry=0x555555b1f346 "i82378", multifunction=false, devfn=devfn@entry=8, bus=bus@entry=0x55555628cfe8) at hw/pci/pci.c:2115
>   #13 0x000055555587ce06 in pci_create_simple (bus=bus@entry=0x55555628cfe8, devfn=devfn@entry=8, name=name@entry=0x555555b1f346 "i82378") at hw/pci/pci.c:2126
>   #14 0x000055555575e62c in ppc_prep_init (machine=0x55555609af00) at hw/ppc/prep.c:516
>   #15 0x000055555584d57b in machine_run_board_init (machine=0x55555609af00) at hw/core/machine.c:1030
> 
> Fixes: dd0ff8191ab
> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
> ---
>  hw/isa/Kconfig | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/hw/isa/Kconfig b/hw/isa/Kconfig
> index 1bb5ccdba7..b40075df89 100644
> --- a/hw/isa/Kconfig
> +++ b/hw/isa/Kconfig
> @@ -11,6 +11,7 @@ config I82378
>      select I8254
>      select I82374
>      select MC146818RTC
> +    select PCSPK
>  
>  config PC87312
>      bool
> 

i82378_realize() in hw/isa/i82378.c calls pcspk_init(), so this sounds
right.

Reviewed-by: Thomas Huth <thuth@redhat.com>
diff mbox series

Patch

diff --git a/hw/isa/Kconfig b/hw/isa/Kconfig
index 1bb5ccdba7..b40075df89 100644
--- a/hw/isa/Kconfig
+++ b/hw/isa/Kconfig
@@ -11,6 +11,7 @@  config I82378
     select I8254
     select I82374
     select MC146818RTC
+    select PCSPK
 
 config PC87312
     bool