hw/Kconfig: PCI & USB fixes
cover hw/Kconfig: PCI & USB fixes
I actually wanted to clean the USB devices (i.e. to not have USB3 devices appear on OHCI buses) but this is too late for the next release, so let's post the patches accumulated.
Philippe Mathieu-Daudé (3):
hw/Kconfig: PCI bus implies PCI_DEVICES
hw/usb/Kconfig: Add CONFIG_USB_EHCI_PCI
hw/usb/Kconfig: USB_XHCI_NEC requires USB_XHCI
docs/devel/kconfig.rst | 1 - hw/alpha/Kconfig | 1 - hw/arm/Kconfig | 4 ---- hw/hppa/Kconfig | 1 - hw/i386/Kconfig | 1 - hw/pci/Kconfig | 1 + hw/ppc/Kconfig | 6 ------ hw/riscv/Kconfig | 1 - hw/sh4/Kconfig | 1 - hw/sparc64/Kconfig | 1 - hw/usb/Kconfig | 11 +++++++---- hw/usb/Makefile.objs | 5 +++-- 12 files changed, 11 insertions(+), 23 deletions(-)
Signature · 1 line
2.20.1
RFC PATCH 1/3 hw/Kconfig: PCI bus implies PCI_DEVICES
If a controller device provides a PCI bus, we can plug any PCI daughter card on it.
--- docs/devel/kconfig.rst | 1 - hw/alpha/Kconfig | 1 - hw/arm/Kconfig | 4 ---- hw/hppa/Kconfig | 1 - hw/i386/Kconfig | 1 - hw/pci/Kconfig | 1 + hw/ppc/Kconfig | 6 ------ hw/riscv/Kconfig | 1 - hw/sh4/Kconfig | 1 - hw/sparc64/Kconfig | 1 - 10 files changed, 1 insertion(+), 17 deletions(-)
docs/devel/kconfig.rst +0 -1
@@ -56,7 +56,6 @@ stanza like the following:: config ARM_VIRT bool - imply PCI_DEVICES imply VFIO_AMD_XGBE imply VFIO_XGMAC select A15MPCORE
hw/alpha/Kconfig +0 -1
@@ -1,6 +1,5 @@ config DP264 bool - imply PCI_DEVICES imply TEST_DEVICES imply E1000_PCI select I82374
hw/arm/Kconfig +0 -4
@@ -1,6 +1,5 @@ config ARM_VIRT bool - imply PCI_DEVICES imply TEST_DEVICES imply VFIO_AMD_XGBE imply VFIO_PLATFORM
@@ -159,7 +158,6 @@ config Z2 config REALVIEW bool - imply PCI_DEVICES imply PCI_TESTDEV select SMC91C111 select LAN9118
@@ -186,7 +184,6 @@ config REALVIEW config SBSA_REF bool - imply PCI_DEVICES select AHCI select ARM_SMMUV3 select GPIO_KEY
@@ -365,7 +362,6 @@ config MPS2 config FSL_IMX7 bool - imply PCI_DEVICES imply TEST_DEVICES select A15MPCORE select PCI
hw/hppa/Kconfig +0 -1
@@ -1,6 +1,5 @@ config DINO bool - imply PCI_DEVICES imply E1000_PCI imply VIRTIO_VGA select PCI
hw/i386/Kconfig +0 -1
@@ -10,7 +10,6 @@ config PC imply ISA_IPMI_BT imply ISA_DEBUG imply PARALLEL - imply PCI_DEVICES imply PVPANIC imply QXL imply SEV
hw/pci/Kconfig +1 -0
@@ -1,5 +1,6 @@ config PCI bool + imply PCI_DEVICES config PCI_EXPRESS bool
hw/ppc/Kconfig +0 -6
@@ -1,6 +1,5 @@ config PSERIES bool - imply PCI_DEVICES imply TEST_DEVICES imply VIRTIO_VGA select DIMM
@@ -18,7 +17,6 @@ config SPAPR_RNG config POWERNV bool - imply PCI_DEVICES imply TEST_DEVICES select ISA_IPMI_BT select IPMI_LOCAL
@@ -36,7 +34,6 @@ config PPC405 config PPC440 bool - imply PCI_DEVICES imply TEST_DEVICES imply E1000_PCI select PCI_EXPRESS
@@ -62,7 +59,6 @@ config SAM460EX config PREP bool - imply PCI_DEVICES imply TEST_DEVICES select CS4231A select PREP_PCI
@@ -77,7 +73,6 @@ config RS6000_MC config MAC_OLDWORLD bool - imply PCI_DEVICES imply SUNGEM imply TEST_DEVICES select ADB
@@ -87,7 +82,6 @@ config MAC_OLDWORLD config MAC_NEWWORLD bool - imply PCI_DEVICES imply SUNGEM imply TEST_DEVICES select ADB
hw/riscv/Kconfig +0 -1
@@ -27,7 +27,6 @@ config SPIKE config RISCV_VIRT bool - imply PCI_DEVICES imply TEST_DEVICES select PCI select HART
hw/sh4/Kconfig +0 -1
@@ -1,6 +1,5 @@ config R2D bool - imply PCI_DEVICES imply TEST_DEVICES imply RTL8139_PCI select I82378 if TEST_DEVICES
hw/sparc64/Kconfig +0 -1
@@ -1,6 +1,5 @@ config SUN4U bool - imply PCI_DEVICES imply SUNHME imply TEST_DEVICES imply PARALLEL
Signature · 1 line
2.20.1
Re: [Qemu-arm] [RFC PATCH 1/3] hw/Kconfig: PCI bus implies PCI_DEVICES
Quoted 103 lines · Philippe Mathieu-Daudé
If a controller device provides a PCI bus, we can plug any PCI daughter card on it.
Signed-off-by Philippe Mathieu-Daudé <[email protected]>--- docs/devel/kconfig.rst | 1 - hw/alpha/Kconfig | 1 - hw/arm/Kconfig | 4 ---- hw/hppa/Kconfig | 1 - hw/i386/Kconfig | 1 - hw/pci/Kconfig | 1 + hw/ppc/Kconfig | 6 ------ hw/riscv/Kconfig | 1 - hw/sh4/Kconfig | 1 - hw/sparc64/Kconfig | 1 - 10 files changed, 1 insertion(+), 17 deletions(-)docs/devel/kconfig.rst +0
-1@@ -56,7 +56,6 @@ stanza like the following:: config ARM_VIRT bool - imply PCI_DEVICES imply VFIO_AMD_XGBE imply VFIO_XGMAC select A15MPCOREhw/alpha/Kconfig +0
-1@@ -1,6 +1,5 @@ config DP264 bool - imply PCI_DEVICES imply TEST_DEVICES imply E1000_PCI select I82374hw/arm/Kconfig +0
-4@@ -1,6 +1,5 @@ config ARM_VIRT bool - imply PCI_DEVICES imply TEST_DEVICES imply VFIO_AMD_XGBE imply VFIO_PLATFORM@@ -159,7 +158,6 @@ config Z2 config REALVIEW bool - imply PCI_DEVICES imply PCI_TESTDEV select SMC91C111 select LAN9118@@ -186,7 +184,6 @@ config REALVIEW config SBSA_REF bool - imply PCI_DEVICES select AHCI select ARM_SMMUV3 select GPIO_KEY@@ -365,7 +362,6 @@ config MPS2 config FSL_IMX7 bool - imply PCI_DEVICES imply TEST_DEVICES select A15MPCORE select PCIhw/hppa/Kconfig +0
-1@@ -1,6 +1,5 @@ config DINO bool - imply PCI_DEVICES imply E1000_PCI imply VIRTIO_VGA select PCIhw/i386/Kconfig +0
-1@@ -10,7 +10,6 @@ config PC imply ISA_IPMI_BT imply ISA_DEBUG imply PARALLEL - imply PCI_DEVICES imply PVPANIC imply QXL imply SEVhw/pci/Kconfig +0
-0
hw/pci/Kconfig line 3
Quoted 3 lines
hw/pci/Kconfig +1
-0@@ -1,5 +1,6 @@ config PCI bool + imply PCI_DEVICES
No, please don't change this. This was done on purpose, since almost all PCI_DEVICES do not work on s390x (so s390x does *not* imply PCI_DEVICES).
Thomas
Re: [Qemu-arm] [RFC PATCH 1/3] hw/Kconfig: PCI bus implies PCI_DEVICES
Quoted 8 lines · Thomas Huth
Quoted 5 lines · Philippe Mathieu-Daudé
If a controller device provides a PCI bus, we can plug any PCI daughter card on it.
Signed-off-by Philippe Mathieu-Daudé <[email protected]>---
Quoted 11 lines
hw/pci/Kconfig line 3
Quoted 8 lines
hw/pci/Kconfig +1
-0@@ -1,5 +1,6 @@ config PCI bool + imply PCI_DEVICESNo, please don't change this. This was done on purpose, since almost all
PCI_DEVICESdo not work on s390x (so s390x does *not* implyPCI_DEVICES).
But that means that every board that provides PCI has to have an "imply PCI_DEVICES" line, which is pretty clunky just to work around an s390x limitation.
Is there some way in the Kconfig syntax for s390x to say "no PCI_DEVICES" so we can have the corner-case be handled by the s390x Kconfig in one place rather than in 20 places affecting everywhere except s390x?
thanks
-- PMM
Re: [Qemu-arm] [RFC PATCH 1/3] hw/Kconfig: PCI bus implies PCI_DEVICES
Quoted 21 lines · Peter Maydell
Quoted 8 lines · Thomas Huth
Quoted 5 lines · Philippe Mathieu-Daudé
If a controller device provides a PCI bus, we can plug any PCI daughter card on it.
Signed-off-by Philippe Mathieu-Daudé <[email protected]>---
Quoted 11 lines
hw/pci/Kconfig line 3
Quoted 8 lines
hw/pci/Kconfig +1
-0@@ -1,5 +1,6 @@ config PCI bool + imply PCI_DEVICESNo, please don't change this. This was done on purpose, since almost all
PCI_DEVICESdo not work on s390x (so s390x does *not* implyPCI_DEVICES).
Quoted 8 lines
But that means that every board that provides PCI has to have an "imply
PCI_DEVICES" line, which is pretty clunky just to work around an s390x limitation.Is there some way in the
Kconfigsyntax for s390x to say "noPCI_DEVICES" so we can have the corner-case be handled by the s390xKconfigin one place rather than in 20 places affecting everywhere except s390x?
IIRC the problem on s390x are the legacy IRQs. s390x has only MSIs. So I guess the correct way to fix this would be to introduce some PCI_LEGACY_IRQ switch and let all old devices that do not work with MSI depend on it.
Thomas
Re: [Qemu-arm] [qemu-s390x] [RFC PATCH 1/3] hw/Kconfig: PCI bus implies PCI_DEVICES
Quoted 31 lines · On Mon, 15 Jul 2019 12:48:55 +0200 Thomas Huth <[email protected]> wrote:
Quoted 21 lines · Peter Maydell
Quoted 8 lines · Thomas Huth
Quoted 5 lines · Philippe Mathieu-Daudé
If a controller device provides a PCI bus, we can plug any PCI daughter card on it.
Signed-off-by Philippe Mathieu-Daudé <[email protected]>---
Quoted 11 lines
hw/pci/Kconfig line 3
Quoted 8 lines
hw/pci/Kconfig +1
-0@@ -1,5 +1,6 @@ config PCI bool + imply PCI_DEVICESNo, please don't change this. This was done on purpose, since almost all
PCI_DEVICESdo not work on s390x (so s390x does *not* implyPCI_DEVICES).Quoted 8 lines
But that means that every board that provides PCI has to have an "imply
PCI_DEVICES" line, which is pretty clunky just to work around an s390x limitation.Is there some way in the
Kconfigsyntax for s390x to say "noPCI_DEVICES" so we can have the corner-case be handled by the s390xKconfigin one place rather than in 20 places affecting everywhere except s390x?
Quoted 4 lines
IIRC the problem on s390x are the legacy IRQs. s390x has only MSIs. So I guess the correct way to fix this would be to introduce some
PCI_LEGACY_IRQswitch and let all old devices that do not work with MSI depend on it.
s/MSI/MSI-X/, IIRC. Not sure how far 'legacy' would stretch.
Re: [Qemu-arm] [qemu-s390x] [RFC PATCH 1/3] hw/Kconfig: PCI bus implies PCI_DEVICES
Quoted 34 lines · Cornelia Huck
Quoted 31 lines · On Mon, 15 Jul 2019 12:48:55 +0200 Thomas Huth <[email protected]> wrote:
Quoted 29 lines · Peter Maydell
Quoted 8 lines · Thomas Huth
Quoted 5 lines · Philippe Mathieu-Daudé
If a controller device provides a PCI bus, we can plug any PCI daughter card on it.
Signed-off-by Philippe Mathieu-Daudé <[email protected]>---
Quoted 11 lines
hw/pci/Kconfig line 3
Quoted 8 lines
hw/pci/Kconfig +1
-0@@ -1,5 +1,6 @@ config PCI bool + imply PCI_DEVICESNo, please don't change this. This was done on purpose, since almost all
PCI_DEVICESdo not work on s390x (so s390x does *not* implyPCI_DEVICES).But that means that every board that provides PCI has to have an "imply
PCI_DEVICES" line, which is pretty clunky just to work around an s390x limitation.Is there some way in the
Kconfigsyntax for s390x to say "noPCI_DEVICES" so we can have the corner-case be handled by the s390xKconfigin one place rather than in 20 places affecting everywhere except s390x?
Quoted 6 lines
Quoted 4 lines
IIRC the problem on s390x are the legacy IRQs. s390x has only MSIs. So I guess the correct way to fix this would be to introduce some
PCI_LEGACY_IRQswitch and let all old devices that do not work with MSI depend on it.s/MSI/MSI-X/, IIRC. Not sure how far 'legacy' would stretch.
Maybe we can have something like PCI_LEGACY_DEVICES and PCI_MSI_DEVICES?
So if s390x only selects PCI_LEGACY (not PCI_MSI) bus, then it only get legacy devices?
Other MSI compliant should select PCI_MSI instead. PCI alone seems to give troubles.
Quoted 2 lines
cc ing Collin in case there's something else.
Re: [Qemu-arm] [qemu-s390x] [RFC PATCH 1/3] hw/Kconfig: PCI bus implies PCI_DEVICES
Quoted 40 lines · On Mon, 15 Jul 2019 13:04:28 +0200 Philippe Mathieu-Daudé <[email protected]>…
Quoted 39 lines · Cornelia Huck
Quoted 35 lines · On Mon, 15 Jul 2019 12:48:55 +0200 Thomas Huth <[email protected]> wrote:
Quoted 21 lines · Peter Maydell
Quoted 8 lines · Thomas Huth
Quoted 5 lines · Philippe Mathieu-Daudé
If a controller device provides a PCI bus, we can plug any PCI daughter card on it.
Signed-off-by Philippe Mathieu-Daudé <[email protected]>---
Quoted 11 lines
hw/pci/Kconfig line 3
Quoted 8 lines
hw/pci/Kconfig +1
-0@@ -1,5 +1,6 @@ config PCI bool + imply PCI_DEVICESNo, please don't change this. This was done on purpose, since almost all
PCI_DEVICESdo not work on s390x (so s390x does *not* implyPCI_DEVICES).Quoted 8 lines
But that means that every board that provides PCI has to have an "imply
PCI_DEVICES" line, which is pretty clunky just to work around an s390x limitation.Is there some way in the
Kconfigsyntax for s390x to say "noPCI_DEVICES" so we can have the corner-case be handled by the s390xKconfigin one place rather than in 20 places affecting everywhere except s390x?IIRC the problem on s390x are the legacy IRQs. s390x has only MSIs. So I guess the correct way to fix this would be to introduce some
PCI_LEGACY_IRQswitch and let all old devices that do not work with MSI depend on it.
Quoted 6 lines
Quoted 1 line
s/MSI/MSI-X/, IIRC. Not sure how far 'legacy' would stretch.
Maybe we can have something like
PCI_LEGACY_DEVICESandPCI_MSI_DEVICES?So if s390x only selects
PCI_LEGACY(notPCI_MSI) bus, then it only get legacy devices?
Wrong way around? We need MSI-X for s390x, not plain MSI or 'legacy' (whatever that is).
Quoted 6 lines
Other MSI compliant should select
PCI_MSIinstead. PCI alone seems to give troubles.Quoted 2 lines
cc ing Collin in case there's something else.
Re: [Qemu-arm] [qemu-s390x] [RFC PATCH 1/3] hw/Kconfig: PCI bus implies PCI_DEVICES
Quoted 45 lines · Cornelia Huck
Quoted 42 lines · On Mon, 15 Jul 2019 13:04:28 +0200 Philippe Mathieu-Daudé <[email protected]>…
Quoted 40 lines · Cornelia Huck
Quoted 31 lines · On Mon, 15 Jul 2019 12:48:55 +0200 Thomas Huth <[email protected]> wrote:
Quoted 21 lines · Peter Maydell
Quoted 8 lines · Thomas Huth
Quoted 5 lines · Philippe Mathieu-Daudé
If a controller device provides a PCI bus, we can plug any PCI daughter card on it.
Signed-off-by Philippe Mathieu-Daudé <[email protected]>---
Quoted 11 lines
hw/pci/Kconfig line 3
Quoted 8 lines
hw/pci/Kconfig +1
-0@@ -1,5 +1,6 @@ config PCI bool + imply PCI_DEVICESNo, please don't change this. This was done on purpose, since almost all
PCI_DEVICESdo not work on s390x (so s390x does *not* implyPCI_DEVICES).Quoted 8 lines
But that means that every board that provides PCI has to have an "imply
PCI_DEVICES" line, which is pretty clunky just to work around an s390x limitation.Is there some way in the
Kconfigsyntax for s390x to say "noPCI_DEVICES" so we can have the corner-case be handled by the s390xKconfigin one place rather than in 20 places affecting everywhere except s390x?Quoted 4 lines
IIRC the problem on s390x are the legacy IRQs. s390x has only MSIs. So I guess the correct way to fix this would be to introduce some
PCI_LEGACY_IRQswitch and let all old devices that do not work with MSI depend on it.s/MSI/MSI-X/, IIRC. Not sure how far 'legacy' would stretch.
Quoted 7 lines
Quoted 4 lines
Maybe we can have something like
PCI_LEGACY_DEVICESandPCI_MSI_DEVICES?So if s390x only selects
PCI_LEGACY(notPCI_MSI) bus, then it only get legacy devices?Wrong way around? We need MSI-X for s390x, not plain MSI or 'legacy' (whatever that is).
With "legacy" I meant the old level-triggered interrupts from the early PCI (non-express) days. Sorry for being imprecise here.
So maybe we need two new switches, PCI_CLASSIC (or so) and PCI_MSIX, and then the PCI devices should be marked with "default y if PCI_CLASSIC" if they do not have MSIX support, and with "default y if PCI_MSIX" if they have MSI-X support?
Thomas
Thomas
Re: [Qemu-arm] [qemu-s390x] [RFC PATCH 1/3] hw/Kconfig: PCI bus implies PCI_DEVICES
Quoted 54 lines · Thomas Huth
Quoted 45 lines · Cornelia Huck
Quoted 42 lines · On Mon, 15 Jul 2019 13:04:28 +0200 Philippe Mathieu-Daudé <[email protected]>…
Quoted 40 lines · Cornelia Huck
Quoted 31 lines · On Mon, 15 Jul 2019 12:48:55 +0200 Thomas Huth <[email protected]> wrote:
Quoted 21 lines · Peter Maydell
Quoted 8 lines · Thomas Huth
Quoted 5 lines · Philippe Mathieu-Daudé
If a controller device provides a PCI bus, we can plug any PCI daughter card on it.
Signed-off-by Philippe Mathieu-Daudé <[email protected]>---
Quoted 11 lines
hw/pci/Kconfig line 3
Quoted 8 lines
hw/pci/Kconfig +1
-0@@ -1,5 +1,6 @@ config PCI bool + imply PCI_DEVICESNo, please don't change this. This was done on purpose, since almost all
PCI_DEVICESdo not work on s390x (so s390x does *not* implyPCI_DEVICES).Quoted 8 lines
But that means that every board that provides PCI has to have an "imply
PCI_DEVICES" line, which is pretty clunky just to work around an s390x limitation.Is there some way in the
Kconfigsyntax for s390x to say "noPCI_DEVICES" so we can have the corner-case be handled by the s390xKconfigin one place rather than in 20 places affecting everywhere except s390x?Quoted 4 lines
IIRC the problem on s390x are the legacy IRQs. s390x has only MSIs. So I guess the correct way to fix this would be to introduce some
PCI_LEGACY_IRQswitch and let all old devices that do not work with MSI depend on it.s/MSI/MSI-X/, IIRC. Not sure how far 'legacy' would stretch.
Quoted 7 lines
Quoted 4 lines
Maybe we can have something like
PCI_LEGACY_DEVICESandPCI_MSI_DEVICES?So if s390x only selects
PCI_LEGACY(notPCI_MSI) bus, then it only get legacy devices?Wrong way around? We need MSI-X for s390x, not plain MSI or 'legacy' (whatever that is).
Quoted 7 lines
With "legacy" I meant the old level-triggered interrupts from the early PCI (non-express) days. Sorry for being imprecise here.
So maybe we need two new switches,
PCI_CLASSIC(or so) andPCI_MSIX, and then the PCI devices should be marked with "default y ifPCI_CLASSIC" if they do not have MSIX support, and with "default y ifPCI_MSIX" if they have MSI-X support?
Something like that :)
Per Wikipedia:
Conventional PCI and PCI-X are sometimes called Parallel PCI in order to distinguish them technologically from their more recent successor PCI Express, which adopted a serial, lane-based architecture.
The PCI-SIG introduced the serial PCI Express in c. 2004. At the same time, they renamed PCI as Conventional PCI.
PCI Express does not have physical interrupt lines at all. It uses message-signaled interrupts exclusively.
What about PCI_CONVENTIONAL then?
Regards,
Phil.
Re: [Qemu-arm] [qemu-s390x] [RFC PATCH 1/3] hw/Kconfig: PCI bus implies PCI_DEVICES
Quoted 72 lines · Philippe Mathieu-Daudé
Quoted 54 lines · Thomas Huth
Quoted 45 lines · Cornelia Huck
Quoted 42 lines · On Mon, 15 Jul 2019 13:04:28 +0200 Philippe Mathieu-Daudé <[email protected]>…
Quoted 40 lines · Cornelia Huck
Quoted 31 lines · On Mon, 15 Jul 2019 12:48:55 +0200 Thomas Huth <[email protected]> wrote:
Quoted 21 lines · Peter Maydell
Quoted 8 lines · Thomas Huth
Quoted 5 lines · Philippe Mathieu-Daudé
If a controller device provides a PCI bus, we can plug any PCI daughter card on it.
Signed-off-by Philippe Mathieu-Daudé <[email protected]>---
Quoted 11 lines
hw/pci/Kconfig line 3
Quoted 8 lines
hw/pci/Kconfig +1
-0@@ -1,5 +1,6 @@ config PCI bool + imply PCI_DEVICESNo, please don't change this. This was done on purpose, since almost all
PCI_DEVICESdo not work on s390x (so s390x does *not* implyPCI_DEVICES).Quoted 8 lines
But that means that every board that provides PCI has to have an "imply
PCI_DEVICES" line, which is pretty clunky just to work around an s390x limitation.Is there some way in the
Kconfigsyntax for s390x to say "noPCI_DEVICES" so we can have the corner-case be handled by the s390xKconfigin one place rather than in 20 places affecting everywhere except s390x?Quoted 4 lines
IIRC the problem on s390x are the legacy IRQs. s390x has only MSIs. So I guess the correct way to fix this would be to introduce some
PCI_LEGACY_IRQswitch and let all old devices that do not work with MSI depend on it.s/MSI/MSI-X/, IIRC. Not sure how far 'legacy' would stretch.
Quoted 7 lines
Quoted 4 lines
Maybe we can have something like
PCI_LEGACY_DEVICESandPCI_MSI_DEVICES?So if s390x only selects
PCI_LEGACY(notPCI_MSI) bus, then it only get legacy devices?Wrong way around? We need MSI-X for s390x, not plain MSI or 'legacy' (whatever that is).
Quoted 7 lines
With "legacy" I meant the old level-triggered interrupts from the early PCI (non-express) days. Sorry for being imprecise here.
So maybe we need two new switches,
PCI_CLASSIC(or so) andPCI_MSIX, and then the PCI devices should be marked with "default y ifPCI_CLASSIC" if they do not have MSIX support, and with "default y ifPCI_MSIX" if they have MSI-X support?Something like that :)
Per Wikipedia:
Conventional PCI and PCI-X are sometimes called Parallel PCI in order to distinguish them technologically from their more recent successor PCI Express, which adopted a serial, lane-based architecture.
Quoted 7 lines
The PCI-SIG introduced the serial PCI Express in c. 2004. At the same time, they renamed PCI as Conventional PCI.
PCI Express does not have physical interrupt lines at all. It uses message-signaled interrupts exclusively.
What about
PCI_CONVENTIONALthen?
Sounds good to me.
Thomas
Re: [Qemu-arm] [Qemu-devel] [qemu-s390x] [RFC PATCH 1/3] hw/Kconfig: PCI bus implies PCI_DEVICES
In reply to Philippe Mathieu-DaudéQuoted 72 lines · Philippe Mathieu-Daudé
Quoted 54 lines · Thomas Huth
Quoted 45 lines · Cornelia Huck
Quoted 42 lines · On Mon, 15 Jul 2019 13:04:28 +0200 Philippe Mathieu-Daudé <[email protected]>…
Quoted 40 lines · Cornelia Huck
Quoted 31 lines · On Mon, 15 Jul 2019 12:48:55 +0200 Thomas Huth <[email protected]> wrote:
Quoted 21 lines · Peter Maydell
Quoted 8 lines · Thomas Huth
Quoted 5 lines · Philippe Mathieu-Daudé
If a controller device provides a PCI bus, we can plug any PCI daughter card on it.
Signed-off-by Philippe Mathieu-Daudé <[email protected]>---
Quoted 11 lines
hw/pci/Kconfig line 3
Quoted 8 lines
hw/pci/Kconfig +1
-0@@ -1,5 +1,6 @@ config PCI bool + imply PCI_DEVICESNo, please don't change this. This was done on purpose, since almost all
PCI_DEVICESdo not work on s390x (so s390x does *not* implyPCI_DEVICES).Quoted 8 lines
But that means that every board that provides PCI has to have an "imply
PCI_DEVICES" line, which is pretty clunky just to work around an s390x limitation.Is there some way in the
Kconfigsyntax for s390x to say "noPCI_DEVICES" so we can have the corner-case be handled by the s390xKconfigin one place rather than in 20 places affecting everywhere except s390x?Quoted 4 lines
IIRC the problem on s390x are the legacy IRQs. s390x has only MSIs. So I guess the correct way to fix this would be to introduce some
PCI_LEGACY_IRQswitch and let all old devices that do not work with MSI depend on it.s/MSI/MSI-X/, IIRC. Not sure how far 'legacy' would stretch.
Quoted 7 lines
Quoted 4 lines
Maybe we can have something like
PCI_LEGACY_DEVICESandPCI_MSI_DEVICES?So if s390x only selects
PCI_LEGACY(notPCI_MSI) bus, then it only get legacy devices?Wrong way around? We need MSI-X for s390x, not plain MSI or 'legacy' (whatever that is).
Quoted 7 lines
With "legacy" I meant the old level-triggered interrupts from the early PCI (non-express) days. Sorry for being imprecise here.
So maybe we need two new switches,
PCI_CLASSIC(or so) andPCI_MSIX, and then the PCI devices should be marked with "default y ifPCI_CLASSIC" if they do not have MSIX support, and with "default y ifPCI_MSIX" if they have MSI-X support?Something like that :)
Per Wikipedia:
Conventional PCI and PCI-X are sometimes called Parallel PCI in order to distinguish them technologically from their more recent successor PCI Express, which adopted a serial, lane-based architecture.
Quoted 7 lines
The PCI-SIG introduced the serial PCI Express in c. 2004. At the same time, they renamed PCI as Conventional PCI.
PCI Express does not have physical interrupt lines at all. It uses message-signaled interrupts exclusively.
What about
PCI_CONVENTIONALthen?
What kinds of PCI devices are we trying to name?
Is it INTx vs. MSI vs. MSI-X?
Is it Conventional PCI vs. PCI Express?
Re: [Qemu-arm] [Qemu-devel] [qemu-s390x] [RFC PATCH 1/3] hw/Kconfig: PCI bus implies PCI_DEVICES
Quoted 77 lines · On Mon, 15 Jul 2019 18:08:45 +0200 Markus Armbruster <[email protected]> wrote:
Quoted 75 lines · Philippe Mathieu-Daudé
Quoted 54 lines · Thomas Huth
Quoted 45 lines · Cornelia Huck
Quoted 42 lines · On Mon, 15 Jul 2019 13:04:28 +0200 Philippe Mathieu-Daudé <[email protected]>…
Quoted 40 lines · Cornelia Huck
Quoted 31 lines · On Mon, 15 Jul 2019 12:48:55 +0200 Thomas Huth <[email protected]> wrote:
Quoted 21 lines · Peter Maydell
Quoted 8 lines · Thomas Huth
Quoted 5 lines · Philippe Mathieu-Daudé
If a controller device provides a PCI bus, we can plug any PCI daughter card on it.
Signed-off-by Philippe Mathieu-Daudé <[email protected]>---
Quoted 11 lines
hw/pci/Kconfig line 3
Quoted 8 lines
hw/pci/Kconfig +1
-0@@ -1,5 +1,6 @@ config PCI bool + imply PCI_DEVICESNo, please don't change this. This was done on purpose, since almost all
PCI_DEVICESdo not work on s390x (so s390x does *not* implyPCI_DEVICES).Quoted 8 lines
But that means that every board that provides PCI has to have an "imply
PCI_DEVICES" line, which is pretty clunky just to work around an s390x limitation.Is there some way in the
Kconfigsyntax for s390x to say "noPCI_DEVICES" so we can have the corner-case be handled by the s390xKconfigin one place rather than in 20 places affecting everywhere except s390x?Quoted 4 lines
IIRC the problem on s390x are the legacy IRQs. s390x has only MSIs. So I guess the correct way to fix this would be to introduce some
PCI_LEGACY_IRQswitch and let all old devices that do not work with MSI depend on it.s/MSI/MSI-X/, IIRC. Not sure how far 'legacy' would stretch.
Quoted 7 lines
Quoted 4 lines
Maybe we can have something like
PCI_LEGACY_DEVICESandPCI_MSI_DEVICES?So if s390x only selects
PCI_LEGACY(notPCI_MSI) bus, then it only get legacy devices?Wrong way around? We need MSI-X for s390x, not plain MSI or 'legacy' (whatever that is).
Quoted 7 lines
With "legacy" I meant the old level-triggered interrupts from the early PCI (non-express) days. Sorry for being imprecise here.
So maybe we need two new switches,
PCI_CLASSIC(or so) andPCI_MSIX, and then the PCI devices should be marked with "default y ifPCI_CLASSIC" if they do not have MSIX support, and with "default y ifPCI_MSIX" if they have MSI-X support?Something like that :)
Per Wikipedia:
Conventional PCI and PCI-X are sometimes called Parallel PCI in order to distinguish them technologically from their more recent successor PCI Express, which adopted a serial, lane-based architecture.
The PCI-SIG introduced the serial PCI Express in c. 2004. At the same time, they renamed PCI as Conventional PCI.
Quoted 8 lines
Quoted 4 lines
PCI Express does not have physical interrupt lines at all. It uses message-signaled interrupts exclusively.
What about
PCI_CONVENTIONALthen?What kinds of PCI devices are we trying to name?
Is it INTx vs. MSI vs. MSI-X?
I think for s390x we need (INTx || MSI) vs MSI-X...
Quoted 2 lines
Is it Conventional PCI vs. PCI Express?
...while this is probably more INTx vs (MSI || MSI-X)?
Re: [Qemu-arm] [Qemu-devel] [qemu-s390x] [RFC PATCH 1/3] hw/Kconfig: PCI bus implies PCI_DEVICES
Quoted 3 lines · Cornelia Huck
Quoted 1 line
Is it INTx vs. MSI vs. MSI-X?
I think for s390x we need (INTx || MSI) vs MSI-X...
I think MSI vs MSI-X is just how it's configured, not the actual behavior, so it should be irrelevant.
Paolo
Re: [Qemu-arm] [Qemu-devel] [qemu-s390x] [RFC PATCH 1/3] hw/Kconfig: PCI bus implies PCI_DEVICES
Quoted 7 lines · Paolo Bonzini
Quoted 3 lines · Cornelia Huck
Quoted 1 line
Is it INTx vs. MSI vs. MSI-X?
I think for s390x we need (INTx || MSI) vs MSI-X...
I think MSI vs MSI-X is just how it's configured, not the actual behavior, so it should be irrelevant.
My best guesses from confusing information, please correct misunderstandings:
1. PCI devices need to support MSI or MSI-X to work with s390x.
2. We want a way to Kconfig the PCI devices that work, i.e. only the ones that support MSI or MSI-X.
I don't like calling devices without any MSI capability "classic" or "conventional devices". I'd rather call them "MSI-capable" or "MSI/MSI-X devices".
Since PCI-E devices must implement MSI or MSI-X, we could perhaps configure just the PCI-E devices for s390x. No need to invent a new name then. Do we even have device models that can do MSI but not E?
Re: [Qemu-arm] [Qemu-devel] [qemu-s390x] [RFC PATCH 1/3] hw/Kconfig: PCI bus implies PCI_DEVICES
Quoted 7 lines · Markus Armbruster
Quoted 5 lines · Paolo Bonzini
Quoted 3 lines · Cornelia Huck
Quoted 1 line
Is it INTx vs. MSI vs. MSI-X?
I think for s390x we need (INTx || MSI) vs MSI-X...
Quoted 7 lines
Quoted 2 lines
I think MSI vs MSI-X is just how it's configured, not the actual behavior, so it should be irrelevant.
My best guesses from confusing information, please correct misunderstandings:
1. PCI devices need to support MSI or MSI-X to work with s390x.
I think Cornelia mentioned that we might even require MSI-X there ... Collin (being listed as "S390 PCI" maintainer), can you confirm?
Quoted 6 lines
2. We want a way to
Kconfigthe PCI devices that work, i.e. only the ones that support MSI or MSI-X.I don't like calling devices without any MSI capability "classic" or "conventional devices". I'd rather call them "MSI-capable" or "MSI/MSI-X devices".
But you still need a config switch that you can set to enable the non-MSI devices ... what's so wrong with "conventional" if that's even the wording from the PCI SIG?
Quoted 3 lines
Since PCI-E devices must implement MSI or MSI-X, we could perhaps configure just the PCI-E devices for s390x. No need to invent a new name then. Do we even have device models that can do MSI but not E?
I don't know if anybody ever tried a non-virtio PCIe device from QEMU on s390x ... I guess there will be quite a bit of other hurdles, too (e.g. the Linux driver also has to work without MMIO), so I'm not sure whether we really want to enable all PCIe devices there...
Thomas
Re: [Qemu-devel] [qemu-s390x] [RFC PATCH 1/3] hw/Kconfig: PCI bus implies PCI_DEVICES
Quoted 11 lines · Thomas Huth
Quoted 10 lines · Markus Armbruster
Quoted 7 lines · Paolo Bonzini
Quoted 3 lines · Cornelia Huck
Quoted 1 line
Is it INTx vs. MSI vs. MSI-X?
I think for s390x we need (INTx || MSI) vs MSI-X...
I think MSI vs MSI-X is just how it's configured, not the actual behavior, so it should be irrelevant.
Quoted 8 lines
Quoted 4 lines
My best guesses from confusing information, please correct misunderstandings:
1. PCI devices need to support MSI or MSI-X to work with s390x.
I think Cornelia mentioned that we might even require MSI-X there ... Collin (being listed as "S390 PCI" maintainer), can you confirm?
MSI-X is mandatory for PCI devices in the s390 architecture.
Quoted 22 lines
Quoted 6 lines
2. We want a way to
Kconfigthe PCI devices that work, i.e. only the ones that support MSI or MSI-X.I don't like calling devices without any MSI capability "classic" or "conventional devices". I'd rather call them "MSI-capable" or "MSI/MSI-X devices".
But you still need a config switch that you can set to enable the non-MSI devices ... what's so wrong with "conventional" if that's even the wording from the PCI SIG?
Quoted 3 lines
Since PCI-E devices must implement MSI or MSI-X, we could perhaps configure just the PCI-E devices for s390x. No need to invent a new name then. Do we even have device models that can do MSI but not E?
I don't know if anybody ever tried a non-virtio PCIe device from QEMU on s390x ... I guess there will be quite a bit of other hurdles, too (e.g. the Linux driver also has to work without MMIO), so I'm not sure whether we really want to enable all PCIe devices there...
Thomas
Re: [Qemu-arm] [Qemu-devel] [qemu-s390x] [RFC PATCH 1/3] hw/Kconfig: PCI bus implies PCI_DEVICES
Quoted 15 lines · Collin Walling
Quoted 14 lines · Thomas Huth
Quoted 13 lines · Markus Armbruster
Quoted 7 lines · Paolo Bonzini
Quoted 3 lines · Cornelia Huck
Quoted 1 line
Is it INTx vs. MSI vs. MSI-X?
I think for s390x we need (INTx || MSI) vs MSI-X...
I think MSI vs MSI-X is just how it's configured, not the actual behavior, so it should be irrelevant.
My best guesses from confusing information, please correct misunderstandings:
Quoted 6 lines
Quoted 4 lines
Quoted 1 line
1. PCI devices need to support MSI or MSI-X to work with s390x.
I think Cornelia mentioned that we might even require MSI-X there ... Collin (being listed as "S390 PCI" maintainer), can you confirm?
MSI-X is mandatory for PCI devices in the s390 architecture.
How are MSI and MSI-X distinguished?
Paolo
Re: [Qemu-arm] [Qemu-devel] [qemu-s390x] [RFC PATCH 1/3] hw/Kconfig: PCI bus implies PCI_DEVICES
Quoted 18 lines · Paolo Bonzini
Quoted 17 lines · Collin Walling
Quoted 16 lines · Thomas Huth
Quoted 14 lines · Markus Armbruster
Quoted 7 lines · Paolo Bonzini
Quoted 3 lines · Cornelia Huck
Quoted 1 line
Is it INTx vs. MSI vs. MSI-X?
I think for s390x we need (INTx || MSI) vs MSI-X...
I think MSI vs MSI-X is just how it's configured, not the actual behavior, so it should be irrelevant.
My best guesses from confusing information, please correct misunderstandings:
1. PCI devices need to support MSI or MSI-X to work with s390x.
Quoted 9 lines
Quoted 4 lines
Quoted 2 lines
I think Cornelia mentioned that we might even require MSI-X there ... Collin (being listed as "S390 PCI" maintainer), can you confirm?
MSI-X is mandatory for PCI devices in the s390 architecture.
How are MSI and MSI-X distinguished?
Paolo
PCI host plugging will check for the MSI-X capability on the PCI device. If the MSI-X cap is missing, we fail device plugging. We do not check for MSI. Only MSI-X.
Specifically, the capability is represented by PCI_CAP_ID_MSIX in pci_regs.h
Re: [Qemu-arm] [Qemu-devel] [qemu-s390x] [RFC PATCH 1/3] hw/Kconfig: PCI bus implies PCI_DEVICES
Quoted 6 lines · Collin Walling
PCI host plugging will check for the MSI-X capability on the PCI device. If the MSI-X cap is missing, we fail device plugging. We do not check for MSI. Only MSI-X.
Specifically, the capability is represented by
PCI_CAP_ID_MSIXinpci_regs.h
The code in Linux says that single MSIs are supported too:
if (type == PCI_CAP_ID_MSI && nvec > 1)
return 1;Paolo
Re: [Qemu-arm] [Qemu-devel] [qemu-s390x] [RFC PATCH 1/3] hw/Kconfig: PCI bus implies PCI_DEVICES
Quoted 5 lines · On Wed, 17 Jul 2019 17:04:54 +0200 Paolo Bonzini <[email protected]> wrote:
Quoted 4 lines · Collin Walling
PCI host plugging will check for the MSI-X capability on the PCI device. If the MSI-X cap is missing, we fail device plugging. We do not check for MSI. Only MSI-X.
Quoted 7 lines
Quoted 2 lines
Specifically, the capability is represented by
PCI_CAP_ID_MSIXinpci_regs.hThe code in Linux says that single MSIs are supported too:
if (type == PCI_CAP_ID_MSI && nvec > 1) return 1;
Interestingly, the check for MSI-X in QEMU seems to have been introduced in 857cc71985dc ("s390x/pci: merge msix init functions"), but that commit does not give a rationale (maybe it just referred to the existing code structure?)
A quick look through the code suggests that single MSIs should be supportable; can someone with access to the details verify?
Re: [Qemu-arm] [Qemu-devel] [qemu-s390x] [RFC PATCH 1/3] hw/Kconfig: PCI bus implies PCI_DEVICES
In reply to Thomas HuthQuoted 1 line · Thomas Huth
On 16/07/2019 15.06, Markus Armbruster wrote:
[...]
Quoted 10 lines
Quoted 6 lines
2. We want a way to
Kconfigthe PCI devices that work, i.e. only the ones that support MSI or MSI-X.I don't like calling devices without any MSI capability "classic" or "conventional devices". I'd rather call them "MSI-capable" or "MSI/MSI-X devices".
But you still need a config switch that you can set to enable the non-MSI devices ... what's so wrong with "conventional" if that's even the wording from the PCI SIG?
PCI Express Base Specification, rev. 3.0, section Terms and Acronyms:
conventional PCI Behavior or features that conform to the PCI
Local Bus Specification.
In other words, "conventional PCI" is non-Express PCI.
A PCI Express device *must* support MSI or MSI-X. See PCI Express Base Specification, rev. 3.0, section 7.7. MSI and MSI-X Capability Structures.
A "conventional" PCI device *may* support MSI or MSI-X. See PCI Local Bus Specification Revision 3.0 section 6.8. Message Signaled Interrupts.
Conflating MSI-capable with conventional vs. Express is therefore wrong.
[...]
PATCH 2/3 hw/usb/Kconfig: Add CONFIG_USB_EHCI_PCI
In reply to Philippe Mathieu-DaudéThe USB_EHCI entry currently include PCI code. Since the EHCI implementation is already split in sysbus/PCI, add a new USB_EHCI_PCI. There are no logical changes, but the Kconfig dependencies tree is cleaner.
--- hw/usb/Kconfig | 9 ++++++--- hw/usb/Makefile.objs | 5 +++-- 2 files changed, 9 insertions(+), 5 deletions(-)
hw/usb/Kconfig +6 -3
@@ -19,13 +19,16 @@ config USB_OHCI_PCI config USB_EHCI bool - default y if PCI_DEVICES - depends on PCI select USB +config USB_EHCI_PCI + bool + default y if PCI_DEVICES + select USB_EHCI + config USB_EHCI_SYSBUS bool - select USB + select USB_EHCI config USB_XHCI bool
hw/usb/Makefile.objs +3 -2
@@ -6,8 +6,9 @@ common-obj-$(CONFIG_USB) += desc.o desc-msos.o common-obj-$(CONFIG_USB_UHCI) += hcd-uhci.o common-obj-$(CONFIG_USB_OHCI) += hcd-ohci.o common-obj-$(CONFIG_USB_OHCI_PCI) += hcd-ohci-pci.o -common-obj-$(CONFIG_USB_EHCI) += hcd-ehci.o hcd-ehci-pci.o -common-obj-$(CONFIG_USB_EHCI_SYSBUS) += hcd-ehci.o hcd-ehci-sysbus.o +common-obj-$(CONFIG_USB_EHCI) += hcd-ehci.o +common-obj-$(CONFIG_USB_EHCI_PCI) += hcd-ehci-pci.o +common-obj-$(CONFIG_USB_EHCI_SYSBUS) += hcd-ehci-sysbus.o common-obj-$(CONFIG_USB_XHCI) += hcd-xhci.o common-obj-$(CONFIG_USB_XHCI_NEC) += hcd-xhci-nec.o common-obj-$(CONFIG_USB_MUSB) += hcd-musb.o
Signature · 1 line
2.20.1
Re: [Qemu-arm] [Qemu-ppc] [PATCH-for-4.2 2/3] hw/usb/Kconfig: Add CONFIG_USB_EHCI_PCI
Quoted 30 lines · Philippe Mathieu-Daudé
The
USB_EHCIentry currently include PCI code. Since the EHCI implementation is already split in sysbus/PCI, add a newUSB_EHCI_PCI. There are no logical changes, but theKconfigdependencies tree is cleaner.Signed-off-by Philippe Mathieu-Daudé <[email protected]>---
hw/usb/Kconfig | 9 ++++++---
hw/usb/Makefile.objs | 5 +++--2 files changed, 9 insertions(+), 5 deletions(-)hw/usb/Kconfig +0
-0@@ -19,13 +19,16 @@ config USB_OHCI_PCIconfig
USB_EHCI
boolhw/usb/Kconfig +5
-2- default y if PCI_DEVICES - depends on PCI select USB +config USB_EHCI_PCI + bool + default y if PCI_DEVICES + select USB_EHCI +config
USB_EHCI_SYSBUS
bool
hw/usb/Kconfig config USB_OHCI_PCI · line 31
Quoted 2 lines
hw/usb/Kconfig +1
-1- select USB + select USB_EHCI
Isn't this making USB_EHCI effectively the same as USB so maybe you don't need to keep that around any more. Can you just add select USB to USB_EHCI_PCI and USB_EHCI_SYSBUS and delete USB_EHCI?
Regards,
BALATON Zoltan
Re: [Qemu-arm] [Qemu-ppc] [PATCH-for-4.2 2/3] hw/usb/Kconfig: Add CONFIG_USB_EHCI_PCI
Quoted 24 lines · BALATON Zoltan
Quoted 23 lines · Philippe Mathieu-Daudé
The
USB_EHCIentry currently include PCI code. Since the EHCI implementation is already split in sysbus/PCI, add a newUSB_EHCI_PCI. There are no logical changes, but theKconfigdependencies tree is cleaner.Signed-off-by Philippe Mathieu-Daudé <[email protected]>---
hw/usb/Kconfig | 9 ++++++---
hw/usb/Makefile.objs | 5 +++--2 files changed, 9 insertions(+), 5 deletions(-)hw/usb/Kconfig +0
-0@@ -19,13 +19,16 @@ config USB_OHCI_PCIconfig
USB_EHCI
bool
- default y ifPCI_DEVICES
- depends on PCI
select USB
Quoted 13 lines
Quoted 9 lines
hw/usb/Kconfig +5
-0+config USB_EHCI_PCI + bool + default y if PCI_DEVICES + select USB_EHCI +config
USB_EHCI_SYSBUS
bool
- select USB
+ selectUSB_EHCIIsn't this making
USB_EHCIeffectively the same as USB so maybe you don't need to keep that around any more. Can you just add select USB toUSB_EHCI_PCIandUSB_EHCI_SYSBUSand deleteUSB_EHCI?
If you want to compile without USB_EHCI_PCI and without USB_EHCI_SYSBUS, but with USB (e.g. due to XHCI), I think we should not include hcd-ehci.o file in the build. So I think it's fine that we have a separate config switch for this file.
Thomas
Re: [Qemu-devel] [Qemu-ppc] [PATCH-for-4.2 2/3] hw/usb/Kconfig: Add CONFIG_USB_EHCI_PCI
Quoted 39 lines · Thomas Huth
Quoted 24 lines · BALATON Zoltan
Quoted 23 lines · Philippe Mathieu-Daudé
The
USB_EHCIentry currently include PCI code. Since the EHCI implementation is already split in sysbus/PCI, add a newUSB_EHCI_PCI. There are no logical changes, but theKconfigdependencies tree is cleaner.Signed-off-by Philippe Mathieu-Daudé <[email protected]>---
hw/usb/Kconfig?????? | 9 ++++++---
hw/usb/Makefile.objs | 5 +++--2 files changed, 9 insertions(+), 5 deletions(-)hw/usb/Kconfig +0
-0@@ -19,13 +19,16 @@ config USB_OHCI_PCIconfig
USB_EHCI
??? bool
-??? default y ifPCI_DEVICES
-??? depends on PCI
??? select USBQuoted 13 lines
Quoted 9 lines
hw/usb/Kconfig +5
-0+config USB_EHCI_PCI +??? bool +??? default y if PCI_DEVICES +??? select USB_EHCI +config
USB_EHCI_SYSBUS
??? bool
-??? select USB
+??? selectUSB_EHCIIsn't this making
USB_EHCIeffectively the same as USB so maybe you don't need to keep that around any more. Can you just add select USB toUSB_EHCI_PCIandUSB_EHCI_SYSBUSand deleteUSB_EHCI?
Quoted 4 lines
If you want to compile without
USB_EHCI_PCIand withoutUSB_EHCI_SYSBUS, but with USB (e.g. due to XHCI), I think we should not include hcd-ehci.o file in the build. So I think it's fine that we have a separate config switch for this file.
So shouldn't build depend on either USB_EHCI_PCI or USB_EHCI_SYSBUS selected then?
Regards,
BALATON Zoltan
Re: [Qemu-arm] [Qemu-ppc] [PATCH-for-4.2 2/3] hw/usb/Kconfig: Add CONFIG_USB_EHCI_PCI
Quoted 40 lines · BALATON Zoltan
Quoted 39 lines · Thomas Huth
Quoted 37 lines · BALATON Zoltan
Quoted 28 lines · Philippe Mathieu-Daudé
The
USB_EHCIentry currently include PCI code. Since the EHCI implementation is already split in sysbus/PCI, add a newUSB_EHCI_PCI. There are no logical changes, but theKconfigdependencies tree is cleaner.Signed-off-by Philippe Mathieu-Daudé <[email protected]>---
hw/usb/Kconfig?????? | 9 ++++++---
hw/usb/Makefile.objs | 5 +++--2 files changed, 9 insertions(+), 5 deletions(-)hw/usb/Kconfig +0
-0@@ -19,13 +19,16 @@ config USB_OHCI_PCIconfig
USB_EHCI
??? bool
-??? default y ifPCI_DEVICES
-??? depends on PCI
??? select USBhw/usb/Kconfig +5
-0+config USB_EHCI_PCI +??? bool +??? default y if PCI_DEVICES +??? select USB_EHCI +Quoted 4 lines
config
USB_EHCI_SYSBUS
??? bool
-??? select USB
+??? selectUSB_EHCIIsn't this making
USB_EHCIeffectively the same as USB so maybe you don't need to keep that around any more. Can you just add select USB toUSB_EHCI_PCIandUSB_EHCI_SYSBUSand deleteUSB_EHCI?
Quoted 7 lines
Quoted 4 lines
If you want to compile without
USB_EHCI_PCIand withoutUSB_EHCI_SYSBUS, but with USB (e.g. due to XHCI), I think we should not include hcd-ehci.o file in the build. So I think it's fine that we have a separate config switch for this file.So shouldn't build depend on either
USB_EHCI_PCIorUSB_EHCI_SYSBUSselected then?
Boards that have a hard-wired sysbus EHCI device already select it, e.g. EXYNOS4 in hw/arm/Kconfig. EHCI on a PCI card is optional, so it is only marked with "default y if PCI_DEVICES" - which you can override in your config if you don't need it.
Thomas
Re: [Qemu-arm] [Qemu-ppc] [PATCH-for-4.2 2/3] hw/usb/Kconfig: Add CONFIG_USB_EHCI_PCI
In reply to BALATON ZoltanQuoted 8 lines · BALATON Zoltan
Quoted 5 lines
If you want to compile without
USB_EHCI_PCIand withoutUSB_EHCI_SYSBUS, but with USB (e.g. due to XHCI), I think we should not include hcd-ehci.o file in the build. So I think it's fine that we have a separate config switch for this file.So shouldn't build depend on either
USB_EHCI_PCIorUSB_EHCI_SYSBUSselected then?
No, USB_EHCI is never selected by the user. The board or default-config file selects either USB_EHCI_PCI or USB_EHCI_SYSBUS, which brings in USB_EHCI, which brings in USB, which (optionally) brings in the USB devices.
Paolo
Re: [Qemu-arm] [PATCH-for-4.2 2/3] hw/usb/Kconfig: Add CONFIG_USB_EHCI_PCI
In reply to Philippe Mathieu-DaudéQuoted 42 lines · Philippe Mathieu-Daudé
The
USB_EHCIentry currently include PCI code. Since the EHCI implementation is already split in sysbus/PCI, add a newUSB_EHCI_PCI. There are no logical changes, but theKconfigdependencies tree is cleaner.Signed-off-by Philippe Mathieu-Daudé <[email protected]>--- hw/usb/Kconfig | 9 ++++++--- hw/usb/Makefile.objs | 5 +++-- 2 files changed, 9 insertions(+), 5 deletions(-)hw/usb/Kconfig +6
-3@@ -19,13 +19,16 @@ config USB_OHCI_PCI config USB_EHCI bool - default y if PCI_DEVICES - depends on PCI select USB +config USB_EHCI_PCI + bool + default y if PCI_DEVICES + select USB_EHCI + config USB_EHCI_SYSBUS bool - select USB + select USB_EHCI config USB_XHCI boolhw/usb/Makefile.objs +0
-0@@ -6,8 +6,9 @@ common-obj-$(CONFIG_USB) += desc.o desc-msos.o common-obj-$(CONFIG_USB_UHCI) += hcd-uhci.o
hw/usb/Makefile.objs common-obj-$(CONFIG_USB) += desc.o desc-msos.o · line 14
Quoted 10 lines
hw/usb/Makefile.objs +3
-2common-obj-$(CONFIG_USB_OHCI) += hcd-ohci.o common-obj-$(CONFIG_USB_OHCI_PCI) += hcd-ohci-pci.o -common-obj-$(CONFIG_USB_EHCI) += hcd-ehci.o hcd-ehci-pci.o -common-obj-$(CONFIG_USB_EHCI_SYSBUS) += hcd-ehci.o hcd-ehci-sysbus.o +common-obj-$(CONFIG_USB_EHCI) += hcd-ehci.o +common-obj-$(CONFIG_USB_EHCI_PCI) += hcd-ehci-pci.o +common-obj-$(CONFIG_USB_EHCI_SYSBUS) += hcd-ehci-sysbus.o common-obj-$(CONFIG_USB_XHCI) += hcd-xhci.o common-obj-$(CONFIG_USB_XHCI_NEC) += hcd-xhci-nec.o common-obj-$(CONFIG_USB_MUSB) += hcd-musb.o
Looks cleaner this way, indeed.
PATCH 3/3 hw/usb/Kconfig: USB_XHCI_NEC requires USB_XHCI
In reply to Philippe Mathieu-DaudéTYPE_NEC_XHCI is child of TYPE_XHCI. Add the missing Kconfig dependency.
--- hw/usb/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
hw/usb/Kconfig +1 -1
@@ -40,7 +40,7 @@ config USB_XHCI_NEC bool default y if PCI_DEVICES depends on PCI - select USB + select USB_XHCI config USB_MUSB bool
Signature · 1 line
2.20.1
Re: [Qemu-arm] [PATCH-for-4.1? 3/3] hw/usb/Kconfig: USB_XHCI_NEC requires USB_XHCI
Quoted 14 lines · Philippe Mathieu-Daudé
TYPE_NEC_XHCIis child ofTYPE_XHCI. Add the missingKconfigdependency.Signed-off-by Philippe Mathieu-Daudé <[email protected]>--- hw/usb/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)hw/usb/Kconfig +0
-0
hw/usb/Kconfig config USB_XHCI_NEC · line 46
Quoted 8 lines
hw/usb/Kconfig +1
-1@@ -40,7 +40,7 @@ config USB_XHCI_NEC bool default y if PCI_DEVICES depends on PCI - select USB + select USB_XHCI config USB_MUSB bool
Quoted 9 lines · Philippe Mathieu-Daudé
I actually wanted to clean the USB devices (i.e. to not have USB3 devices appear on OHCI buses) but this is too late for the next release, so let's post the patches accumulated.
Philippe Mathieu-Daudé (3):
hw/Kconfig: PCI bus impliesPCI_DEVICES
hw/usb/Kconfig: AddCONFIG_USB_EHCI_PCI
hw/usb/Kconfig:USB_XHCI_NECrequiresUSB_XHCI
Quoted 14 lines
docs/devel/kconfig.rst | 1 - hw/alpha/Kconfig | 1 - hw/arm/Kconfig | 4 ---- hw/hppa/Kconfig | 1 - hw/i386/Kconfig | 1 - hw/pci/Kconfig | 1 + hw/ppc/Kconfig | 6 ------ hw/riscv/Kconfig | 1 - hw/sh4/Kconfig | 1 - hw/sparc64/Kconfig | 1 - hw/usb/Kconfig | 11 +++++++---- hw/usb/Makefile.objs | 5 +++-- 12 files changed, 11 insertions(+), 23 deletions(-)
ACK for 2 and 3. Gerd is on vacation so I'm picking them up.
Paolo