Skip to contentSkip to conversation

Add config options for some not-always-sensible devices

PATCH In review David Gibson 4 participants 9 messages Feb 27, 2015 – May 19, 2015

lore
Share & tools
lore
#0 lore raw

v2 cover Add config options for some not-always-sensible devices

This series adds explicit config options to control inclusion of a number of devices. These are generally things that could theoretically appear on anything (or at least a wide range of targets), but are in practice only likely to appear on a much smaller set of targets.

In some cases the set of default targets where these are included is also trimmed, but either way it allows users or distributors to more easily tweak which devices are and aren't included in the build.

Changes from v1:
* Fix typos in 1/3 commit message
* Move config option to a better place in arm-softmmu.mak in 2/3

David Gibson (3):
Add specific config options for PCI-E bridges Create specific config option for "platform-bus" Give ivshmem its own config option

 default-configs/arm-softmmu.mak    | 5 +++++
 default-configs/i386-softmmu.mak   | 3 +++
 default-configs/pci.mak            | 1 +
 default-configs/ppc-softmmu.mak    | 1 +
 default-configs/ppc64-softmmu.mak  | 1 +
 default-configs/x86_64-softmmu.mak | 3 +++
 hw/core/Makefile.objs              | 2 +-
 hw/misc/Makefile.objs              | 4 +---
 hw/pci-bridge/Makefile.objs        | 5 +++--
 9 files changed, 19 insertions(+), 6 deletions(-)
Signature · 1 line
2.1.0
#1 lore raw

PATCH v2 1/3 Add specific config options for PCI-E bridges

The i82801b11, ioh3420 and xio3130 PCI Express devices are currently included in the build unconditionally.

While they could theoretically appear on any target platform with PCI-E, they're pretty unlikely to appear on platforms that aren't Intel derived.

Therefore, to avoid presenting unlikely-to-be-relevant devices to the user, add config options to enable these components, and enable them by default only on x86 and arm platforms.

(Note that this patch does include these for aarch64, via its inclusion of arm-softmmu.mak).

---
 default-configs/arm-softmmu.mak    | 4 ++++
 default-configs/i386-softmmu.mak   | 3 +++
 default-configs/x86_64-softmmu.mak | 3 +++
 hw/pci-bridge/Makefile.objs        | 5 +++--
 4 files changed, 13 insertions(+), 2 deletions(-)
default-configs/arm-softmmu.mak +4 -0
index b00c2e1..6ee9b43 100644
@@ -91,3 +91,7 @@ CONFIG_INTEGRATOR_DEBUG=y
 CONFIG_ALLWINNER_A10_PIT=y
 CONFIG_ALLWINNER_A10_PIC=y
 CONFIG_ALLWINNER_A10=y
+
+CONFIG_XIO3130=y
+CONFIG_IOH3420=y
+CONFIG_I82801B11=y
default-configs/i386-softmmu.mak +3 -0
index bd99af9..0b8ce4b 100644
@@ -43,3 +43,6 @@ CONFIG_IOAPIC=y
 CONFIG_ICC_BUS=y
 CONFIG_PVPANIC=y
 CONFIG_MEM_HOTPLUG=y
+CONFIG_XIO3130=y
+CONFIG_IOH3420=y
+CONFIG_I82801B11=y
default-configs/x86_64-softmmu.mak +3 -0
index e7c2734..6add04a 100644
@@ -43,3 +43,6 @@ CONFIG_IOAPIC=y
 CONFIG_ICC_BUS=y
 CONFIG_PVPANIC=y
 CONFIG_MEM_HOTPLUG=y
+CONFIG_XIO3130=y
+CONFIG_IOH3420=y
+CONFIG_I82801B11=y
hw/pci-bridge/Makefile.objs +3 -2
index 968b369..96c596e 100644
@@ -1,5 +1,6 @@
 common-obj-y += pci_bridge_dev.o
