All of lore.kernel.org
 help / color / mirror / Atom feed
From: Niklas Schnelle <schnelle@linux.ibm.com>
To: Matthew Rosato <mjrosato@linux.ibm.com>, qemu-s390x@nongnu.org
Cc: farman@linux.ibm.com, thuth@redhat.com, pasic@linux.ibm.com,
	borntraeger@linux.ibm.com, richard.henderson@linaro.org,
	david@redhat.com, iii@linux.ibm.com, clegoate@redhat.com,
	qemu-devel@nongnu.org
Subject: Re: [PATCH v4 2/2] s390x/pci: indicate QEMU supports relaxed translation for passthrough
Date: Mon, 10 Feb 2025 14:29:20 +0100	[thread overview]
Message-ID: <00b2948203d2e5586543d58153ef5bc07ef4dd67.camel@linux.ibm.com> (raw)
In-Reply-To: <20250207205613.474092-3-mjrosato@linux.ibm.com>

On Fri, 2025-02-07 at 15:56 -0500, Matthew Rosato wrote:
> Specifying this bit in the guest CLP response indicates that the guest
> can optionally choose to skip translation and instead use
> identity-mapped operations.
> 
> Signed-off-by: Matthew Rosato <mjrosato@linux.ibm.com>
> ---
>  hw/s390x/s390-pci-vfio.c        | 5 ++++-
>  include/hw/s390x/s390-pci-clp.h | 1 +
>  2 files changed, 5 insertions(+), 1 deletion(-)
> 
> diff --git a/hw/s390x/s390-pci-vfio.c b/hw/s390x/s390-pci-vfio.c
> index 443e222912..6236ac7f1e 100644
> --- a/hw/s390x/s390-pci-vfio.c
> +++ b/hw/s390x/s390-pci-vfio.c
> @@ -238,8 +238,11 @@ static void s390_pci_read_group(S390PCIBusDevice *pbdev,
>          pbdev->pci_group = s390_group_create(pbdev->zpci_fn.pfgid, start_gid);
>  
>          resgrp = &pbdev->pci_group->zpci_group;
> +        if (pbdev->rtr_avail) {
> +            resgrp->fr |= CLP_RSP_QPCIG_MASK_RTR;
> +        }
>          if (cap->flags & VFIO_DEVICE_INFO_ZPCI_FLAG_REFRESH) {
> -            resgrp->fr = 1;
> +            resgrp->fr |= CLP_RSP_QPCIG_MASK_REFRESH;
>          }
>          resgrp->dasm = cap->dasm;
>          resgrp->msia = cap->msi_addr;
> diff --git a/include/hw/s390x/s390-pci-clp.h b/include/hw/s390x/s390-pci-clp.h
> index 03b7f9ba5f..6a635d693b 100644
> --- a/include/hw/s390x/s390-pci-clp.h
> +++ b/include/hw/s390x/s390-pci-clp.h
> @@ -158,6 +158,7 @@ typedef struct ClpRspQueryPciGrp {
>  #define CLP_RSP_QPCIG_MASK_NOI 0xfff
>      uint16_t i;
>      uint8_t version;
> +#define CLP_RSP_QPCIG_MASK_RTR     0x20
>  #define CLP_RSP_QPCIG_MASK_FRAME   0x2
>  #define CLP_RSP_QPCIG_MASK_REFRESH 0x1
>      uint8_t fr;

Looks good to me!

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


      reply	other threads:[~2025-02-10 13:30 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-07 20:56 [PATCH v4 0/2] s390x/pci: relax I/O address translation requirement Matthew Rosato
2025-02-07 20:56 ` [PATCH v4 1/2] s390x/pci: add support for guests that request direct mapping Matthew Rosato
2025-02-10 13:12   ` Niklas Schnelle
2025-02-10 13:26     ` Cédric Le Goater
2025-02-10 14:52   ` David Hildenbrand
2025-02-07 20:56 ` [PATCH v4 2/2] s390x/pci: indicate QEMU supports relaxed translation for passthrough Matthew Rosato
2025-02-10 13:29   ` Niklas Schnelle [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=00b2948203d2e5586543d58153ef5bc07ef4dd67.camel@linux.ibm.com \
    --to=schnelle@linux.ibm.com \
    --cc=borntraeger@linux.ibm.com \
    --cc=clegoate@redhat.com \
    --cc=david@redhat.com \
    --cc=farman@linux.ibm.com \
    --cc=iii@linux.ibm.com \
    --cc=mjrosato@linux.ibm.com \
    --cc=pasic@linux.ibm.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-s390x@nongnu.org \
    --cc=richard.henderson@linaro.org \
    --cc=thuth@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.