All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCHv2 0/3] Add config options for some not-always-sensible devices
@ 2015-02-27  6:04 David Gibson
  2015-02-27  6:04 ` [Qemu-devel] [PATCHv2 1/3] Add specific config options for PCI-E bridges David Gibson
                   ` (4 more replies)
  0 siblings, 5 replies; 9+ messages in thread
From: David Gibson @ 2015-02-27  6:04 UTC (permalink / raw)
  To: agraf, mst, pbonzini, peter.crosthwaite
  Cc: qemu-ppc, qemu-devel, 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

 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(-)

-- 
2.1.0

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

* [Qemu-devel] [PATCHv2 1/3] Add specific config options for PCI-E bridges
  2015-02-27  6:04 [Qemu-devel] [PATCHv2 0/3] Add config options for some not-always-sensible devices David Gibson
@ 2015-02-27  6:04 ` David Gibson
  2015-05-19  2:40   ` Shannon Zhao
  2015-02-27  6:04 ` [Qemu-devel] [PATCHv2 2/3] Create specific config option for "platform-bus" David Gibson
                   ` (3 subsequent siblings)
  4 siblings, 1 reply; 9+ messages in thread
From: David Gibson @ 2015-02-27  6:04 UTC (permalink / raw)
  To: agraf, mst, pbonzini, peter.crosthwaite
  Cc: qemu-ppc, qemu-devel, 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).

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Reviewed-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
---
 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(-)

diff --git a/default-configs/arm-softmmu.mak b/default-configs/arm-softmmu.mak
index b00c2e1..6ee9b43 100644
--- a/default-configs/arm-softmmu.mak
+++ b/default-configs/arm-softmmu.mak
@@ -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
diff --git a/default-configs/i386-softmmu.mak b/default-configs/i386-softmmu.mak
index bd99af9..0b8ce4b 100644
--- a/default-configs/i386-softmmu.mak
+++ b/default-configs/i386-softmmu.mak
@@ -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
diff --git a/default-configs/x86_64-softmmu.mak b/default-configs/x86_64-softmmu.mak
index e7c2734..6add04a 100644
--- a/default-configs/x86_64-softmmu.mak
+++ b/default-configs/x86_64-softmmu.mak
@@ -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
diff --git a/hw/pci-bridge/Makefile.objs b/hw/pci-bridge/Makefile.objs
index 968b369..96c596e 100644
--- a/hw/pci-bridge/Makefile.objs
+++ b/hw/pci-bridge/Makefile.objs
@@ -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
-- 
2.1.0

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

* [Qemu-devel] [PATCHv2 2/3] Create specific config option for "platform-bus"
  2015-02-27  6:04 [Qemu-devel] [PATCHv2 0/3] Add config options for some not-always-sensible devices David Gibson
  2015-02-27  6:04 ` [Qemu-devel] [PATCHv2 1/3] Add specific config options for PCI-E bridges David Gibson
@ 2015-02-27  6:04 ` David Gibson
  2015-02-27  6:04 ` [Qemu-devel] [PATCHv2 3/3] Give ivshmem its own config option David Gibson
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 9+ messages in thread
From: David Gibson @ 2015-02-27  6:04 UTC (permalink / raw)
  To: agraf, mst, pbonzini, peter.crosthwaite
  Cc: qemu-ppc, qemu-devel, 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).

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
---
 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(-)

diff --git a/default-configs/arm-softmmu.mak b/default-configs/arm-softmmu.mak
index 6ee9b43..149ae1b 100644
--- a/default-configs/arm-softmmu.mak
+++ b/default-configs/arm-softmmu.mak
@@ -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
diff --git a/default-configs/ppc-softmmu.mak b/default-configs/ppc-softmmu.mak
index aebfab9..4b60e69 100644
--- a/default-configs/ppc-softmmu.mak
+++ b/default-configs/ppc-softmmu.mak
@@ -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
diff --git a/default-configs/ppc64-softmmu.mak b/default-configs/ppc64-softmmu.mak
index f195a87..de71e41 100644
--- a/default-configs/ppc64-softmmu.mak
+++ b/default-configs/ppc64-softmmu.mak
@@ -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
diff --git a/hw/core/Makefile.objs b/hw/core/Makefile.objs
index 9dce1bc..abb3560 100644
--- a/hw/core/Makefile.objs
+++ b/hw/core/Makefile.objs
@@ -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
-- 
2.1.0

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

* [Qemu-devel] [PATCHv2 3/3] Give ivshmem its own config option
  2015-02-27  6:04 [Qemu-devel] [PATCHv2 0/3] Add config options for some not-always-sensible devices David Gibson
  2015-02-27  6:04 ` [Qemu-devel] [PATCHv2 1/3] Add specific config options for PCI-E bridges David Gibson
  2015-02-27  6:04 ` [Qemu-devel] [PATCHv2 2/3] Create specific config option for "platform-bus" David Gibson
@ 2015-02-27  6:04 ` David Gibson
  2015-02-27 14:18 ` [Qemu-devel] [PATCHv2 0/3] Add config options for some not-always-sensible devices Paolo Bonzini
  2015-03-01 16:37 ` Michael S. Tsirkin
  4 siblings, 0 replies; 9+ messages in thread
