[Qemu-devel] [RFC PATCH v4 29/44] hw/pci/Makefile.objs: make pcie configurable

Yang Zhong posted 44 patches 5 years, 5 months ago
Maintainers: Bastian Koppelmann <kbastian@mail.uni-paderborn.de>, Palmer Dabbelt <palmer@sifive.com>, Marek Vasut <marex@denx.de>, Peter Crosthwaite <crosthwaite.peter@gmail.com>, "Michael S. Tsirkin" <mst@redhat.com>, Richard Henderson <rth@twiddle.net>, Jason Wang <jasowang@redhat.com>, Gerd Hoffmann <kraxel@redhat.com>, Guan Xuetao <gxt@mprc.pku.edu.cn>, Christian Borntraeger <borntraeger@de.ibm.com>, Corey Minyard <minyard@acm.org>, "Marc-André Lureau" <marcandre.lureau@redhat.com>, Michael Clark <mjc@sifive.com>, Paolo Bonzini <pbonzini@redhat.com>, Aurelien Jarno <aurelien@aurel32.net>, Greg Kurz <groug@kaod.org>, Cornelia Huck <cohuck@redhat.com>, Michael Walle <michael@walle.cc>, Igor Mammedov <imammedo@redhat.com>, Max Reitz <mreitz@redhat.com>, Sagar Karandikar <sagark@eecs.berkeley.edu>, Peter Maydell <peter.maydell@linaro.org>, Aleksandar Rikalo <arikalo@wavecomp.com>, Alistair Francis <Alistair.Francis@wdc.com>, Stafford Horne <shorne@gmail.com>, Cleber Rosa <crosa@redhat.com>, Chris Wulff <crwulff@gmail.com>, Alberto Garcia <berto@igalia.com>, Fam Zheng <fam@euphon.net>, Aleksandar Markovic <amarkovic@wavecomp.com>, Marcel Apfelbaum <marcel.apfelbaum@gmail.com>, Kevin Wolf <kwolf@redhat.com>, David Gibson <david@gibson.dropbear.id.au>, Anthony Green <green@moxielogic.com>, Halil Pasic <pasic@linux.ibm.com>, "Edgar E. Iglesias" <edgar.iglesias@gmail.com>, Stefan Markovic <smarkovic@wavecomp.com>, Stefan Berger <stefanb@linux.ibm.com>, Eduardo Habkost <ehabkost@redhat.com>, Alistair Francis <alistair@alistair23.me>, Artyom Tarasenko <atar4qemu@gmail.com>, John Snow <jsnow@redhat.com>, Max Filippov <jcmvbkbc@gmail.com>, Alex Williamson <alex.williamson@redhat.com>, Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
There is a newer version of this series
[Qemu-devel] [RFC PATCH v4 29/44] hw/pci/Makefile.objs: make pcie configurable
Posted by Yang Zhong 5 years, 5 months ago
Make pcie splited from pci and make it configurable.

Signed-off-by: Yang Zhong <yang.zhong@intel.com>
Cc: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
---
 default-configs/pci.mak | 1 +
 hw/pci/Kconfig          | 3 +++
 hw/pci/Makefile.objs    | 5 +++--
 3 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/default-configs/pci.mak b/default-configs/pci.mak
index f7b3690bbd..b17b456b1e 100644
--- a/default-configs/pci.mak
+++ b/default-configs/pci.mak
@@ -1,4 +1,5 @@
 CONFIG_PCI=y
+CONFIG_PCI_EXPRESS=y
 # For now, CONFIG_IDE_CORE requires ISA, so we enable it here
 CONFIG_ISA_BUS=y
 CONFIG_VIRTIO_PCI=y
diff --git a/hw/pci/Kconfig b/hw/pci/Kconfig
index d3d2205577..81533b9dc0 100644
--- a/hw/pci/Kconfig
+++ b/hw/pci/Kconfig
@@ -1,2 +1,5 @@
 config PCI
     bool
