Skip to contentSkip to conversation

pxb: Restrict to x86

RFC In review David Gibson 4 participants 8 messages Jan 6, 2017 – Jan 9, 2017

lore
Share & tools
lore
#0 lore raw

RFC 1/1 pxb: Restrict to x86

The PCI Expander Bridge (PXB) device is essentially a hack to allow different PCIe devices to be assigned to different NUMA nodes on x86. Each PXB is sort-of a separate PCI host bridge, except that its config space is shared with the config space of the main PCI host bridge, rather than being independent.

This is only necessary if the platform doesn't (easily) allow truly independent PCI host bridges. AFAIK that's just x86.

This patch makes it possible to configure PXB out of the build, and adjusts the default configs so it's only included on x86 targets.

---
 default-configs/i386-softmmu.mak   | 1 +
 default-configs/x86_64-softmmu.mak | 1 +
 hw/pci-bridge/Makefile.objs        | 2 +-
 3 files changed, 3 insertions(+), 1 deletion(-)
default-configs/i386-softmmu.mak +1 -0
index 0b51360..6c52d26 100644
@@ -56,3 +56,4 @@ CONFIG_IOH3420=y
 CONFIG_I82801B11=y
 CONFIG_SMBIOS=y
 CONFIG_HYPERV_TESTDEV=$(CONFIG_KVM)
+CONFIG_PXB=y
default-configs/x86_64-softmmu.mak +1 -0
index 7f89503..2d0341c 100644
@@ -56,3 +56,4 @@ CONFIG_IOH3420=y
 CONFIG_I82801B11=y
 CONFIG_SMBIOS=y
 CONFIG_HYPERV_TESTDEV=$(CONFIG_KVM)
+CONFIG_PXB=y
hw/pci-bridge/Makefile.objs +1 -1
index f2adfe3..5612bd7 100644
@@ -1,5 +1,5 @@
 common-obj-y += pci_bridge_dev.o
-common-obj-y += pci_expander_bridge.o
+common-obj-$(CONFIG_PXB) += pci_expander_bridge.o
 common-obj-$(CONFIG_XIO3130) += xio3130_upstream.o xio3130_downstream.o
 common-obj-$(CONFIG_IOH3420) += ioh3420.o
 common-obj-$(CONFIG_I82801B11) += i82801b11.o
Signature · 1 line
2.9.3
Reviewed-by on v1 1/1
#1 lore raw
Quoted 6 lines · David Gibson

The PCI Expander Bridge (PXB) device is essentially a hack to allow different PCIe devices to be assigned to different NUMA nodes on x86. Each PXB is sort-of a separate PCI host bridge, except that its config space is shared with the config space of the main PCI host bridge, rather than being independent.

Hi David,

Quoted 3 lines

This is only necessary if the platform doesn't (easily) allow truly independent PCI host bridges. AFAIK that's just x86.

Indeed, it is possible to support independent PCI host bridges on x86 by using a separate MMCONFIG space for each one and enable separate PCI domains. We simply didn't need this until now, but maybe will be implemented it in the future.

Quoted 3 lines

This patch makes it possible to configure PXB out of the build, and adjusts the default configs so it's only included on x86 targets.

Makes sense

Thanks,
Marcel

Quoted 37 lines
---
 default-configs/i386-softmmu.mak   | 1 +
 default-configs/x86_64-softmmu.mak | 1 +
 hw/pci-bridge/Makefile.objs        | 2 +-
 3 files changed, 3 insertions(+), 1 deletion(-)
default-configs/i386-softmmu.mak +1 -0
index 0b51360..6c52d26 100644
@@ -56,3 +56,4 @@ CONFIG_IOH3420=y
 CONFIG_I82801B11=y
 CONFIG_SMBIOS=y
 CONFIG_HYPERV_TESTDEV=$(CONFIG_KVM)
+CONFIG_PXB=y
default-configs/x86_64-softmmu.mak +1 -0
index 7f89503..2d0341c 100644
@@ -56,3 +56,4 @@ CONFIG_IOH3420=y
 CONFIG_I82801B11=y
 CONFIG_SMBIOS=y
 CONFIG_HYPERV_TESTDEV=$(CONFIG_KVM)
+CONFIG_PXB=y
hw/pci-bridge/Makefile.objs +1 -1
index f2adfe3..5612bd7 100644
@@ -1,5 +1,5 @@
 common-obj-y += pci_bridge_dev.o
-common-obj-y += pci_expander_bridge.o
+common-obj-$(CONFIG_PXB) += pci_expander_bridge.o
 common-obj-$(CONFIG_XIO3130) += xio3130_upstream.o xio3130_downstream.o
 common-obj-$(CONFIG_IOH3420) += ioh3420.o
 common-obj-$(CONFIG_I82801B11) += i82801b11.o
#2 lore raw
Quoted 18 lines · Marcel Apfelbaum
Quoted 6 lines · David Gibson

