]> git.proxmox.com Git - mirror_qemu.git/commitdiff
s390x/pci: add supported DT information to clp response
authorMatthew Rosato <mjrosato@linux.ibm.com>
Fri, 3 Dec 2021 14:27:06 +0000 (09:27 -0500)
committerThomas Huth <thuth@redhat.com>
Fri, 17 Dec 2021 08:12:37 +0000 (09:12 +0100)
The DTSM is a mask that specifies which I/O Address Translation designation
types are supported.  Today QEMU only supports DT=1.

Signed-off-by: Matthew Rosato <mjrosato@linux.ibm.com>
Reviewed-by: Eric Farman <farman@linux.ibm.com>
Reviewed-by: Pierre Morel <pmorel@linux.ibm.com>
Message-Id: <20211203142706.427279-5-mjrosato@linux.ibm.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
hw/s390x/s390-pci-bus.c
hw/s390x/s390-pci-inst.c
hw/s390x/s390-pci-vfio.c
include/hw/s390x/s390-pci-bus.h
include/hw/s390x/s390-pci-clp.h

index 1b51a728385bc1dd8f7d28d837f28f5914a19056..01b58ebc707e98ea878d2d8c1a07b87e465fd5a7 100644 (file)
@@ -782,6 +782,7 @@ static void s390_pci_init_default_group(void)
     resgrp->i = 128;
     resgrp->maxstbl = 128;
     resgrp->version = 0;
+    resgrp->dtsm = ZPCI_DTSM;
 }
 
 static void set_pbdev_info(S390PCIBusDevice *pbdev)
index 07bab85ce5726e733a9b523c1920a4b08f0482e1..6d400d41472e34db2218ae10bcd61c93864b90a5 100644 (file)
@@ -329,6 +329,7 @@ int clp_service_call(S390CPU *cpu, uint8_t r2, uintptr_t ra)
         stw_p(&resgrp->i, group->zpci_group.i);
         stw_p(&resgrp->maxstbl, group->zpci_group.maxstbl);
         resgrp->version = group->zpci_group.version;
+        resgrp->dtsm = group->zpci_group.dtsm;
         stw_p(&resgrp->hdr.rsp, CLP_RC_OK);
         break;
     }
index 2a153fa8c9e2ed5324416ed7c51a87eb3ce8f163..6f80a47e2990085c16c12b9a310acc15179905b3 100644 (file)
@@ -160,6 +160,7 @@ static void s390_pci_read_group(S390PCIBusDevice *pbdev,
         resgrp->i = cap->noi;
         resgrp->maxstbl = cap->maxstbl;
         resgrp->version = cap->version;
+        resgrp->dtsm = ZPCI_DTSM;
     }
 }
 
index 2727e7bdefbeec4504b9e225588d8c9d2fbe5a73..da3cde2bb4257ffba5b22e3f8fdb043399e6a4ed 100644 (file)
@@ -37,6 +37,7 @@
 #define ZPCI_MAX_UID 0xffff
 #define UID_UNDEFINED 0
 #define UID_CHECKING_ENABLED 0x01
+#define ZPCI_DTSM 0x40
 
 OBJECT_DECLARE_SIMPLE_TYPE(S390pciState, S390_PCI_HOST_BRIDGE)
 OBJECT_DECLARE_SIMPLE_TYPE(S390PCIBus, S390_PCI_BUS)
index 96b8e3f1331bf0a92603f75b9e3a2a47de757b33..cc8c8662b89b206d102f69c2fce193c1fe9b2c93 100644 (file)
@@ -163,7 +163,8 @@ typedef struct ClpRspQueryPciGrp {
     uint8_t fr;
     uint16_t maxstbl;
     uint16_t mui;
-    uint64_t reserved3;
+    uint8_t dtsm;
+    uint8_t reserved3[7];
     uint64_t dasm; /* dma address space mask */
     uint64_t msia; /* MSI address */
     uint64_t reserved4;