+
+config PCI_EXPRESS
+    bool
diff --git a/hw/pci/Makefile.objs b/hw/pci/Makefile.objs
index 9f905e6344..d30eb32cbb 100644
--- a/hw/pci/Makefile.objs
+++ b/hw/pci/Makefile.objs
@@ -2,8 +2,9 @@ common-obj-$(CONFIG_PCI) += pci.o pci_bridge.o
 common-obj-$(CONFIG_PCI) += msix.o msi.o
 common-obj-$(CONFIG_PCI) += shpc.o
 common-obj-$(CONFIG_PCI) += slotid_cap.o
-common-obj-$(CONFIG_PCI) += pci_host.o pcie_host.o
-common-obj-$(CONFIG_PCI) += pcie.o pcie_aer.o pcie_port.o
+common-obj-$(CONFIG_PCI) += pci_host.o
+common-obj-$(CONFIG_PCI_EXPRESS) += pcie.o pcie_aer.o
+common-obj-$(CONFIG_PCI_EXPRESS) += pcie_port.o pcie_host.o
 
 common-obj-$(call lnot,$(CONFIG_PCI)) += pci-stub.o
 common-obj-$(CONFIG_ALL) += pci-stub.o
-- 
2.17.1


Re: [Qemu-devel] [RFC PATCH v4 29/44] hw/pci/Makefile.objs: make pcie configurable
Posted by Michael S. Tsirkin 5 years, 5 months ago
On Wed, Jan 23, 2019 at 02:56:03PM +0800, Yang Zhong wrote:
> Make pcie splited from pci and make it configurable.
> 
> Signed-off-by: Yang Zhong <yang.zhong@intel.com>
> Cc: Michael S. Tsirkin <mst@redhat.com>
> Reviewed-by: Thomas Huth <thuth@redhat.com>
> ---
>  default-configs/pci.mak | 1 +
>  hw/pci/Kconfig          | 3 +++
>  hw/pci/Makefile.objs    | 5 +++--
>  3 files changed, 7 insertions(+), 2 deletions(-)
> 
> diff --git a/default-configs/pci.mak b/default-configs/pci.mak
> index f7b3690bbd..b17b456b1e 100644
> --- a/default-configs/pci.mak
> +++ b/default-configs/pci.mak
> @@ -1,4 +1,5 @@
>  CONFIG_PCI=y
> +CONFIG_PCI_EXPRESS=y
>  # For now, CONFIG_IDE_CORE requires ISA, so we enable it here
>  CONFIG_ISA_BUS=y
>  CONFIG_VIRTIO_PCI=y
> diff --git a/hw/pci/Kconfig b/hw/pci/Kconfig
> index d3d2205577..81533b9dc0 100644
> --- a/hw/pci/Kconfig
> +++ b/hw/pci/Kconfig
> @@ -1,2 +1,5 @@
>  config PCI
>      bool
> +
> +config PCI_EXPRESS
> +    bool

Hmm this allows PCIE without PCI.
Should PCI_EXPRESS select PCI?

It's selected itself so can't depend on PCI.


> diff --git a/hw/pci/Makefile.objs b/hw/pci/Makefile.objs
> index 9f905e6344..d30eb32cbb 100644
> --- a/hw/pci/Makefile.objs
> +++ b/hw/pci/Makefile.objs
> @@ -2,8 +2,9 @@ common-obj-$(CONFIG_PCI) += pci.o pci_bridge.o
>  common-obj-$(CONFIG_PCI) += msix.o msi.o
>  common-obj-$(CONFIG_PCI) += shpc.o
>  common-obj-$(CONFIG_PCI) += slotid_cap.o
> -common-obj-$(CONFIG_PCI) += pci_host.o pcie_host.o
> -common-obj-$(CONFIG_PCI) += pcie.o pcie_aer.o pcie_port.o
> +common-obj-$(CONFIG_PCI) += pci_host.o
> +common-obj-$(CONFIG_PCI_EXPRESS) += pcie.o pcie_aer.o
> +common-obj-$(CONFIG_PCI_EXPRESS) += pcie_port.o pcie_host.o
>  
>  common-obj-$(call lnot,$(CONFIG_PCI)) += pci-stub.o
>  common-obj-$(CONFIG_ALL) += pci-stub.o
> -- 
> 2.17.1