From: David Gibson @ 2015-02-27  6:04 UTC (permalink / raw)
  To: agraf, mst, pbonzini, peter.crosthwaite
  Cc: qemu-ppc, qemu-devel, 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.

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Reviewed-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
---
 default-configs/pci.mak | 1 +
 hw/misc/Makefile.objs   | 4 +---
 2 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/default-configs/pci.mak b/default-configs/pci.mak
index bea6b01..58a2c0a 100644
--- a/default-configs/pci.mak
+++ b/default-configs/pci.mak
@@ -35,3 +35,4 @@ CONFIG_SDHCI=y
 CONFIG_EDU=y
 CONFIG_VGA=y
 CONFIG_VGA_PCI=y
+CONFIG_IVSHMEM=$(CONFIG_KVM)
diff --git a/hw/misc/Makefile.objs b/hw/misc/Makefile.objs
index 029a56f..6c6e296 100644
--- a/hw/misc/Makefile.objs
+++ b/hw/misc/Makefile.objs
@@ -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
-- 
2.1.0

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

* Re: [Qemu-devel] [PATCHv2 0/3] Add config options for some not-always-sensible devices
  2015-02-27  6:04 [Qemu-devel] [PATCHv2 0/3] Add config options for some not-always-sensible devices David Gibson
                   ` (2 preceding siblings ...)
  2015-02-27  6:04 ` [Qemu-devel] [PATCHv2 3/3] Give ivshmem its own config option David Gibson
@ 2015-02-27 14:18 ` Paolo Bonzini
  2015-03-01 16:37 ` Michael S. Tsirkin
  4 siblings, 0 replies; 9+ messages in thread
From: Paolo Bonzini @ 2015-02-27 14:18 UTC (permalink / raw)
  To: David Gibson, agraf, mst, peter.crosthwaite; +Cc: qemu-ppc, qemu-devel

On 27/02/2015 07:04, David Gibson wrote:
> 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(-)
> 

Applied for my next pull request, thanks.

Paolo

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

* Re: [Qemu-devel] [PATCHv2 0/3] Add config options for some not-always-sensible devices
  2015-02-27  6:04 [Qemu-devel] [PATCHv2 0/3] Add config options for some not-always-sensible devices David Gibson
                   ` (3 preceding siblings ...)
  2015-02-27 14:18 ` [Qemu-devel] [PATCHv2 0/3] Add config options for some not-always-sensible devices Paolo Bonzini
@ 2015-03-01 16:37 ` Michael S. Tsirkin
  2015-03-02  4:55   ` David Gibson
  4 siblings, 1 reply; 9+ messages in thread
From: Michael S. Tsirkin @ 2015-03-01 16:37 UTC (permalink / raw)
  To: David Gibson; +Cc: pbonzini, peter.crosthwaite, qemu-ppc, agraf, qemu-devel

On Fri, Feb 27, 2015 at 05:04:34PM +1100, David Gibson wrote:
> 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:

Acked-by: Michael S. Tsirkin <mst@redhat.com>

who's merging this?

> 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(-)
> 
> -- 
> 2.1.0

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

* Re: [Qemu-devel] [PATCHv2 0/3] Add config options for some not-always-sensible devices
  2015-03-01 16:37 ` Michael S. Tsirkin
@ 2015-03-02  4:55   ` David Gibson
  0 siblings, 0 replies; 9+ messages in thread
From: David Gibson @ 2015-03-02  4:55 UTC (permalink / raw)
  To: Michael S. Tsirkin
  Cc: pbonzini, peter.crosthwaite, qemu-ppc, agraf, qemu-devel

