Skip to contentSkip to conversation

hw/i386: The i440fx is not a machine, remove it from the machine list

PATCH In review Philippe Mathieu-Daudé 2 participants 3 messages Apr 27, 2019

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 hw/i386: The i440fx is not a machine, remove it from the machine list

When building with CONFIG_ISAPC=n and CONFIG_I440FX=y we get:

  $ make subdir-x86_64-softmmu
  [...]
  /usr/bin/ld: hw/i386/pc_piix.o: in function `pc_init1':
  /source/qemu/hw/i386/pc_piix.c:261: undefined reference to `isa_ide_init'
  /usr/bin/ld: /source/qemu/hw/i386/pc_piix.c:261: undefined reference to `isa_ide_init'
  collect2: error: ld returned 1 exit status
  make[1]: *** [Makefile:204: qemu-system-x86_64] Error 1

This is because the I440FX device is a North Bridge, not a machine. It is however used by the ISAPC machine.

Correct the dependency in the ISAPC Kconfig.

---
 default-configs/i386-softmmu.mak | 1 -
 hw/i386/Kconfig                  | 2 +-
 2 files changed, 1 insertion(+), 2 deletions(-)
default-configs/i386-softmmu.mak +0 -1
index ba3fb3ff50a..b33f5952128 100644
@@ -23,5 +23,4 @@
 # Boards:
 #
 CONFIG_ISAPC=y
-CONFIG_I440FX=y
 CONFIG_Q35=y
hw/i386/Kconfig +1 -1
index a6aed7c1313..9211adf2bb3 100644
@@ -69,7 +69,7 @@ config ISAPC
     select VGA_ISA
     # FIXME: it is in the same file as i440fx, and does not compile
     # if separated
-    depends on I440FX
+    select I440FX
 
 config Q35
     bool
Signature · 1 line
2.20.1
#1 lore raw
Quoted 11 lines · Philippe Mathieu-Daudé

When building with CONFIG_ISAPC=n and CONFIG_I440FX=y we get:

  $ make subdir-x86_64-softmmu
  [...]
  /usr/bin/ld: hw/i386/pc_piix.o: in function `pc_init1':
  /source/qemu/hw/i386/pc_piix.c:261: undefined reference to `isa_ide_init'
  /usr/bin/ld: /source/qemu/hw/i386/pc_piix.c:261: undefined reference to `isa_ide_init'
  collect2: error: ld returned 1 exit status
  make[1]: *** [Makefile:204: qemu-system-x86_64] Error 1

This is because the I440FX device is a North Bridge, not a machine.

Really? I thought CONFIG_I440FX was there to configure the "pc-i440fx-x.y" machine types?

Thomas

#2 lore raw
Quoted 11 lines · Thomas Huth
Quoted 10 lines · Philippe Mathieu-Daudé

When building with CONFIG_ISAPC=n and CONFIG_I440FX=y we get:

  $ make subdir-x86_64-softmmu
  [...]
  /usr/bin/ld: hw/i386/pc_piix.o: in function `pc_init1':
  /source/qemu/hw/i386/pc_piix.c:261: undefined reference to `isa_ide_init'
  /usr/bin/ld: /source/qemu/hw/i386/pc_piix.c:261: undefined reference to `isa_ide_init'
  collect2: error: ld returned 1 exit status
  make[1]: *** [Makefile:204: qemu-system-x86_64] Error 1
Quoted 4 lines
Quoted 1 line

This is because the I440FX device is a North Bridge, not a machine.

Really? I thought CONFIG_I440FX was there to configure the "pc-i440fx-x.y" machine types?

Ah, I just found in hw/i386/pc_piix.c:

    if (pcmc->pci_enabled) {
        pci_bus = i440fx_init(host_type,
                              pci_type,
                              &i440fx_state, &piix3_devfn,
                              &isa_bus, pcms->gsi,
                              system_memory, system_io,
                              machine->ram_size,
                              pcms->below_4g_mem_size,
                              pcms->above_4g_mem_size,
                              pci_memory, ram_memory);
        pcms->bus = pci_bus;
    } else {
        pci_bus = NULL;
        i440fx_state = NULL;
        isa_bus = isa_bus_new(NULL, get_system_memory(), system_io,
                              &error_abort);
        no_hpet = 1;
    }

So I guess I'll have to figure it out from here ;)

Thanks,

Phil.