[Qemu-devel] [PATCH 3/3] S390: Don't compile in virtio-pci
As soon as virtio-pci.c gets compiled and used on S390 the internal qdev magic gets confused and tries to give us PCI devices instead of S390 virtio devices. Since we don't have PCI on S390, we can safely not compile virtio-pci at all. In order to do this I added a new config option "CONFIG_VIRTIO_PCI" that I enabled for every platform except S390. Thanks to this the change should be a complete nop for every other platform. Signed-off-by: Alexander Graf --- v1 -> v2: - change option to CONFIG_VIRTIO_CPI --- Makefile.objs |3 ++- default-configs/arm-softmmu.mak|1 + default-configs/cris-softmmu.mak |1 + default-configs/i386-softmmu.mak |1 + default-configs/m68k-softmmu.mak |1 + default-configs/microblaze-softmmu.mak |1 + default-configs/mips-softmmu.mak |1 + default-configs/mips64-softmmu.mak |1 + default-configs/mips64el-softmmu.mak |1 + default-configs/mipsel-softmmu.mak |1 + default-configs/ppc-softmmu.mak|1 + default-configs/ppc64-softmmu.mak |1 + default-configs/ppcemb-softmmu.mak |1 + default-configs/sh4-softmmu.mak|1 + default-configs/sh4eb-softmmu.mak |1 + default-configs/sparc-softmmu.mak |1 + default-configs/sparc64-softmmu.mak|1 + default-configs/x86_64-softmmu.mak |1 + 18 files changed, 19 insertions(+), 1 deletions(-) diff --git a/Makefile.objs b/Makefile.objs index 281f7a6..8891931 100644 --- a/Makefile.objs +++ b/Makefile.objs @@ -128,7 +128,8 @@ user-obj-y += cutils.o cache-utils.o hw-obj-y = hw-obj-y += loader.o -hw-obj-y += virtio.o virtio-console.o virtio-pci.o +hw-obj-y += virtio.o virtio-console.o +hw-obj-$(CONFIG_VIRTIO_PCI) += virtio-pci.o hw-obj-y += fw_cfg.o pci.o pci_host.o pcie_host.o hw-obj-y += watchdog.o hw-obj-$(CONFIG_ISA_MMIO) += isa_mmio.o diff --git a/default-configs/arm-softmmu.mak b/default-configs/arm-softmmu.mak index 02ad192..2f6ab11 100644 --- a/default-configs/arm-softmmu.mak +++ b/default-configs/arm-softmmu.mak @@ -24,3 +24,4 @@ CONFIG_SSI_SD=y CONFIG_LAN9118=y CONFIG_SMC91C111=y CONFIG_DS1338=y +CONFIG_VIRTIO_PCI=y diff --git a/default-configs/cris-softmmu.mak b/default-configs/cris-softmmu.mak index 8711402..b8c281b 100644 --- a/default-configs/cris-softmmu.mak +++ b/default-configs/cris-softmmu.mak @@ -2,3 +2,4 @@ CONFIG_NAND=y CONFIG_PTIMER=y +CONFIG_VIRTIO_PCI=y diff --git a/default-configs/i386-softmmu.mak b/default-configs/i386-softmmu.mak index 4dbf656..136ce16 100644 --- a/default-configs/i386-softmmu.mak +++ b/default-configs/i386-softmmu.mak @@ -16,3 +16,4 @@ CONFIG_IDE_PIIX=y CONFIG_NE2000_ISA=y CONFIG_PIIX_PCI=y CONFIG_SOUND=y +CONFIG_VIRTIO_PCI=y diff --git a/default-configs/m68k-softmmu.mak b/default-configs/m68k-softmmu.mak index 0a78375..69ca3ed 100644 --- a/default-configs/m68k-softmmu.mak +++ b/default-configs/m68k-softmmu.mak @@ -2,3 +2,4 @@ CONFIG_GDBSTUB_XML=y CONFIG_PTIMER=y +CONFIG_VIRTIO_PCI=y diff --git a/default-configs/microblaze-softmmu.mak b/default-configs/microblaze-softmmu.mak index c800c16..4a70526 100644 --- a/default-configs/microblaze-softmmu.mak +++ b/default-configs/microblaze-softmmu.mak @@ -1,3 +1,4 @@ # Default configuration for microblaze-softmmu CONFIG_PTIMER=y +CONFIG_VIRTIO_PCI=y diff --git a/default-configs/mips-softmmu.mak b/default-configs/mips-softmmu.mak index 345a093..8ef1c04 100644 --- a/default-configs/mips-softmmu.mak +++ b/default-configs/mips-softmmu.mak @@ -16,3 +16,4 @@ CONFIG_IDE_ISA=y CONFIG_IDE_PIIX=y CONFIG_NE2000_ISA=y CONFIG_SOUND=y +CONFIG_VIRTIO_PCI=y diff --git a/default-configs/mips64-softmmu.mak b/default-configs/mips64-softmmu.mak index 5900ee6..d72299a 100644 --- a/default-configs/mips64-softmmu.mak +++ b/default-configs/mips64-softmmu.mak @@ -16,3 +16,4 @@ CONFIG_IDE_ISA=y CONFIG_IDE_PIIX=y CONFIG_NE2000_ISA=y CONFIG_SOUND=y +CONFIG_VIRTIO_PCI=y diff --git a/default-configs/mips64el-softmmu.mak b/default-configs/mips64el-softmmu.mak index 3e1ba93..8127cfb 100644 --- a/default-configs/mips64el-softmmu.mak +++ b/default-configs/mips64el-softmmu.mak @@ -16,3 +16,4 @@ CONFIG_IDE_ISA=y CONFIG_IDE_PIIX=y CONFIG_NE2000_ISA=y CONFIG_SOUND=y +CONFIG_VIRTIO_PCI=y diff --git a/default-configs/mipsel-softmmu.mak b/default-configs/mipsel-softmmu.mak index 17b83d0..9747f15 100644 --- a/default-configs/mipsel-softmmu.mak +++ b/default-configs/mipsel-softmmu.mak @@ -16,3 +16,4 @@ CONFIG_IDE_ISA=y CONFIG_IDE_PIIX=y CONFIG_NE2000_ISA=y CONFIG_SOUND=y +CONFIG_VIRTIO_PCI=y diff --git a/default-configs/ppc-softmmu.mak b/default-configs/ppc-softmmu.mak index 5fe591c..1865b0b 100644 --- a/default-configs/ppc-softmmu.mak +++ b/default-configs/ppc-softmmu.mak @@ -15,3 +15,4 @@ CONFIG_IDE_ISA=y CONFIG_IDE_CMD646=y CONFIG_NE2000_ISA=y CONFIG_SOUND=y +CONFIG_VIRTIO_PCI=y diff --git a/default-configs/ppc64-softmmu.mak b/default-configs/ppc64-softmmu.mak index fe05073..bfd
Re: [Qemu-devel] [PATCH 3/3] S390: Don't compile in virtio-pci
On 3/24/10, Alexander Graf wrote: > Blue Swirl wrote: > > On 3/24/10, Alexander Graf wrote: > > > >> As soon as virtio-pci.c gets compiled and used on S390 the internal qdev > magic > >> gets confused and tries to give us PCI devices instead of S390 virtio > devices. > >> > >> Since we don't have PCI on S390, we can safely not compile virtio-pci at > all. > >> > >> In order to do this I added a new config option "CONFIG_PCI" that I > enabled > >> for every platform except S390. Thanks to this the change should be a > complete > >> nop for every other platform. > >> > > > > The name should be CONFIG_VIRTIO_PCI, CONFIG_PCI would enable > > compilation of pci.c. > > > > > My idea was to keep the config option generic and rip out all PCI stuff > from s390x-softmmu. We don't even do MMIO :-). In that case you should also rip out all PCI cards.
Re: [Qemu-devel] [PATCH 3/3] S390: Don't compile in virtio-pci
Blue Swirl wrote: > On 3/24/10, Alexander Graf wrote: > >> As soon as virtio-pci.c gets compiled and used on S390 the internal qdev >> magic >> gets confused and tries to give us PCI devices instead of S390 virtio >> devices. >> >> Since we don't have PCI on S390, we can safely not compile virtio-pci at >> all. >> >> In order to do this I added a new config option "CONFIG_PCI" that I enabled >> for every platform except S390. Thanks to this the change should be a >> complete >> nop for every other platform. >> > > The name should be CONFIG_VIRTIO_PCI, CONFIG_PCI would enable > compilation of pci.c. > My idea was to keep the config option generic and rip out all PCI stuff from s390x-softmmu. We don't even do MMIO :-). Alex
Re: [Qemu-devel] [PATCH 3/3] S390: Don't compile in virtio-pci
On 3/24/10, Alexander Graf wrote: > As soon as virtio-pci.c gets compiled and used on S390 the internal qdev magic > gets confused and tries to give us PCI devices instead of S390 virtio > devices. > > Since we don't have PCI on S390, we can safely not compile virtio-pci at all. > > In order to do this I added a new config option "CONFIG_PCI" that I enabled > for every platform except S390. Thanks to this the change should be a > complete > nop for every other platform. The name should be CONFIG_VIRTIO_PCI, CONFIG_PCI would enable compilation of pci.c. > If anyone feels like their platform shouldn't support PCI either, just remove > the config option. If you think we should build even less when we don't have > PCI, feel free to come up with a follow-up patch. None of the currently supported Sparc32 boards have PCI. There are some real devices with PCI (JavaStations) though.
[Qemu-devel] [PATCH 3/3] S390: Don't compile in virtio-pci
As soon as virtio-pci.c gets compiled and used on S390 the internal qdev magic gets confused and tries to give us PCI devices instead of S390 virtio devices. Since we don't have PCI on S390, we can safely not compile virtio-pci at all. In order to do this I added a new config option "CONFIG_PCI" that I enabled for every platform except S390. Thanks to this the change should be a complete nop for every other platform. If anyone feels like their platform shouldn't support PCI either, just remove the config option. If you think we should build even less when we don't have PCI, feel free to come up with a follow-up patch. Signed-off-by: Alexander Graf --- Makefile.objs |3 ++- default-configs/arm-softmmu.mak|1 + default-configs/cris-softmmu.mak |1 + default-configs/i386-softmmu.mak |1 + default-configs/m68k-softmmu.mak |1 + default-configs/microblaze-softmmu.mak |1 + default-configs/mips-softmmu.mak |1 + default-configs/mips64-softmmu.mak |1 + default-configs/mips64el-softmmu.mak |1 + default-configs/mipsel-softmmu.mak |1 + default-configs/ppc-softmmu.mak|1 + default-configs/ppc64-softmmu.mak |1 + default-configs/ppcemb-softmmu.mak |1 + default-configs/sh4-softmmu.mak|1 + default-configs/sh4eb-softmmu.mak |1 + default-configs/sparc-softmmu.mak |1 + default-configs/sparc64-softmmu.mak|1 + default-configs/x86_64-softmmu.mak |1 + 18 files changed, 19 insertions(+), 1 deletions(-) diff --git a/Makefile.objs b/Makefile.objs index 281f7a6..a6ce4f5 100644 --- a/Makefile.objs +++ b/Makefile.objs @@ -128,7 +128,8 @@ user-obj-y += cutils.o cache-utils.o hw-obj-y = hw-obj-y += loader.o -hw-obj-y += virtio.o virtio-console.o virtio-pci.o +hw-obj-y += virtio.o virtio-console.o +hw-obj-$(CONFIG_PCI) += virtio-pci.o hw-obj-y += fw_cfg.o pci.o pci_host.o pcie_host.o hw-obj-y += watchdog.o hw-obj-$(CONFIG_ISA_MMIO) += isa_mmio.o diff --git a/default-configs/arm-softmmu.mak b/default-configs/arm-softmmu.mak index 02ad192..a3819e1 100644 --- a/default-configs/arm-softmmu.mak +++ b/default-configs/arm-softmmu.mak @@ -24,3 +24,4 @@ CONFIG_SSI_SD=y CONFIG_LAN9118=y CONFIG_SMC91C111=y CONFIG_DS1338=y +CONFIG_PCI=y diff --git a/default-configs/cris-softmmu.mak b/default-configs/cris-softmmu.mak index 8711402..9377235 100644 --- a/default-configs/cris-softmmu.mak +++ b/default-configs/cris-softmmu.mak @@ -2,3 +2,4 @@ CONFIG_NAND=y CONFIG_PTIMER=y +CONFIG_PCI=y diff --git a/default-configs/i386-softmmu.mak b/default-configs/i386-softmmu.mak index 4dbf656..192dcb8 100644 --- a/default-configs/i386-softmmu.mak +++ b/default-configs/i386-softmmu.mak @@ -16,3 +16,4 @@ CONFIG_IDE_PIIX=y CONFIG_NE2000_ISA=y CONFIG_PIIX_PCI=y CONFIG_SOUND=y +CONFIG_PCI=y diff --git a/default-configs/m68k-softmmu.mak b/default-configs/m68k-softmmu.mak index 0a78375..07e02d6 100644 --- a/default-configs/m68k-softmmu.mak +++ b/default-configs/m68k-softmmu.mak @@ -2,3 +2,4 @@ CONFIG_GDBSTUB_XML=y CONFIG_PTIMER=y +CONFIG_PCI=y diff --git a/default-configs/microblaze-softmmu.mak b/default-configs/microblaze-softmmu.mak index c800c16..ddc3c15 100644 --- a/default-configs/microblaze-softmmu.mak +++ b/default-configs/microblaze-softmmu.mak @@ -1,3 +1,4 @@ # Default configuration for microblaze-softmmu CONFIG_PTIMER=y +CONFIG_PCI=y diff --git a/default-configs/mips-softmmu.mak b/default-configs/mips-softmmu.mak index 345a093..4598a0d 100644 --- a/default-configs/mips-softmmu.mak +++ b/default-configs/mips-softmmu.mak @@ -16,3 +16,4 @@ CONFIG_IDE_ISA=y CONFIG_IDE_PIIX=y CONFIG_NE2000_ISA=y CONFIG_SOUND=y +CONFIG_PCI=y diff --git a/default-configs/mips64-softmmu.mak b/default-configs/mips64-softmmu.mak index 5900ee6..6c7f3c6 100644 --- a/default-configs/mips64-softmmu.mak +++ b/default-configs/mips64-softmmu.mak @@ -16,3 +16,4 @@ CONFIG_IDE_ISA=y CONFIG_IDE_PIIX=y CONFIG_NE2000_ISA=y CONFIG_SOUND=y +CONFIG_PCI=y diff --git a/default-configs/mips64el-softmmu.mak b/default-configs/mips64el-softmmu.mak index 3e1ba93..2dcac82 100644 --- a/default-configs/mips64el-softmmu.mak +++ b/default-configs/mips64el-softmmu.mak @@ -16,3 +16,4 @@ CONFIG_IDE_ISA=y CONFIG_IDE_PIIX=y CONFIG_NE2000_ISA=y CONFIG_SOUND=y +CONFIG_PCI=y diff --git a/default-configs/mipsel-softmmu.mak b/default-configs/mipsel-softmmu.mak index 17b83d0..e3e3878 100644 --- a/default-configs/mipsel-softmmu.mak +++ b/default-configs/mipsel-softmmu.mak @@ -16,3 +16,4 @@ CONFIG_IDE_ISA=y CONFIG_IDE_PIIX=y CONFIG_NE2000_ISA=y CONFIG_SOUND=y +CONFIG_PCI=y diff --git a/default-configs/ppc-softmmu.mak b/default-configs/ppc-softmmu.mak index 5fe591c..50932fa 100644 --- a/default-configs/ppc-softmmu.mak +++ b/default-configs/ppc-softmmu.mak @@ -15,3 +15,4 @@ CONFIG_IDE_ISA=y CONFIG_IDE_CMD646=y CONFIG_NE2000_ISA=y CONFIG_SOUND=y +CONFIG_PCI=y diff --git a/default-configs/ppc64-s