From: Cornelia Huck <cohuck@redhat.com>
To: Eric Farman <farman@linux.ibm.com>,
qemu-devel@nongnu.org, qemu-s390x@nongnu.org
Cc: Thomas Huth <thuth@redhat.com>,
Matthew Rosato <mjrosato@linux.ibm.com>,
David Hildenbrand <david@redhat.com>,
Richard Henderson <richard.henderson@linaro.org>,
Eric Farman <farman@linux.ibm.com>,
Halil Pasic <pasic@linux.ibm.com>,
Christian Borntraeger <borntraeger@de.ibm.com>,
Alex Williamson <alex.williamson@redhat.com>
Subject: Re: [PATCH v3 1/4] s390x/css: Introduce an ESW struct
Date: Wed, 16 Jun 2021 11:46:17 +0200 [thread overview]
Message-ID: <87r1h2w39y.fsf@redhat.com> (raw)
In-Reply-To: <20210616014749.2460133-2-farman@linux.ibm.com>
On Wed, Jun 16 2021, Eric Farman <farman@linux.ibm.com> wrote:
> The Interrupt Response Block is comprised of several other
> structures concatenated together, but only the 12-byte
> Subchannel-Status Word (SCSW) is defined as a proper struct.
> Everything else is a simple array of 32-bit words.
>
> Let's define a proper struct for the 20-byte Extended-Status
> Word (ESW) so that we can make good decisions about the sense
> data that would go into the ECW area for virtual vs
> passthrough devices.
>
> Signed-off-by: Eric Farman <farman@linux.ibm.com>
> ---
> hw/s390x/css.c | 19 +++++++++++++------
> include/hw/s390x/ioinst.h | 12 +++++++++++-
> 2 files changed, 24 insertions(+), 7 deletions(-)
>
(...)
> diff --git a/include/hw/s390x/ioinst.h b/include/hw/s390x/ioinst.h
> index c6737a30d4..9613e0ccbb 100644
> --- a/include/hw/s390x/ioinst.h
> +++ b/include/hw/s390x/ioinst.h
> @@ -123,10 +123,20 @@ typedef struct SCHIB {
> uint8_t mda[4];
> } QEMU_PACKED SCHIB;
>
> +/* extended-status word */
> +typedef struct ESW {
> + uint32_t sublog;
> + uint32_t erw;
> + uint64_t f_addr;
> + uint32_t s_addr;
> +} QEMU_PACKED ESW;
Strictly speaking, that's a format 0 esw. Doesn't matter too much in the
end, I think:
- erw is always the same
- f_addr and s_addr are always 0 for the other formats
- 'sublog' is always a u32 with the lpum in the same place (which we
always set to 0x80 for virtual subchannels, as they have only one path)
> +
> +#define ESW_ERW_SENSE 0x01000000
> +
> /* interruption response block */
> typedef struct IRB {
> SCSW scsw;
> - uint32_t esw[5];
> + ESW esw;
> uint32_t ecw[8];
> uint32_t emw[8];
> } IRB;
next prev parent reply other threads:[~2021-06-16 9:47 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-16 1:47 [PATCH v3 0/4] s390x: Fix IRB sense data Eric Farman
2021-06-16 1:47 ` [PATCH v3 1/4] s390x/css: Introduce an ESW struct Eric Farman
2021-06-16 9:46 ` Cornelia Huck [this message]
2021-06-16 12:57 ` Eric Farman
2021-06-16 13:52 ` Cornelia Huck
2021-06-16 1:47 ` [PATCH v3 2/4] s390x/css: Split out the IRB sense data Eric Farman
2021-06-17 5:05 ` Thomas Huth
2021-06-16 1:47 ` [PATCH v3 3/4] s390x/css: Refactor IRB construction Eric Farman
2021-06-16 1:47 ` [PATCH v3 4/4] s390x/css: Add passthrough IRB Eric Farman
2021-06-16 9:59 ` Cornelia Huck
2021-06-16 13:03 ` Eric Farman
2021-06-16 13:53 ` Cornelia Huck
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=87r1h2w39y.fsf@redhat.com \
--to=cohuck@redhat.com \
--cc=alex.williamson@redhat.com \
--cc=borntraeger@de.ibm.com \
--cc=david@redhat.com \
--cc=farman@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.