The PCI Expander Bridge (PXB) device is essentially a hack to allow different PCIe devices to be assigned to different NUMA nodes on x86. Each PXB is sort-of a separate PCI host bridge, except that its config space is shared with the config space of the main PCI host bridge, rather than being independent.

Hi David,

Quoted 3 lines

This is only necessary if the platform doesn't (easily) allow truly independent PCI host bridges. AFAIK that's just x86.

Indeed, it is possible to support independent PCI host bridges on x86 by using a separate MMCONFIG space for each one and enable separate PCI domains. We simply didn't need this until now, but maybe will be implemented it in the future.

Quoted 5 lines
Quoted 3 lines

This patch makes it possible to configure PXB out of the build, and adjusts the default configs so it's only included on x86 targets.

Makes sense

Actually ACPI based ARM guests may be able to use the PXB as well, let's wait for their opinion.

Thanks,
Marcel

Quoted 45 lines

Thanks,
Marcel

Quoted 37 lines
---
 default-configs/i386-softmmu.mak   | 1 +
 default-configs/x86_64-softmmu.mak | 1 +
 hw/pci-bridge/Makefile.objs        | 2 +-
 3 files changed, 3 insertions(+), 1 deletion(-)
default-configs/i386-softmmu.mak +1 -0
index 0b51360..6c52d26 100644
@@ -56,3 +56,4 @@ CONFIG_IOH3420=y
 CONFIG_I82801B11=y
 CONFIG_SMBIOS=y
 CONFIG_HYPERV_TESTDEV=$(CONFIG_KVM)
+CONFIG_PXB=y
default-configs/x86_64-softmmu.mak +1 -0
index 7f89503..2d0341c 100644
@@ -56,3 +56,4 @@ CONFIG_IOH3420=y
 CONFIG_I82801B11=y
 CONFIG_SMBIOS=y
 CONFIG_HYPERV_TESTDEV=$(CONFIG_KVM)
+CONFIG_PXB=y
hw/pci-bridge/Makefile.objs +1 -1
index f2adfe3..5612bd7 100644
@@ -1,5 +1,5 @@
 common-obj-y += pci_bridge_dev.o
-common-obj-y += pci_expander_bridge.o
+common-obj-$(CONFIG_PXB) += pci_expander_bridge.o
 common-obj-$(CONFIG_XIO3130) += xio3130_upstream.o xio3130_downstream.o
 common-obj-$(CONFIG_IOH3420) += ioh3420.o
 common-obj-$(CONFIG_I82801B11) += i82801b11.o
#3 lore raw
In reply to Marcel Apfelbaum
Quoted 10 lines · Marcel Apfelbaum
Quoted 6 lines · David Gibson

The PCI Expander Bridge (PXB) device is essentially a hack to allow different PCIe devices to be assigned to different NUMA nodes on x86. Each PXB is sort-of a separate PCI host bridge, except that its config space is shared with the config space of the main PCI host bridge, rather than being independent.

Hi David,

Quoted 7 lines
Quoted 3 lines

This is only necessary if the platform doesn't (easily) allow truly independent PCI host bridges. AFAIK that's just x86.

Indeed, it is possible to support independent PCI host bridges on x86 by using a separate MMCONFIG space for each one and enable separate PCI domains. We simply didn't need this until now, but maybe will be implemented it in the future.

In fact I would say that's the cleanest way to do this on q35.

Quoted 48 lines
Quoted 3 lines

This patch makes it possible to configure PXB out of the build, and adjusts the default configs so it's only included on x86 targets.

Makes sense

Thanks,
Marcel

Quoted 37 lines
---
 default-configs/i386-softmmu.mak   | 1 +
 default-configs/x86_64-softmmu.mak | 1 +
 hw/pci-bridge/Makefile.objs        | 2 +-
 3 files changed, 3 insertions(+), 1 deletion(-)
default-configs/i386-softmmu.mak +1 -0
index 0b51360..6c52d26 100644
@@ -56,3 +56,4 @@ CONFIG_IOH3420=y
 CONFIG_I82801B11=y
 CONFIG_SMBIOS=y
 CONFIG_HYPERV_TESTDEV=$(CONFIG_KVM)
+CONFIG_PXB=y
default-configs/x86_64-softmmu.mak +1 -0
index 7f89503..2d0341c 100644
@@ -56,3 +56,4 @@ CONFIG_IOH3420=y
 CONFIG_I82801B11=y
 CONFIG_SMBIOS=y
 CONFIG_HYPERV_TESTDEV=$(CONFIG_KVM)
+CONFIG_PXB=y
hw/pci-bridge/Makefile.objs +1 -1
index f2adfe3..5612bd7 100644
@@ -1,5 +1,5 @@
 common-obj-y += pci_bridge_dev.o
-common-obj-y += pci_expander_bridge.o
+common-obj-$(CONFIG_PXB) += pci_expander_bridge.o
 common-obj-$(CONFIG_XIO3130) += xio3130_upstream.o xio3130_downstream.o
 common-obj-$(CONFIG_IOH3420) += ioh3420.o
 common-obj-$(CONFIG_I82801B11) += i82801b11.o
