All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] pci-host: Allow extended config space access for PowerNV PHB4 model
@ 2021-11-09 14:50 Christophe Lombard
  2021-11-09 15:51 ` Frederic Barrat
  2021-11-16 16:46 ` Cédric Le Goater
  0 siblings, 2 replies; 6+ messages in thread
From: Christophe Lombard @ 2021-11-09 14:50 UTC (permalink / raw)
  To: clg, qemu-ppc, qemu-devel, clombard

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.

Signed-off-by: Christophe Lombard <clombard@linux.vnet.ibm.com>
---
 hw/pci-host/pnv_phb4.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/hw/pci-host/pnv_phb4.c b/hw/pci-host/pnv_phb4.c
index 5c375a9f28..40b793201a 100644
--- a/hw/pci-host/pnv_phb4.c
+++ b/hw/pci-host/pnv_phb4.c
@@ -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);
-- 
2.33.1



^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH] pci-host: Allow extended config space access for PowerNV PHB4 model
  2021-11-09 14:50 [PATCH] pci-host: Allow extended config space access for PowerNV PHB4 model Christophe Lombard
@ 2021-11-09 15:51 ` Frederic Barrat
  2021-11-09 16:04   ` Cédric Le Goater
  2021-11-16 16:46 ` Cédric Le Goater
  1 sibling, 1 reply; 6+ messages in thread
From: Frederic Barrat @ 2021-11-09 15:51 UTC (permalink / raw)
  To: Christophe Lombard, clg, qemu-ppc, qemu-devel



On 09/11/2021 15:50, Christophe Lombard wrote:
> 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.
> 
> Signed-off-by: Christophe Lombard <clombard@linux.vnet.ibm.com>
> ---


FWIW, looks good to me
Reviewed-by: Frederic Barrat <fbarrat@linux.ibm.com>



>   hw/pci-host/pnv_phb4.c | 1 +
>   1 file changed, 1 insertion(+)
> 
> diff --git a/hw/pci-host/pnv_phb4.c b/hw/pci-host/pnv_phb4.c
> index 5c375a9f28..40b793201a 100644
> --- a/hw/pci-host/pnv_phb4.c
> +++ b/hw/pci-host/pnv_phb4.c
> @@ -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);
> 


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] pci-host: Allow extended config space access for PowerNV PHB4 model
  2021-11-09 15:51 ` Frederic Barrat
@ 2021-11-09 16:04   ` Cédric Le Goater
  2021-11-17  7:59     ` Philippe Mathieu-Daudé
  0 siblings, 1 reply; 6+ messages in thread
From: Cédric Le Goater @ 2021-11-09 16:04 UTC (permalink / raw)
  To: Frederic Barrat, Christophe Lombard, qemu-ppc, qemu-devel, Ben Widawsky

On 11/9/21 16:51, Frederic Barrat wrote:
> 
> 
> On 09/11/2021 15:50, Christophe Lombard wrote:
>> 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.

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 ?

>> Signed-off-by: Christophe Lombard <clombard@linux.vnet.ibm.com>
>> ---
> 
> 
> FWIW, looks good to me
> Reviewed-by: Frederic Barrat <fbarrat@linux.ibm.com>



Reviewed-by: Cédric Le Goater <clg@kaod.org>

Thanks,

C.


> 
> 
> 
>>   hw/pci-host/pnv_phb4.c | 1 +
>>   1 file changed, 1 insertion(+)
>>
>> diff --git a/hw/pci-host/pnv_phb4.c b/hw/pci-host/pnv_phb4.c
>> index 5c375a9f28..40b793201a 100644
>> --- a/hw/pci-host/pnv_phb4.c
>> +++ b/hw/pci-host/pnv_phb4.c
>> @@ -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);
>>



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] pci-host: Allow extended config space access for PowerNV PHB4 model
  2021-11-09 14:50 [PATCH] pci-host: Allow extended config space access for PowerNV PHB4 model Christophe Lombard
  2021-11-09 15:51 ` Frederic Barrat
@ 2021-11-16 16:46 ` Cédric Le Goater
  1 sibling, 0 replies; 6+ messages in thread