-common-obj-y += ioh3420.o xio3130_upstream.o xio3130_downstream.o
-common-obj-y += i82801b11.o
+common-obj-$(CONFIG_XIO3130) += xio3130_upstream.o xio3130_downstream.o
+common-obj-$(CONFIG_IOH3420) += ioh3420.o
+common-obj-$(CONFIG_I82801B11) += i82801b11.o
 # NewWorld PowerMac
 common-obj-$(CONFIG_DEC_PCI) += dec.o
Signature · 1 line
2.1.0
#2 lore raw

Re: [Qemu-devel] [PATCHv2 1/3] Add specific config options for PCI-E bridges

Hi,

I'm testing PCIe root port (ioh3420) on ARM64. Firstly I use following simple command line to check whether it works.

qemu-system-aarch64 -M virt -device ioh3420

But it fails with below log:

qemu-system-aarch64: -device ioh3420: Device initialization failed
qemu-system-aarch64: -device ioh3420: Device 'ioh3420' could not be initialized

Is there something wrong with my command line? or ioh3420 can't be used on ARM64? But from this patch and the discussions on it, it seems ioh3420 should work on ARM64.

Thanks,
Shannon

Quoted 70 lines · David Gibson

The i82801b11, ioh3420 and xio3130 PCI Express devices are currently included in the build unconditionally.

While they could theoretically appear on any target platform with PCI-E, they're pretty unlikely to appear on platforms that aren't Intel derived.

Therefore, to avoid presenting unlikely-to-be-relevant devices to the user, add config options to enable these components, and enable them by default only on x86 and arm platforms.

(Note that this patch does include these for aarch64, via its inclusion of arm-softmmu.mak).

---
 default-configs/arm-softmmu.mak    | 4 ++++
 default-configs/i386-softmmu.mak   | 3 +++
 default-configs/x86_64-softmmu.mak | 3 +++
 hw/pci-bridge/Makefile.objs        | 5 +++--
 4 files changed, 13 insertions(+), 2 deletions(-)
default-configs/arm-softmmu.mak +4 -0
index b00c2e1..6ee9b43 100644
@@ -91,3 +91,7 @@ CONFIG_INTEGRATOR_DEBUG=y
 CONFIG_ALLWINNER_A10_PIT=y
 CONFIG_ALLWINNER_A10_PIC=y
 CONFIG_ALLWINNER_A10=y
+
+CONFIG_XIO3130=y
+CONFIG_IOH3420=y
+CONFIG_I82801B11=y
default-configs/i386-softmmu.mak +3 -0
index bd99af9..0b8ce4b 100644
@@ -43,3 +43,6 @@ CONFIG_IOAPIC=y
 CONFIG_ICC_BUS=y
 CONFIG_PVPANIC=y
 CONFIG_MEM_HOTPLUG=y
+CONFIG_XIO3130=y
+CONFIG_IOH3420=y
+CONFIG_I82801B11=y
default-configs/x86_64-softmmu.mak +3 -0
index e7c2734..6add04a 100644
@@ -43,3 +43,6 @@ CONFIG_IOAPIC=y
 CONFIG_ICC_BUS=y
 CONFIG_PVPANIC=y
 CONFIG_MEM_HOTPLUG=y
+CONFIG_XIO3130=y
+CONFIG_IOH3420=y
+CONFIG_I82801B11=y
hw/pci-bridge/Makefile.objs +3 -2
index 968b369..96c596e 100644
@@ -1,5 +1,6 @@
 common-obj-y += pci_bridge_dev.o
-common-obj-y += ioh3420.o xio3130_upstream.o xio3130_downstream.o
-common-obj-y += i82801b11.o
+common-obj-$(CONFIG_XIO3130) += xio3130_upstream.o xio3130_downstream.o
+common-obj-$(CONFIG_IOH3420) += ioh3420.o
+common-obj-$(CONFIG_I82801B11) += i82801b11.o
 # NewWorld PowerMac
 common-obj-$(CONFIG_DEC_PCI) += dec.o
#3 lore raw

