[1/4] s390/pci: stash version in the zpci_dev
diff mbox series

Message ID 1600529318-8996-2-git-send-email-mjrosato@linux.ibm.com
State Superseded
Headers show
Series
  • Pass zPCI hardware information via VFIO
Related show

Commit Message

Matthew Rosato Sept. 19, 2020, 3:28 p.m. UTC
In preparation for passing the info on to vfio-pci devices, stash the
supported PCI version for the target device in the zpci_dev.

Signed-off-by: Matthew Rosato <mjrosato@linux.ibm.com>
---
 arch/s390/include/asm/pci.h | 1 +
 arch/s390/pci/pci_clp.c     | 1 +
 2 files changed, 2 insertions(+)

Comments

Niklas Schnelle Sept. 21, 2020, 9:35 a.m. UTC | #1
Hi Matthew,

On 9/19/20 5:28 PM, Matthew Rosato wrote:
> In preparation for passing the info on to vfio-pci devices, stash the
> supported PCI version for the target device in the zpci_dev.
> 
> Signed-off-by: Matthew Rosato <mjrosato@linux.ibm.com>

Acked-by: Niklas Schnelle <schnelle@linux.ibm.com>

> ---
>  arch/s390/include/asm/pci.h | 1 +
>  arch/s390/pci/pci_clp.c     | 1 +
>  2 files changed, 2 insertions(+)
> 
> diff --git a/arch/s390/include/asm/pci.h b/arch/s390/include/asm/pci.h
> index 99b92c3..882e233 100644
> --- a/arch/s390/include/asm/pci.h
> +++ b/arch/s390/include/asm/pci.h
> @@ -179,6 +179,7 @@ struct zpci_dev {
>  	atomic64_t mapped_pages;
>  	atomic64_t unmapped_pages;
>  
> +	u8		version;
>  	enum pci_bus_speed max_bus_speed;
>  
>  	struct dentry	*debugfs_dev;
> diff --git a/arch/s390/pci/pci_clp.c b/arch/s390/pci/pci_clp.c
> index 7e735f4..48bf316 100644
> --- a/arch/s390/pci/pci_clp.c
> +++ b/arch/s390/pci/pci_clp.c
> @@ -102,6 +102,7 @@ static void clp_store_query_pci_fngrp(struct zpci_dev *zdev,
>  	zdev->msi_addr = response->msia;
>  	zdev->max_msi = response->noi;
>  	zdev->fmb_update = response->mui;
> +	zdev->version = response->version;
>  
>  	switch (response->version) {
>  	case 1:
>
Christian Borntraeger Sept. 21, 2020, 9:38 a.m. UTC | #2
On 19.09.20 17:28, Matthew Rosato wrote:
> In preparation for passing the info on to vfio-pci devices, stash the
> supported PCI version for the target device in the zpci_dev.
> 
> Signed-off-by: Matthew Rosato <mjrosato@linux.ibm.com>

In case this will go via the vfio tree, with my s390 kernel maintainer hat on:

Acked-by: Christian Borntraeger <borntraeger@de.ibm.com>
> ---
>  arch/s390/include/asm/pci.h | 1 +
>  arch/s390/pci/pci_clp.c     | 1 +
>  2 files changed, 2 insertions(+)
> 
> diff --git a/arch/s390/include/asm/pci.h b/arch/s390/include/asm/pci.h
> index 99b92c3..882e233 100644
> --- a/arch/s390/include/asm/pci.h
> +++ b/arch/s390/include/asm/pci.h
> @@ -179,6 +179,7 @@ struct zpci_dev {
>  	atomic64_t mapped_pages;
>  	atomic64_t unmapped_pages;
>  
> +	u8		version;
>  	enum pci_bus_speed max_bus_speed;
>  
>  	struct dentry	*debugfs_dev;
> diff --git a/arch/s390/pci/pci_clp.c b/arch/s390/pci/pci_clp.c
> index 7e735f4..48bf316 100644
> --- a/arch/s390/pci/pci_clp.c
> +++ b/arch/s390/pci/pci_clp.c
> @@ -102,6 +102,7 @@ static void clp_store_query_pci_fngrp(struct zpci_dev *zdev,
>  	zdev->msi_addr = response->msia;
>  	zdev->max_msi = response->noi;
>  	zdev->fmb_update = response->mui;
> +	zdev->version = response->version;
>  
>  	switch (response->version) {
>  	case 1:
>
Cornelia Huck Sept. 21, 2020, 3:01 p.m. UTC | #3
On Sat, 19 Sep 2020 11:28:35 -0400
Matthew Rosato <mjrosato@linux.ibm.com> wrote:

> In preparation for passing the info on to vfio-pci devices, stash the
> supported PCI version for the target device in the zpci_dev.

Hm, what kind of version is that? The version of the zPCI interface?

Inquiring minds want to know :)

> 
> Signed-off-by: Matthew Rosato <mjrosato@linux.ibm.com>
> ---
>  arch/s390/include/asm/pci.h | 1 +
>  arch/s390/pci/pci_clp.c     | 1 +
>  2 files changed, 2 insertions(+)
Matthew Rosato Sept. 21, 2020, 3:44 p.m. UTC | #4
On 9/21/20 11:01 AM, Cornelia Huck wrote:
> On Sat, 19 Sep 2020 11:28:35 -0400
> Matthew Rosato <mjrosato@linux.ibm.com> wrote:
> 
>> In preparation for passing the info on to vfio-pci devices, stash the
>> supported PCI version for the target device in the zpci_dev.
> 
> Hm, what kind of version is that? The version of the zPCI interface?
> 
> Inquiring minds want to know :)
> 

Ha :) It's related to PCI-SIG spec versions and which one the zPCI 
facility supports for this device.

>>
>> Signed-off-by: Matthew Rosato <mjrosato@linux.ibm.com>
>> ---
>>   arch/s390/include/asm/pci.h | 1 +
>>   arch/s390/pci/pci_clp.c     | 1 +
>>   2 files changed, 2 insertions(+)
>
Cornelia Huck Sept. 21, 2020, 3:49 p.m. UTC | #5
On Mon, 21 Sep 2020 11:44:20 -0400
Matthew Rosato <mjrosato@linux.ibm.com> wrote:

> On 9/21/20 11:01 AM, Cornelia Huck wrote:
> > On Sat, 19 Sep 2020 11:28:35 -0400
> > Matthew Rosato <mjrosato@linux.ibm.com> wrote:
> >   
> >> In preparation for passing the info on to vfio-pci devices, stash the
> >> supported PCI version for the target device in the zpci_dev.  
> > 
> > Hm, what kind of version is that? The version of the zPCI interface?
> > 
> > Inquiring minds want to know :)
> >   
> 
> Ha :) It's related to PCI-SIG spec versions and which one the zPCI 
> facility supports for this device.

Thanks for the info :)

