pci-host: Allow extended config space access for PowerNV PHB4 model
PATCH 1/1 pci-host: Allow extended config space access for PowerNV PHB4 model
The PCIe extended configuration space on the device is not currently accessible to the host. if by default, it is still inaccessible for conventional for PCIe buses, add the current flag PCI_BUS_EXTENDED_CONFIG_SPACE on the root bus permits PCI-E extended config space access.
--- hw/pci-host/pnv_phb4.c | 1 + 1 file changed, 1 insertion(+)
hw/pci-host/pnv_phb4.c +1 -0
@@ -1205,6 +1205,7 @@ static void pnv_phb4_realize(DeviceState *dev, Error **errp) &phb->pci_mmio, &phb->pci_io, 0, 4, TYPE_PNV_PHB4_ROOT_BUS);pci_setup_iommu (pci->bus, pnv_phb4_dma_iommu, phb); + pci->bus->flags |=PCI_BUS_EXTENDED_CONFIG_SPACE ;/* Add a single Root port */ qdev_prop_set_uint8 (DEVICE (&phb->root),"chassis" , phb->chip_id);
Signature · 1 line
2.33.1
Quoted 8 lines · Christophe Lombard
The PCIe extended configuration space on the device is not currently accessible to the host. if by default, it is still inaccessible for conventional for PCIe buses, add the current flag
PCI_BUS_EXTENDED_CONFIG_SPACEon the root bus permits PCI-E extended config space access.Signed-off-by Christophe Lombard <[email protected]>---
FWIW, looks good to me
Quoted 16 lines
hw/pci-host/pnv_phb4.c | 1 + 1 file changed, 1 insertion(+)hw/pci-host/pnv_phb4.c +1
-0@@ -1205,6 +1205,7 @@ static void pnv_phb4_realize(DeviceState *dev, Error **errp) &phb->pci_mmio, &phb->pci_io, 0, 4, TYPE_PNV_PHB4_ROOT_BUS);pci_setup_iommu (pci->bus, pnv_phb4_dma_iommu, phb); + pci->bus->flags |=PCI_BUS_EXTENDED_CONFIG_SPACE ;/* Add a single Root port */ qdev_prop_set_uint8 (DEVICE (&phb->root),"chassis" , phb->chip_id);
Cédric Le Goater
Reviewed-byQuoted 8 lines · Frederic Barrat
Quoted 5 lines · Christophe Lombard
The PCIe extended configuration space on the device is not currently accessible to the host. if by default, it is still inaccessible for conventional for PCIe buses, add the current flag
PCI_BUS_EXTENDED_CONFIG_SPACEon the root bus permits PCI-E extended config space access.
For the record, this is coming from an experiment of plugging a CXL device on a QEMU PowerNV POWER10 machine (baremetal). Only minor changes (64 bits ops) were required to get it working.
I wonder where are with the CXL models ?
Quoted 6 lines
Quoted 2 lines
Signed-off-by Christophe Lombard <[email protected]>---
FWIW, looks good to me
Reviewed-by Frederic Barrat <[email protected]>
Thanks,
C.
Quoted 18 lines
Quoted 18 lines
hw/pci-host/pnv_phb4.c| 1 +1 file changed, 1 insertion(+)hw/pci-host/pnv_phb4.c +1
-0@@ -1205,6 +1205,7 @@ static void pnv_phb4_realize(DeviceState *dev, Error **errp) &phb->pci_mmio, &phb->pci_io, 0, 4, TYPE_PNV_PHB4_ROOT_BUS); pci_setup_iommu(pci->bus, pnv_phb4_dma_iommu, phb); + pci->bus->flags |= PCI_BUS_EXTENDED_CONFIG_SPACE; /* Add a single Root port */ qdev_prop_set_uint8(DEVICE(&phb->root), "chassis", phb->chip_id);
Quoted 10 lines · Cédric Le Goater
Quoted 8 lines · Frederic Barrat
Quoted 5 lines · Christophe Lombard
The PCIe extended configuration space on the device is not currently accessible to the host. if by default, it is still inaccessible for conventional for PCIe buses, add the current flag
PCI_BUS_EXTENDED_CONFIG_SPACEon the root bus permits PCI-E extended config space access.
Quoted 3 lines
For the record, this is coming from an experiment of plugging a CXL device on a QEMU PowerNV POWER10 machine (baremetal). Only minor changes (64 bits ops) were required to get it working.
Since this note could be helpful when having future retrospective, do you mind amending this note to the commit description?
Quoted 1 line
I wonder where are with the CXL models ?
IIRC Ben worked actively, asked help to the community but received very few, basically because there is not enough man power IMHO.
Last thing I remember is Igor suggested a different design approach:
https://lore.kernel.org/qemu-devel/[email protected]/
Quoted 37 lines
Quoted 6 lines
Quoted 2 lines
Signed-off-by Christophe Lombard <[email protected]>---
FWIW, looks good to me
Reviewed-by Frederic Barrat <[email protected]>Reviewed-by Cédric Le Goater <[email protected]>Thanks,
C.
Quoted 19 lines
Quoted 19 lines
hw/pci-host/pnv_phb4.c| 1 +1 file changed, 1 insertion(+)hw/pci-host/pnv_phb4.c +1
-0@@ -1205,6 +1205,7 @@ static void pnv_phb4_realize(DeviceState *dev, Error **errp) &phb->pci_mmio, &phb->pci_io, 0, 4, TYPE_PNV_PHB4_ROOT_BUS); pci_setup_iommu(pci->bus, pnv_phb4_dma_iommu, phb); + pci->bus->flags |= PCI_BUS_EXTENDED_CONFIG_SPACE; /* Add a single Root port */ qdev_prop_set_uint8(DEVICE(&phb->root), "chassis", phb->chip_id);
Quoted 11 lines · Philippe Mathieu-Daudé
Quoted 10 lines · Cédric Le Goater
Quoted 8 lines · Frederic Barrat
Quoted 5 lines · Christophe Lombard
The PCIe extended configuration space on the device is not currently accessible to the host. if by default, it is still inaccessible for conventional for PCIe buses, add the current flag
PCI_BUS_EXTENDED_CONFIG_SPACEon the root bus permits PCI-E extended config space access.
Quoted 6 lines
Quoted 3 lines
For the record, this is coming from an experiment of plugging a CXL device on a QEMU PowerNV POWER10 machine (baremetal). Only minor changes (64 bits ops) were required to get it working.
Since this note could be helpful when having future retrospective, do you mind amending this note to the commit description?
Yes. I agree. Please do.
Quoted 7 lines
Quoted 1 line
I wonder where we are with the CXL models ?
IIRC Ben worked actively, asked help to the community but received very few, basically because there is not enough man power IMHO.
Last thing I remember is Igor suggested a different design approach:
https://lore.kernel.org/qemu-devel/[email protected]/
Well, the CXL Linux driver seemed to work fine on QEMU machines, Intel and POWER.
Thanks for the info,
C.
Quoted 10 lines · Christophe Lombard
The PCIe extended configuration space on the device is not currently accessible to the host. if by default, it is still inaccessible for conventional for PCIe buses, add the current flag
PCI_BUS_EXTENDED_CONFIG_SPACEon the root bus permits PCI-E extended config space access.Signed-off-by Christophe Lombard <[email protected]>--- hw/pci-host/pnv_phb4.c | 1 + 1 file changed, 1 insertion(+)
Queued for 7.0.
Thanks,
C.