s390/pci: stash dtsm and maxstbl
authorMatthew Rosato <mjrosato@linux.ibm.com>
Mon, 6 Jun 2022 20:33:13 +0000 (16:33 -0400)
committerChristian Borntraeger <borntraeger@linux.ibm.com>
Mon, 11 Jul 2022 07:54:24 +0000 (09:54 +0200)
Store information about what IOAT designation types are supported by
underlying hardware as well as the largest store block size allowed.
These values will be needed by passthrough.

Reviewed-by: Niklas Schnelle <schnelle@linux.ibm.com>
Reviewed-by: Pierre Morel <pmorel@linux.ibm.com>
Reviewed-by: Christian Borntraeger <borntraeger@linux.ibm.com>
Signed-off-by: Matthew Rosato <mjrosato@linux.ibm.com>
Link: https://lore.kernel.org/r/20220606203325.110625-10-mjrosato@linux.ibm.com
Signed-off-by: Christian Borntraeger <borntraeger@linux.ibm.com>
arch/s390/include/asm/pci.h
arch/s390/include/asm/pci_clp.h
arch/s390/pci/pci_clp.c

index 42a4a31..4c5b8fb 100644 (file)
@@ -126,9 +126,11 @@ struct zpci_dev {
        u32             gisa;           /* GISA designation for passthrough */
        u16             vfn;            /* virtual function number */
        u16             pchid;          /* physical channel ID */
+       u16             maxstbl;        /* Maximum store block size */
        u8              pfgid;          /* function group ID */
        u8              pft;            /* pci function type */
        u8              port;
+       u8              dtsm;           /* Supported DT mask */
        u8              rid_available   : 1;
        u8              has_hp_slot     : 1;
        u8              has_resources   : 1;
index f3286bc..d6189ed 100644 (file)
@@ -153,9 +153,11 @@ struct clp_rsp_query_pci_grp {
        u8                      :  6;
        u8 frame                :  1;
        u8 refresh              :  1;   /* TLB refresh mode */
-       u16 reserved2;
+       u16                     :  3;
+       u16 maxstbl             : 13;   /* Maximum store block size */
        u16 mui;
-       u16                     : 16;
+       u8 dtsm;                        /* Supported DT mask */
+       u8 reserved3;
        u16 maxfaal;
        u16                     :  4;
        u16 dnoi                : 12;
index d058c83..ee36779 100644 (file)
@@ -106,6 +106,8 @@ static void clp_store_query_pci_fngrp(struct zpci_dev *zdev,
        zdev->max_msi = response->noi;
        zdev->fmb_update = response->mui;
        zdev->version = response->version;
+       zdev->maxstbl = response->maxstbl;
+       zdev->dtsm = response->dtsm;
 
        switch (response->version) {
        case 1: