All of lore.kernel.org
 help / color / mirror / Atom feed
From: Halil Pasic <pasic@linux.ibm.com>
To: Matthew Rosato <mjrosato@linux.ibm.com>
Cc: qemu-s390x@nongnu.org, farman@linux.ibm.com, thuth@redhat.com,
	clg@redhat.com, frankja@linux.ibm.com, borntraeger@linux.ibm.com,
	richard.henderson@linaro.org, david@redhat.com,
	iii@linux.ibm.com, qemu-devel@nongnu.org, qemu-stable@nongnu.org,
	Halil Pasic <pasic@linux.ibm.com>
Subject: Re: [PATCH v2 3/3] s390x/pci: drive ISM reset from subsystem reset
Date: Fri, 19 Jan 2024 22:07:39 +0100	[thread overview]
Message-ID: <20240119220739.0f5739b3.pasic@linux.ibm.com> (raw)
In-Reply-To: <20240118185151.265329-4-mjrosato@linux.ibm.com>

On Thu, 18 Jan 2024 13:51:51 -0500
Matthew Rosato <mjrosato@linux.ibm.com> wrote:

> diff --git a/hw/s390x/s390-virtio-ccw.c b/hw/s390x/s390-virtio-ccw.c
> index eaf61d3640..c99682b07d 100644
> --- a/hw/s390x/s390-virtio-ccw.c
> +++ b/hw/s390x/s390-virtio-ccw.c
> @@ -118,6 +118,14 @@ static void subsystem_reset(void)
>      DeviceState *dev;
>      int i;
>  
> +    /*
> +     * ISM firmware is sensitive to unexpected changes to the IOMMU, which can
> +     * occur during reset of the vfio-pci device (unmap of entire aperture).
> +     * Ensure any passthrough ISM devices are reset now, while CPUs are paused
> +     * but before vfio-pci cleanup occurs.
> +     */
> +    s390_pci_ism_reset();

Hm I'm not sure about special casing ISM in here. In my opinion the loop
below shall take care of all the reset.

For TYPE_AP_BRIDGE and TYPE_VIRTUAL_CSS_BRIDGE AFAIU a
device_cold_reset() on all objects of those types results in the resets
of objects that hang below these buses.

I guess this also happens for the S390PCIBusDevices, but not for the
actual PCI devices.

My understanding is that the entire PCI subsystem is to be reset when
a subsystem reset is performed.

I'm not familiar enough with our PCI emulation to know if a reset
to the TYPE_S390_PCI_HOST_BRIDGE is supposed to be sufficient to
accomplish that.

I have the feeling, I am missing something... Can you help me understand
this please?


> +
>      for (i = 0; i < ARRAY_SIZE(reset_dev_types); i++) {
>          dev = DEVICE(object_resolve_path_type("", reset_dev_types[i], NULL));
>          if (dev) 


  parent reply	other threads:[~2024-01-19 21:09 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-18 18:51 [PATCH v2 0/3] s390x/pci: fix ISM reset Matthew Rosato
2024-01-18 18:51 ` [PATCH v2 1/3] s390x/pci: avoid double enable/disable of aif Matthew Rosato
2024-01-18 18:51 ` [PATCH v2 2/3] s390x/pci: refresh fh before disabling aif Matthew Rosato
2024-01-18 18:51 ` [PATCH v2 3/3] s390x/pci: drive ISM reset from subsystem reset Matthew Rosato
2024-01-18 19:25   ` Eric Farman
2024-01-19 21:07   ` Halil Pasic [this message]
2024-01-22 15:06     ` Matthew Rosato
2024-01-23 11:48       ` Halil Pasic
2024-01-18 19:43 ` [PATCH v2 0/3] s390x/pci: fix ISM reset Cédric Le Goater
2024-01-22 10:18 ` Michael Tokarev
2024-01-22 10:31   ` Michael Tokarev
2024-01-22 10:49     ` Thomas Huth
2024-01-22 15:06       ` Matthew Rosato

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=20240119220739.0f5739b3.pasic@linux.ibm.com \
    --to=pasic@linux.ibm.com \
    --cc=borntraeger@linux.ibm.com \
    --cc=clg@redhat.com \
    --cc=david@redhat.com \
    --cc=farman@linux.ibm.com \
    --cc=frankja@linux.ibm.com \
    --cc=iii@linux.ibm.com \
    --cc=mjrosato@linux.ibm.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-s390x@nongnu.org \
    --cc=qemu-stable@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.