Re: [Qemu-devel] [RFC PATCH v4 29/44] hw/pci/Makefile.objs: make pcie configurable
Posted by Yang Zhong 5 years, 4 months ago
On Wed, Jan 23, 2019 at 09:23:49AM -0500, Michael S. Tsirkin wrote:
> On Wed, Jan 23, 2019 at 02:56:03PM +0800, Yang Zhong wrote:
> > Make pcie splited from pci and make it configurable.
> > 
> > Signed-off-by: Yang Zhong <yang.zhong@intel.com>
> > Cc: Michael S. Tsirkin <mst@redhat.com>
> > Reviewed-by: Thomas Huth <thuth@redhat.com>
> > ---
> >  default-configs/pci.mak | 1 +
> >  hw/pci/Kconfig          | 3 +++
> >  hw/pci/Makefile.objs    | 5 +++--
> >  3 files changed, 7 insertions(+), 2 deletions(-)
> > 
> > diff --git a/default-configs/pci.mak b/default-configs/pci.mak
> > index f7b3690bbd..b17b456b1e 100644
> > --- a/default-configs/pci.mak
> > +++ b/default-configs/pci.mak
> > @@ -1,4 +1,5 @@
> >  CONFIG_PCI=y
> > +CONFIG_PCI_EXPRESS=y
> >  # For now, CONFIG_IDE_CORE requires ISA, so we enable it here
> >  CONFIG_ISA_BUS=y
> >  CONFIG_VIRTIO_PCI=y
> > diff --git a/hw/pci/Kconfig b/hw/pci/Kconfig
> > index d3d2205577..81533b9dc0 100644
> > --- a/hw/pci/Kconfig
> > +++ b/hw/pci/Kconfig
> > @@ -1,2 +1,5 @@
> >  config PCI
> >      bool
> > +
> > +config PCI_EXPRESS
> > +    bool
> 
> Hmm this allows PCIE without PCI.
> Should PCI_EXPRESS select PCI?
> 
> It's selected itself so can't depend on PCI.
>
  Hello Michael,

  I did this in patch 30 as below:
  
  diff --git a/hw/pci/Kconfig b/hw/pci/Kconfig
  index 81533b9dc0..4ca2537980 100644
  --- a/hw/pci/Kconfig
  +++ b/hw/pci/Kconfig
  @@ -3,3 +3,4 @@ config PCI

  config PCI_EXPRESS
     bool
+    select PCI

   Regards,

   Yang

> 
> > diff --git a/hw/pci/Makefile.objs b/hw/pci/Makefile.objs
> > index 9f905e6344..d30eb32cbb 100644
> > --- a/hw/pci/Makefile.objs
> > +++ b/hw/pci/Makefile.objs
> > @@ -2,8 +2,9 @@ common-obj-$(CONFIG_PCI) += pci.o pci_bridge.o
> >  common-obj-$(CONFIG_PCI) += msix.o msi.o
> >  common-obj-$(CONFIG_PCI) += shpc.o
> >  common-obj-$(CONFIG_PCI) += slotid_cap.o
> > -common-obj-$(CONFIG_PCI) += pci_host.o pcie_host.o
> > -common-obj-$(CONFIG_PCI) += pcie.o pcie_aer.o pcie_port.o
> > +common-obj-$(CONFIG_PCI) += pci_host.o
> > +common-obj-$(CONFIG_PCI_EXPRESS) += pcie.o pcie_aer.o
> > +common-obj-$(CONFIG_PCI_EXPRESS) += pcie_port.o pcie_host.o
> >  
> >  common-obj-$(call lnot,$(CONFIG_PCI)) += pci-stub.o
> >  common-obj-$(CONFIG_ALL) += pci-stub.o
> > -- 
> > 2.17.1