Re: [Qemu-devel] [PATCHv2 1/3] Add specific config options for PCI-E bridges

Hi,

Quoted 5 lines · Shannon Zhao

Hi,

I'm testing PCIe root port (ioh3420) on ARM64. Firstly I use following simple command line to check whether it works.

Quoted 8 lines

qemu-system-aarch64 -M virt -device ioh3420

But it fails with below log:

qemu-system-aarch64: -device ioh3420: Device initialization failed
qemu-system-aarch64: -device ioh3420: Device 'ioh3420' could not be initialized

I found that it fails at ioh3420_initfn when calling msi_init, while upstream qemu doesn't support msi on ARM64, so msi_init return -ENOTSUP and ioh3420_initfn fails.

After I apply the following patch from Christoffer, the ioh3420 works.
[PATCH v2 0/3] Add support for for GICv2m and MSIs to arm-virt

But do we need to fix the failure for the current upstream qemu?

Quoted 83 lines

Is there something wrong with my command line? or ioh3420 can't be used on ARM64? But from this patch and the discussions on it, it seems ioh3420 should work on ARM64.

Thanks,
Shannon

Quoted 62 lines · David Gibson

The i82801b11, ioh3420 and xio3130 PCI Express devices are currently included in the build unconditionally.

While they could theoretically appear on any target platform with PCI-E, they're pretty unlikely to appear on platforms that aren't Intel derived.

Therefore, to avoid presenting unlikely-to-be-relevant devices to the user, add config options to enable these components, and enable them by default only on x86 and arm platforms.

(Note that this patch does include these for aarch64, via its inclusion of arm-softmmu.mak).

---
 default-configs/arm-softmmu.mak    | 4 ++++
 default-configs/i386-softmmu.mak   | 3 +++
 default-configs/x86_64-softmmu.mak | 3 +++
 hw/pci-bridge/Makefile.objs        | 5 +++--
 4 files changed, 13 insertions(+), 2 deletions(-)
default-configs/arm-softmmu.mak +4 -0
index b00c2e1..6ee9b43 100644
@@ -91,3 +91,7 @@ CONFIG_INTEGRATOR_DEBUG=y
 CONFIG_ALLWINNER_A10_PIT=y
 CONFIG_ALLWINNER_A10_PIC=y
 CONFIG_ALLWINNER_A10=y
+
+CONFIG_XIO3130=y
+CONFIG_IOH3420=y
+CONFIG_I82801B11=y
default-configs/i386-softmmu.mak +3 -0
index bd99af9..0b8ce4b 100644
@@ -43,3 +43,6 @@ CONFIG_IOAPIC=y
 CONFIG_ICC_BUS=y
 CONFIG_PVPANIC=y
 CONFIG_MEM_HOTPLUG=y
+CONFIG_XIO3130=y
+CONFIG_IOH3420=y
+CONFIG_I82801B11=y
default-configs/x86_64-softmmu.mak +3 -0
index e7c2734..6add04a 100644
@@ -43,3 +43,6 @@ CONFIG_IOAPIC=y
 CONFIG_ICC_BUS=y
 CONFIG_PVPANIC=y
 CONFIG_MEM_HOTPLUG=y
+CONFIG_XIO3130=y
+CONFIG_IOH3420=y
+CONFIG_I82801B11=y
hw/pci-bridge/Makefile.objs +0 -0
index 968b369..96c596e 100644

hw/pci-bridge/Makefile.objs line 6

Quoted 8 lines
hw/pci-bridge/Makefile.objs +3 -2
@@ -1,5 +1,6 @@
 common-obj-y += pci_bridge_dev.o
-common-obj-y += ioh3420.o xio3130_upstream.o xio3130_downstream.o
-common-obj-y += i82801b11.o
+common-obj-$(CONFIG_XIO3130) += xio3130_upstream.o xio3130_downstream.o
+common-obj-$(CONFIG_IOH3420) += ioh3420.o
+common-obj-$(CONFIG_I82801B11) += i82801b11.o
 # NewWorld PowerMac
 common-obj-$(CONFIG_DEC_PCI) += dec.o

