[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 4/4] s390x/pci: add supported DT information to clp response

From: Matthew Rosato
Subject: Re: [PATCH 4/4] s390x/pci: add supported DT information to clp response
Date: Fri, 3 Dec 2021 07:03:20 -0500
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.3.0

On 12/3/21 4:33 AM, Pierre Morel wrote:

On 12/2/21 17:41, Matthew Rosato wrote:
The DTSM is a mask that specifies which I/O Address Translation designation
types are supported.  A linux guest today does not look at this field but

Even Linux is the most used guest it is not the only one so may be not mention Linux here.


could in the future; let's advertise what QEMU actually supports.

Signed-off-by: Matthew Rosato <mjrosato@linux.ibm.com>
  hw/s390x/s390-pci-bus.c         | 1 +
  hw/s390x/s390-pci-vfio.c        | 1 +
  include/hw/s390x/s390-pci-bus.h | 1 +
  include/hw/s390x/s390-pci-clp.h | 3 ++-
  4 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/hw/s390x/s390-pci-bus.c b/hw/s390x/s390-pci-bus.c
index 1b51a72838..01b58ebc70 100644
--- a/hw/s390x/s390-pci-bus.c
+++ b/hw/s390x/s390-pci-bus.c
@@ -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)
diff --git a/hw/s390x/s390-pci-vfio.c b/hw/s390x/s390-pci-vfio.c
index 2a153fa8c9..6f80a47e29 100644
--- a/hw/s390x/s390-pci-vfio.c
+++ b/hw/s390x/s390-pci-vfio.c
@@ -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;

Is it safe for VFIO whith interpretation?
Shouldn't we extend the capability and use the host DTSM in this case?

We will do exactly this when there is an interpretation series.

For the current intercept-based code, QEMU only supports DT 1 for passthrough regardless of what the host is supporting and rejects all else (see check in reg_ioat)

reply via email to

[Prev in Thread] Current Thread [Next in Thread]