[-- Attachment #1: Type: text/plain, Size: 959 bytes --]

On Sun, Mar 01, 2015 at 05:37:35PM +0100, Michael S. Tsirkin wrote:
> On Fri, Feb 27, 2015 at 05:04:34PM +1100, David Gibson wrote:
> > 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:
> 
> Acked-by: Michael S. Tsirkin <mst@redhat.com>

Paolo said he was.

-- 
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

[-- Attachment #2: Type: application/pgp-signature, Size: 819 bytes --]

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

* Re: [Qemu-devel] [PATCHv2 1/3] Add specific config options for PCI-E bridges
  2015-02-27  6:04 ` [Qemu-devel] [PATCHv2 1/3] Add specific config options for PCI-E bridges David Gibson
@ 2015-05-19  2:40   ` Shannon Zhao
  2015-05-19  3:34     ` Shannon Zhao
  0 siblings, 1 reply; 9+ messages in thread
From: Shannon Zhao @ 2015-05-19  2:40 UTC (permalink / raw)
  To: David Gibson, agraf, mst, pbonzini, peter.crosthwaite
  Cc: peter.maydell, qemu-ppc, qemu-devel, Christoffer Dall

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

On 2015/2/27 14:04, David Gibson wrote:
> 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).
> 
> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
> Reviewed-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
> ---
>  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(-)
> 
> diff --git a/default-configs/arm-softmmu.mak b/default-configs/arm-softmmu.mak
> index b00c2e1..6ee9b43 100644
> --- a/default-configs/arm-softmmu.mak
> +++ b/default-configs/arm-softmmu.mak
> @@ -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
> diff --git a/default-configs/i386-softmmu.mak b/default-configs/i386-softmmu.mak
> index bd99af9..0b8ce4b 100644
> --- a/default-configs/i386-softmmu.mak
> +++ b/default-configs/i386-softmmu.mak
> @@ -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
> diff --git a/default-configs/x86_64-softmmu.mak b/default-configs/x86_64-softmmu.mak
> index e7c2734..6add04a 100644
> --- a/default-configs/x86_64-softmmu.mak
> +++ b/default-configs/x86_64-softmmu.mak
> @@ -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
> diff --git a/hw/pci-bridge/Makefile.objs b/hw/pci-bridge/Makefile.objs
> index 968b369..96c596e 100644
> --- a/hw/pci-bridge/Makefile.objs
> +++ b/hw/pci-bridge/Makefile.objs
> @@ -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
> 

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

* Re: [Qemu-devel] [PATCHv2 1/3] Add specific config options for PCI-E bridges
  2015-05-19  2:40   ` Shannon Zhao
@ 2015-05-19  3:34     ` Shannon Zhao
  0 siblings, 0 replies; 9+ messages in thread
From: Shannon Zhao @ 2015-05-19  3:34 UTC (permalink / raw)
  To: David Gibson, agraf, mst, pbonzini, peter.crosthwaite
  Cc: peter.maydell, qemu-ppc, qemu-devel, Christoffer Dall

Hi,

On 2015/5/19 10:40, Shannon Zhao wrote:
> 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
> 

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?

> 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
> 
> On 2015/2/27 14:04, David Gibson wrote:
>> 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).
>>
>> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
>> Reviewed-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
>> ---
>>  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(-)
>>
>> diff --git a/default-configs/arm-softmmu.mak b/default-configs/arm-softmmu.mak
>> index b00c2e1..6ee9b43 100644
>> --- a/default-configs/arm-softmmu.mak
>> +++ b/default-configs/arm-softmmu.mak
>> @@ -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
>> diff --git a/default-configs/i386-softmmu.mak b/default-configs/i386-softmmu.mak
>> index bd99af9..0b8ce4b 100644
>> --- a/default-configs/i386-softmmu.mak
>> +++ b/default-configs/i386-softmmu.mak
>> @@ -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
>> diff --git a/default-configs/x86_64-softmmu.mak b/default-configs/x86_64-softmmu.mak
>> index e7c2734..6add04a 100644
>> --- a/default-configs/x86_64-softmmu.mak
>> +++ b/default-configs/x86_64-softmmu.mak
>> @@ -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
>> diff --git a/hw/pci-bridge/Makefile.objs b/hw/pci-bridge/Makefile.objs
>> index 968b369..96c596e 100644
>> --- a/hw/pci-bridge/Makefile.objs
>> +++ b/hw/pci-bridge/Makefile.objs
>> @@ -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
>>
> 
> 
> 
> .
> 

-- 
Shannon

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

end of thread, other threads:[~2015-05-19  3:34 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-02-27  6:04 [Qemu-devel] [PATCHv2 0/3] Add config options for some not-always-sensible devices David Gibson
2015-02-27  6:04 ` [Qemu-devel] [PATCHv2 1/3] Add specific config options for PCI-E bridges David Gibson
2015-05-19  2:40   ` Shannon Zhao
2015-05-19  3:34     ` Shannon Zhao
2015-02-27  6:04 ` [Qemu-devel] [PATCHv2 2/3] Create specific config option for "platform-bus" David Gibson
2015-02-27  6:04 ` [Qemu-devel] [PATCHv2 3/3] Give ivshmem its own config option David Gibson
2015-02-27 14:18 ` [Qemu-devel] [PATCHv2 0/3] Add config options for some not-always-sensible devices Paolo Bonzini
2015-03-01 16:37 ` Michael S. Tsirkin
2015-03-02  4:55   ` David Gibson

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.