Re: [Qemu-devel] [RFC PATCH v4 29/44] hw/pci/Makefile.objs: make pcie configurable
Posted by Michael S. Tsirkin 5 years, 4 months ago
On Fri, Jan 25, 2019 at 10:10:53AM +0800, Yang Zhong wrote:
> On Wed, Jan 23, 2019 at 09:23:49AM -0500, Michael S. Tsirkin wrote:
> > On Wed, Jan 23, 2019 at 02:56:03PM +0800, Yang Zhong wrote:
> > > Make pcie splited from pci and make it configurable.
> > > 
> > > Signed-off-by: Yang Zhong <yang.zhong@intel.com>
> > > Cc: Michael S. Tsirkin <mst@redhat.com>
> > > Reviewed-by: Thomas Huth <thuth@redhat.com>
> > > ---
> > >  default-configs/pci.mak | 1 +
> > >  hw/pci/Kconfig          | 3 +++
> > >  hw/pci/Makefile.objs    | 5 +++--
> > >  3 files changed, 7 insertions(+), 2 deletions(-)
> > > 
> > > diff --git a/default-configs/pci.mak b/default-configs/pci.mak
> > > index f7b3690bbd..b17b456b1e 100644
> > > --- a/default-configs/pci.mak
> > > +++ b/default-configs/pci.mak
> > > @@ -1,4 +1,5 @@
> > >  CONFIG_PCI=y
> > > +CONFIG_PCI_EXPRESS=y
> > >  # For now, CONFIG_IDE_CORE requires ISA, so we enable it here
> > >  CONFIG_ISA_BUS=y
> > >  CONFIG_VIRTIO_PCI=y
> > > diff --git a/hw/pci/Kconfig b/hw/pci/Kconfig
> > > index d3d2205577..81533b9dc0 100644
> > > --- a/hw/pci/Kconfig
> > > +++ b/hw/pci/Kconfig
> > > @@ -1,2 +1,5 @@
> > >  config PCI
> > >      bool
> > > +
> > > +config PCI_EXPRESS
> > > +    bool
> > 
> > Hmm this allows PCIE without PCI.
> > Should PCI_EXPRESS select PCI?
> > 
> > It's selected itself so can't depend on PCI.
> >
>   Hello Michael,
> 
>   I did this in patch 30 as below:
>   
>   diff --git a/hw/pci/Kconfig b/hw/pci/Kconfig
>   index 81533b9dc0..4ca2537980 100644
>   --- a/hw/pci/Kconfig
>   +++ b/hw/pci/Kconfig
>   @@ -3,3 +3,4 @@ config PCI
> 
>   config PCI_EXPRESS
>      bool
> +    select PCI
> 
>    Regards,
> 
>    Yang

Maybe squash this into patch 29 then.

> > 
> > > diff --git a/hw/pci/Makefile.objs b/hw/pci/Makefile.objs
> > > index 9f905e6344..d30eb32cbb 100644
> > > --- a/hw/pci/Makefile.objs
> > > +++ b/hw/pci/Makefile.objs
> > > @@ -2,8 +2,9 @@ common-obj-$(CONFIG_PCI) += pci.o pci_bridge.o
> > >  common-obj-$(CONFIG_PCI) += msix.o msi.o
> > >  common-obj-$(CONFIG_PCI) += shpc.o
> > >  common-obj-$(CONFIG_PCI) += slotid_cap.o
> > > -common-obj-$(CONFIG_PCI) += pci_host.o pcie_host.o
> > > -common-obj-$(CONFIG_PCI) += pcie.o pcie_aer.o pcie_port.o
> > > +common-obj-$(CONFIG_PCI) += pci_host.o
> > > +common-obj-$(CONFIG_PCI_EXPRESS) += pcie.o pcie_aer.o
> > > +common-obj-$(CONFIG_PCI_EXPRESS) += pcie_port.o pcie_host.o
> > >  
> > >  common-obj-$(call lnot,$(CONFIG_PCI)) += pci-stub.o
> > >  common-obj-$(CONFIG_ALL) += pci-stub.o
> > > -- 
> > > 2.17.1