From: Cédric Le Goater @ 2021-11-16 16:46 UTC (permalink / raw)
  To: Christophe Lombard, qemu-ppc, qemu-devel

On 11/9/21 15:50, Christophe Lombard wrote:
> 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.
> 
> Signed-off-by: Christophe Lombard <clombard@linux.vnet.ibm.com>
> ---
>   hw/pci-host/pnv_phb4.c | 1 +
>   1 file changed, 1 insertion(+)

Queued for 7.0.

Thanks,

C.


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] pci-host: Allow extended config space access for PowerNV PHB4 model
  2021-11-09 16:04   ` Cédric Le Goater
@ 2021-11-17  7:59     ` Philippe Mathieu-Daudé
  2021-11-17  9:04       ` Cédric Le Goater
  0 siblings, 1 reply; 6+ messages in thread
From: Philippe Mathieu-Daudé @ 2021-11-17  7:59 UTC (permalink / raw)
  To: Cédric Le Goater, Christophe Lombard, Ben Widawsky
  Cc: Jonathan Cameron, Chris Browy, qemu-devel, qemu-ppc,
	Igor Mammedov, Frederic Barrat, Huai-Cheng Kuo

On 11/9/21 17:04, Cédric Le Goater wrote:
> On 11/9/21 16:51, Frederic Barrat wrote:
>>
>>
>> On 09/11/2021 15:50, Christophe Lombard wrote:
>>> 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.
> 
> 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?

> 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/20210319180705.6ede9091@redhat.com/

>>> Signed-off-by: Christophe Lombard <clombard@linux.vnet.ibm.com>
>>> ---
>>
>>
>> FWIW, looks good to me
>> Reviewed-by: Frederic Barrat <fbarrat@linux.ibm.com>
> 
> 
> 
> Reviewed-by: Cédric Le Goater <clg@kaod.org>
> 
> Thanks,
> 
> C.
> 
> 
>>
>>
>>
>>>   hw/pci-host/pnv_phb4.c | 1 +
>>>   1 file changed, 1 insertion(+)
>>>
>>> diff --git a/hw/pci-host/pnv_phb4.c b/hw/pci-host/pnv_phb4.c
>>> index 5c375a9f28..40b793201a 100644
>>> --- a/hw/pci-host/pnv_phb4.c
>>> +++ b/hw/pci-host/pnv_phb4.c
>>> @@ -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);
>>>
> 
> 



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] pci-host: Allow extended config space access for PowerNV PHB4 model
  2021-11-17  7:59     ` Philippe Mathieu-Daudé
@ 2021-11-17  9:04       ` Cédric Le Goater
  0 siblings, 0 replies; 6+ messages in thread
From: Cédric Le Goater @ 2021-11-17  9:04 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé, Christophe Lombard, Ben Widawsky
  Cc: Jonathan Cameron, Chris Browy, qemu-devel, qemu-ppc,
	Igor Mammedov, Frederic Barrat, Huai-Cheng Kuo

On 11/17/21 08:59, Philippe Mathieu-Daudé wrote:
> On 11/9/21 17:04, Cédric Le Goater wrote:
>> On 11/9/21 16:51, Frederic Barrat wrote:
>>>
>>>
>>> On 09/11/2021 15:50, Christophe Lombard wrote:
>>>> 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.
>>
>> 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.
  
>> 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/20210319180705.6ede9091@redhat.com/

Well, the CXL Linux driver seemed to work fine on QEMU machines, Intel
and POWER.

Thanks for the info,

C.
  


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2021-11-17  9:06 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-09 14:50 [PATCH] pci-host: Allow extended config space access for PowerNV PHB4 model Christophe Lombard
2021-11-09 15:51 ` Frederic Barrat
2021-11-09 16:04   ` Cédric Le Goater
2021-11-17  7:59     ` Philippe Mathieu-Daudé
2021-11-17  9:04       ` Cédric Le Goater
2021-11-16 16:46 ` Cédric Le Goater

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.