.

Signature · 1 line
Shannon
#4 lore raw

PATCH v2 2/3 Create specific config option for "platform-bus"

In reply to David Gibson

Currently the "platform-bus" device is included for all softmmu builds. This bridge is intended for use on any platforms that require dynamic creation of sysbus devices. However, at present it is used only for the PPC E500 target, with plans for the ARM "virt" target in the immediate future.

To avoid a not-very-useful entry appearing in "qemu -device ?" output on other targets, this patch makes a specific config option for platform-bus and enables it (for now) only on ppc configurations which include E500 and on ARM (which always includes the "virt" target).

---
 default-configs/arm-softmmu.mak   | 1 +
 default-configs/ppc-softmmu.mak   | 1 +
 default-configs/ppc64-softmmu.mak | 1 +
 hw/core/Makefile.objs             | 2 +-
 4 files changed, 4 insertions(+), 1 deletion(-)
default-configs/arm-softmmu.mak +1 -0
index 6ee9b43..149ae1b 100644
@@ -34,6 +34,7 @@ CONFIG_PFLASH_CFI02=y
 CONFIG_MICRODRIVE=y
 CONFIG_USB_MUSB=y
 CONFIG_USB_EHCI_SYSBUS=y
+CONFIG_PLATFORM_BUS=y
 
 CONFIG_ARM11MPCORE=y
 CONFIG_A9MPCORE=y
default-configs/ppc-softmmu.mak +1 -0
index aebfab9..4b60e69 100644
@@ -43,6 +43,7 @@ CONFIG_PREP=y
 CONFIG_MAC=y
 CONFIG_E500=y
 CONFIG_OPENPIC_KVM=$(and $(CONFIG_E500),$(CONFIG_KVM))
+CONFIG_PLATFORM_BUS=y
 CONFIG_ETSEC=y
 CONFIG_LIBDECNUMBER=y
 # For PReP
default-configs/ppc64-softmmu.mak +1 -0
index f195a87..de71e41 100644
@@ -44,6 +44,7 @@ CONFIG_PREP=y
 CONFIG_MAC=y
 CONFIG_E500=y
 CONFIG_OPENPIC_KVM=$(and $(CONFIG_E500),$(CONFIG_KVM))
+CONFIG_PLATFORM_BUS=y
 CONFIG_ETSEC=y
 CONFIG_LIBDECNUMBER=y
 # For pSeries
hw/core/Makefile.objs +1 -1
index 9dce1bc..abb3560 100644
@@ -14,4 +14,4 @@ common-obj-$(CONFIG_SOFTMMU) += machine.o
 common-obj-$(CONFIG_SOFTMMU) += null-machine.o
 common-obj-$(CONFIG_SOFTMMU) += loader.o
 common-obj-$(CONFIG_SOFTMMU) += qdev-properties-system.o
-common-obj-$(CONFIG_SOFTMMU) += platform-bus.o
+common-obj-$(CONFIG_PLATFORM_BUS) += platform-bus.o
Signature · 1 line
2.1.0
#5 lore raw

PATCH v2 3/3 Give ivshmem its own config option

In reply to David Gibson

Currently the ivshmem device is built whenever both PCI and KVM support are included. This patch gives it its own config option to allow easier customization of whether to include it. It's enabled by default in the same circumstances as now - when both PCI and KVM are available.

---
 default-configs/pci.mak | 1 +
 hw/misc/Makefile.objs   | 4 +---
 2 files changed, 2 insertions(+), 3 deletions(-)
default-configs/pci.mak +1 -0
index bea6b01..58a2c0a 100644
@@ -35,3 +35,4 @@ CONFIG_SDHCI=y
 CONFIG_EDU=y
 CONFIG_VGA=y
 CONFIG_VGA_PCI=y