#4 lore raw
Quoted 15 lines · Michael S. Tsirkin
Quoted 14 lines · Marcel Apfelbaum
Quoted 6 lines · David Gibson

The PCI Expander Bridge (PXB) device is essentially a hack to allow different PCIe devices to be assigned to different NUMA nodes on x86. Each PXB is sort-of a separate PCI host bridge, except that its config space is shared with the config space of the main PCI host bridge, rather than being independent.

Hi David,

Quoted 3 lines

This is only necessary if the platform doesn't (easily) allow truly independent PCI host bridges. AFAIK that's just x86.

Quoted 6 lines
Quoted 3 lines

Indeed, it is possible to support independent PCI host bridges on x86 by using a separate MMCONFIG space for each one and enable separate PCI domains. We simply didn't need this until now, but maybe will be implemented it in the future.

In fact I would say that's the cleanest way to do this on q35.

Message received :)

Thanks,
Marcel

Quoted 4 lines
Quoted 4 lines
Quoted 3 lines

This patch makes it possible to configure PXB out of the build, and adjusts the default configs so it's only included on x86 targets.

[...]

#5 lore raw
Quoted 16 lines · Marcel Apfelbaum
Quoted 15 lines · Michael S. Tsirkin
Quoted 14 lines · Marcel Apfelbaum
Quoted 6 lines · David Gibson

The PCI Expander Bridge (PXB) device is essentially a hack to allow different PCIe devices to be assigned to different NUMA nodes on x86. Each PXB is sort-of a separate PCI host bridge, except that its config space is shared with the config space of the main PCI host bridge, rather than being independent.

Hi David,

Quoted 3 lines

This is only necessary if the platform doesn't (easily) allow truly independent PCI host bridges. AFAIK that's just x86.

Quoted 7 lines
Quoted 5 lines
Quoted 3 lines

Indeed, it is possible to support independent PCI host bridges on x86 by using a separate MMCONFIG space for each one and enable separate PCI domains. We simply didn't need this until now, but maybe will be implemented it in the future.

In fact I would say that's the cleanest way to do this on q35.

Message received :)

Just so I'm clear, these last two comments are essentially suggesting a follow up cleanup on x86, rather than suggesting a different approach for non-PC platforms, yes?

If there are no objections to my original patch do you want to take it through your tree Michael, or should I take it through mine?

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
#6 lore raw
Quoted 23 lines · David Gibson
Quoted 22 lines · Marcel Apfelbaum
Quoted 20 lines · Michael S. Tsirkin
Quoted 10 lines · Marcel Apfelbaum
Quoted 6 lines · David Gibson

The PCI Expander Bridge (PXB) device is essentially a hack to allow different PCIe devices to be assigned to different NUMA nodes on x86. Each PXB is sort-of a separate PCI host bridge, except that its config space is shared with the config space of the main PCI host bridge, rather than being independent.

Hi David,

Quoted 7 lines
Quoted 3 lines

This is only necessary if the platform doesn't (easily) allow truly independent PCI host bridges. AFAIK that's just x86.

Indeed, it is possible to support independent PCI host bridges on x86 by using a separate MMCONFIG space for each one and enable separate PCI domains. We simply didn't need this until now, but maybe will be implemented it in the future.

In fact I would say that's the cleanest way to do this on q35.

Quoted 14 lines
Quoted 1 line

Message received :)

Just so I'm clear, these last two comments are essentially suggesting a follow up cleanup on x86, rather than suggesting a different approach for non-PC platforms, yes?

If there are no objections to my original patch do you want to take it through your tree Michael, or should I take it through mine?

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

Go ahead and take it through yours pls.

#7 lore raw
Quoted 36 lines · Michael S. Tsirkin
Quoted 23 lines · David Gibson
Quoted 22 lines · Marcel Apfelbaum
Quoted 20 lines · Michael S. Tsirkin
Quoted 10 lines · Marcel Apfelbaum
Quoted 6 lines · David Gibson

The PCI Expander Bridge (PXB) device is essentially a hack to allow different PCIe devices to be assigned to different NUMA nodes on x86. Each PXB is sort-of a separate PCI host bridge, except that its config space is shared with the config space of the main PCI host bridge, rather than being independent.

Hi David,

Quoted 7 lines
Quoted 3 lines

This is only necessary if the platform doesn't (easily) allow truly independent PCI host bridges. AFAIK that's just x86.

Indeed, it is possible to support independent PCI host bridges on x86 by using a separate MMCONFIG space for each one and enable separate PCI domains. We simply didn't need this until now, but maybe will be implemented it in the future.

In fact I would say that's the cleanest way to do this on q35.

Quoted 9 lines
Quoted 1 line

Message received :)

Just so I'm clear, these last two comments are essentially suggesting a follow up cleanup on x86, rather than suggesting a different approach for non-PC platforms, yes?

If there are no objections to my original patch do you want to take it through your tree Michael, or should I take it through mine?

Quoted 3 lines

Go ahead and take it through yours pls.

Done, thanks.

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