Re: [Qemu-devel] [RFC PATCH v4 29/44] hw/pci/Makefile.objs: make pcie configurable
Posted by Yang Zhong 5 years, 4 months ago
On Thu, Jan 24, 2019 at 09:43:44PM -0500, Michael S. Tsirkin wrote:
> On Fri, Jan 25, 2019 at 10:10:53AM +0800, Yang Zhong wrote:
> > On Wed, Jan 23, 2019 at 09:23:49AM -0500, Michael S. Tsirkin wrote:
> > > On Wed, Jan 23, 2019 at 02:56:03PM +0800, Yang Zhong wrote:
> > > > Make pcie splited from pci and make it configurable.
> > > > 
> > > > Signed-off-by: Yang Zhong <yang.zhong@intel.com>
> > > > Cc: Michael S. Tsirkin <mst@redhat.com>
> > > > Reviewed-by: Thomas Huth <thuth@redhat.com>
> > > > ---
> > > >  default-configs/pci.mak | 1 +
> > > >  hw/pci/Kconfig          | 3 +++
> > > >  hw/pci/Makefile.objs    | 5 +++--
> > > >  3 files changed, 7 insertions(+), 2 deletions(-)
> > > > 
> > > > diff --git a/default-configs/pci.mak b/default-configs/pci.mak
> > > > index f7b3690bbd..b17b456b1e 100644
> > > > --- a/default-configs/pci.mak
> > > > +++ b/default-configs/pci.mak
> > > > @@ -1,4 +1,5 @@
> > > >  CONFIG_PCI=y
> > > > +CONFIG_PCI_EXPRESS=y
> > > >  # For now, CONFIG_IDE_CORE requires ISA, so we enable it here
> > > >  CONFIG_ISA_BUS=y
> > > >  CONFIG_VIRTIO_PCI=y
> > > > diff --git a/hw/pci/Kconfig b/hw/pci/Kconfig
> > > > index d3d2205577..81533b9dc0 100644
> > > > --- a/hw/pci/Kconfig
> > > > +++ b/hw/pci/Kconfig
> > > > @@ -1,2 +1,5 @@
> > > >  config PCI
> > > >      bool
> > > > +
> > > > +config PCI_EXPRESS
> > > > +    bool
> > > 
> > > Hmm this allows PCIE without PCI.
> > > Should PCI_EXPRESS select PCI?
> > > 
> > > It's selected itself so can't depend on PCI.
> > >
> >   Hello Michael,
> > 
> >   I did this in patch 30 as below:
> >   
> >   diff --git a/hw/pci/Kconfig b/hw/pci/Kconfig
> >   index 81533b9dc0..4ca2537980 100644
> >   --- a/hw/pci/Kconfig
> >   +++ b/hw/pci/Kconfig
> >   @@ -3,3 +3,4 @@ config PCI
> > 
> >   config PCI_EXPRESS
> >      bool
> > +    select PCI
> > 
> >    Regards,
> > 
> >    Yang
> 
> Maybe squash this into patch 29 then.
> 
> > >
  Okay, i will do it in next version, thanks Michael, Yang.
 
> > > > diff --git a/hw/pci/Makefile.objs b/hw/pci/Makefile.objs
> > > > index 9f905e6344..d30eb32cbb 100644
> > > > --- a/hw/pci/Makefile.objs
> > > > +++ b/hw/pci/Makefile.objs
> > > > @@ -2,8 +2,9 @@ common-obj-$(CONFIG_PCI) += pci.o pci_bridge.o
> > > >  common-obj-$(CONFIG_PCI) += msix.o msi.o
> > > >  common-obj-$(CONFIG_PCI) += shpc.o
> > > >  common-obj-$(CONFIG_PCI) += slotid_cap.o
> > > > -common-obj-$(CONFIG_PCI) += pci_host.o pcie_host.o
> > > > -common-obj-$(CONFIG_PCI) += pcie.o pcie_aer.o pcie_port.o
> > > > +common-obj-$(CONFIG_PCI) += pci_host.o
> > > > +common-obj-$(CONFIG_PCI_EXPRESS) += pcie.o pcie_aer.o
> > > > +common-obj-$(CONFIG_PCI_EXPRESS) += pcie_port.o pcie_host.o
> > > >  
> > > >  common-obj-$(call lnot,$(CONFIG_PCI)) += pci-stub.o
> > > >  common-obj-$(CONFIG_ALL) += pci-stub.o
> > > > -- 
> > > > 2.17.1