+CONFIG_IVSHMEM=$(CONFIG_KVM)
hw/misc/Makefile.objs +1 -3
index 029a56f..6c6e296 100644
@@ -19,9 +19,7 @@ common-obj-$(CONFIG_PUV3) += puv3_pm.o
 
 common-obj-$(CONFIG_MACIO) += macio/
 
-ifeq ($(CONFIG_PCI), y)
-obj-$(CONFIG_KVM) += ivshmem.o
-endif
+obj-$(CONFIG_IVSHMEM) += ivshmem.o
 
 obj-$(CONFIG_REALVIEW) += arm_sysctl.o
 obj-$(CONFIG_NSERIES) += cbus.o
Signature · 1 line
2.1.0
#6 lore raw
In reply to David Gibson
Quoted 19 lines · David Gibson

This series adds explicit config options to control inclusion of a number of devices. These are generally things that could theoretically appear on anything (or at least a wide range of targets), but are in practice only likely to appear on a much smaller set of targets.

In some cases the set of default targets where these are included is also trimmed, but either way it allows users or distributors to more easily tweak which devices are and aren't included in the build.

Changes from v1:
* Fix typos in 1/3 commit message
* Move config option to a better place in arm-softmmu.mak in 2/3

David Gibson (3):
Add specific config options for PCI-E bridges Create specific config option for "platform-bus" Give ivshmem its own config option

Quoted 11 lines
 default-configs/arm-softmmu.mak    | 5 +++++
 default-configs/i386-softmmu.mak   | 3 +++
 default-configs/pci.mak            | 1 +
 default-configs/ppc-softmmu.mak    | 1 +
 default-configs/ppc64-softmmu.mak  | 1 +
 default-configs/x86_64-softmmu.mak | 3 +++
 hw/core/Makefile.objs              | 2 +-
 hw/misc/Makefile.objs              | 4 +---
 hw/pci-bridge/Makefile.objs        | 5 +++--
 9 files changed, 19 insertions(+), 6 deletions(-)

Applied for my next pull request, thanks.

Paolo

Acked-by on the v2 series
#7 lore raw
In reply to David Gibson
Quoted 9 lines · David Gibson

This series adds explicit config options to control inclusion of a number of devices. These are generally things that could theoretically appear on anything (or at least a wide range of targets), but are in practice only likely to appear on a much smaller set of targets.

In some cases the set of default targets where these are included is also trimmed, but either way it allows users or distributors to more easily tweak which devices are and aren't included in the build.

For x86 and PCI changes:

who's merging this?

Quoted 22 lines

Changes from v1:
* Fix typos in 1/3 commit message
* Move config option to a better place in arm-softmmu.mak in 2/3

David Gibson (3):
Add specific config options for PCI-E bridges Create specific config option for "platform-bus" Give ivshmem its own config option

 default-configs/arm-softmmu.mak    | 5 +++++
 default-configs/i386-softmmu.mak   | 3 +++
 default-configs/pci.mak            | 1 +
 default-configs/ppc-softmmu.mak    | 1 +
 default-configs/ppc64-softmmu.mak  | 1 +
 default-configs/x86_64-softmmu.mak | 3 +++
 hw/core/Makefile.objs              | 2 +-
 hw/misc/Makefile.objs              | 4 +---
 hw/pci-bridge/Makefile.objs        | 5 +++--
 9 files changed, 19 insertions(+), 6 deletions(-)
Signature · 1 line
2.1.0
#8 lore raw
Quoted 7 lines · Michael S. Tsirkin
Quoted 6 lines · David Gibson

This series adds explicit config options to control inclusion of a number of devices. These are generally things that could theoretically appear on anything (or at least a wide range of targets), but are in practice only likely to appear on a much smaller set of targets.

Quoted 7 lines
Quoted 3 lines

In some cases the set of default targets where these are included is also trimmed, but either way it allows users or distributors to more easily tweak which devices are and aren't included in the build.

For x86 and PCI changes:

Paolo said he was.

Signature · 4 lines
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson