Skip to contentSkip to conversation

kconfig: Add PCIe devices to s390xx machines

PATCH Superseded Cédric Le Goater 3 participants 3 messages Jul 4, 2023

v1 of 4 Superseded Latest is v4 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 kconfig: Add PCIe devices to s390xx machines

It is useful to extend the number of available PCI devices to KVM guests for passthrough scenarios and also to expose these models to a different (big endian) architecture.

---
 hw/s390x/Kconfig | 4 ++++
 1 file changed, 4 insertions(+)
hw/s390x/Kconfig +4 -0
index 5e7d8a2bae8b..373f38adcd6b 100644
@@ -10,3 +10,7 @@ config S390_CCW_VIRTIO
     select SCLPCONSOLE
     select VIRTIO_CCW
     select MSI_NONBROKEN
+    select PCI_EXPRESS
+    select E1000E_PCI_EXPRESS
+    select IGB_PCI_EXPRESS
+    select USB_XHCI_PCI
Signature · 1 line
2.41.0
#1 lore raw
Quoted 3 lines · Cédric Le Goater

It is useful to extend the number of available PCI devices to KVM guests for passthrough scenarios and also to expose these models to a different (big endian) architecture.

Maybe mention that these devices can work on s390x since they support MSI-X ? (While most of the other devices don't work on s390x since they only support legacy interrupts)

Quoted 10 lines
---
  hw/s390x/Kconfig | 4 ++++
  1 file changed, 4 insertions(+)
hw/s390x/Kconfig +0 -0
index 5e7d8a2bae8b..373f38adcd6b 100644

hw/s390x/Kconfig config S390_CCW_VIRTIO · line 16

Quoted 7 lines
hw/s390x/Kconfig +4 -0
@@ -10,3 +10,7 @@ config S390_CCW_VIRTIO
      select SCLPCONSOLE
      select VIRTIO_CCW
      select MSI_NONBROKEN
+    select PCI_EXPRESS
+    select E1000E_PCI_EXPRESS
+    select IGB_PCI_EXPRESS
+    select USB_XHCI_PCI

Please don't use "select" here - you still want these devices to be disabled in case you run configure with "--without-default-devices".

You can use "imply" instead of "select" instead.

Thomas

#2 lore raw
In reply to Cédric Le Goater
Quoted 14 lines · Cédric Le Goater

It is useful to extend the number of available PCI devices to KVM guests for passthrough scenarios and also to expose these models to a different (big endian) architecture.

---
  hw/s390x/Kconfig | 4 ++++
  1 file changed, 4 insertions(+)
hw/s390x/Kconfig +0 -0
index 5e7d8a2bae8b..373f38adcd6b 100644

hw/s390x/Kconfig config S390_CCW_VIRTIO · line 13

Quoted 4 lines
hw/s390x/Kconfig +1 -0
@@ -10,3 +10,7 @@ config S390_CCW_VIRTIO
      select SCLPCONSOLE
      select VIRTIO_CCW
      select MSI_NONBROKEN
+    select PCI_EXPRESS

Can zPCI plug legacy PCI devices? I'd expect not, only PCIe devices. Then this patch would become:

-- >8 --
@@ -5,7 +5,7 @@ config S390_CCW_VIRTIO
imply VFIO_AP
imply VFIO_CCW
imply WDT_DIAG288
- select PCI
+ select PCI_EXPRESS
select S390_FLIC
select SCLPCONSOLE
select VIRTIO_CCW
---