> 
> >>
> >> Signed-off-by: Matthew Rosato <mjrosato@linux.ibm.com>
> >> ---
> >>   arch/s390/include/asm/pci.h | 1 +
> >>   arch/s390/pci/pci_clp.c     | 1 +
> >>   2 files changed, 2 insertions(+)  
> >   
> 

FWIW,

Acked-by: Cornelia Huck <cohuck@redhat.com>

Patch
diff mbox series

diff --git a/arch/s390/include/asm/pci.h b/arch/s390/include/asm/pci.h
index 99b92c3..882e233 100644
--- a/arch/s390/include/asm/pci.h
+++ b/arch/s390/include/asm/pci.h
@@ -179,6 +179,7 @@  struct zpci_dev {
 	atomic64_t mapped_pages;
 	atomic64_t unmapped_pages;
 
+	u8		version;
 	enum pci_bus_speed max_bus_speed;
 
 	struct dentry	*debugfs_dev;
diff --git a/arch/s390/pci/pci_clp.c b/arch/s390/pci/pci_clp.c
index 7e735f4..48bf316 100644
--- a/arch/s390/pci/pci_clp.c
+++ b/arch/s390/pci/pci_clp.c
@@ -102,6 +102,7 @@  static void clp_store_query_pci_fngrp(struct zpci_dev *zdev,
 	zdev->msi_addr = response->msia;
 	zdev->max_msi = response->noi;
 	zdev->fmb_update = response->mui;
+	zdev->version = response->version;
 
 	switch (response->version) {
 	case 1: