From: Janis Schoetterl-Glausch <scgl@linux.ibm.com>
To: Thomas Huth <thuth@redhat.com>,
Janosch Frank <frankja@linux.ibm.com>,
Claudio Imbrenda <imbrenda@linux.ibm.com>
Cc: Janis Schoetterl-Glausch <scgl@linux.ibm.com>,
David Hildenbrand <david@redhat.com>,
kvm@vger.kernel.org, linux-s390@vger.kernel.org
Subject: [kvm-unit-tests PATCH v2 0/2] s390x: Avoid gcc 12 warnings
Date: Fri, 20 May 2022 16:05:44 +0200 [thread overview]
Message-ID: <20220520140546.311193-1-scgl@linux.ibm.com> (raw)
gcc 12 warns if a memory operand to inline asm points to memory in the
first 4k bytes. However, in our case, these operands are fine, either
because we actually want to use that memory, or expect and handle the
resulting exception.
v1 -> v2
* replace mechanism, don't use pragmas, instead use an extern symbol so
gcc cannot conclude that the pointer is <4k
This new extern symbol refers to the lowcore. As a result, code
generation for lowcore accesses becomes worse.
Alternatives:
* Don't use extern symbol for lowcore, just for problematic pointers
* Hide value from gcc via inline asm
* Disable the warning globally
* Use memory clobber instead of memory output
Use address in register input instead of memory input
(may require WRITE_ONCE)
* Don't use gcc 12.0, with newer versions --param=min-pagesize=0 might
avoid the problem
Janis Schoetterl-Glausch (2):
s390x: Introduce symbol for lowcore and use it
s390x: Fix gcc 12 warning about array bounds
lib/s390x/asm/arch_def.h | 2 ++
lib/s390x/asm/facility.h | 4 +--
lib/s390x/asm/mem.h | 4 +++
lib/s390x/css.h | 2 --
lib/s390x/css_lib.c | 12 ++++----
lib/s390x/fault.c | 10 +++----
lib/s390x/interrupt.c | 61 +++++++++++++++++++-------------------
lib/s390x/mmu.c | 3 +-
s390x/flat.lds | 1 +
s390x/snippets/c/flat.lds | 1 +
s390x/css.c | 4 +--
s390x/diag288.c | 4 +--
s390x/edat.c | 5 ++--
s390x/emulator.c | 15 +++++-----
s390x/mvpg.c | 7 ++---
s390x/sclp.c | 3 +-
s390x/skey.c | 2 +-
s390x/skrf.c | 11 +++----
s390x/smp.c | 23 +++++++-------
s390x/snippets/c/spec_ex.c | 5 ++--
20 files changed, 83 insertions(+), 96 deletions(-)
base-commit: 8719e8326101c1be8256617caf5835b57e819339
--
2.33.1
next reply other threads:[~2022-05-20 14:07 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-20 14:05 Janis Schoetterl-Glausch [this message]
2022-05-20 14:05 ` [kvm-unit-tests PATCH v2 1/2] s390x: Introduce symbol for lowcore and use it Janis Schoetterl-Glausch
2022-05-24 7:42 ` Claudio Imbrenda
2022-06-03 13:12 ` Thomas Huth
2022-05-20 14:05 ` [kvm-unit-tests PATCH v2 2/2] s390x: Fix gcc 12 warning about array bounds Janis Schoetterl-Glausch
2022-05-24 7:31 ` Claudio Imbrenda
2022-05-24 9:35 ` Janis Schoetterl-Glausch
2022-05-24 7:39 ` [kvm-unit-tests PATCH v2 0/2] s390x: Avoid gcc 12 warnings Claudio Imbrenda
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=20220520140546.311193-1-scgl@linux.ibm.com \
--to=scgl@linux.ibm.com \
--cc=david@redhat.com \
--cc=frankja@linux.ibm.com \
--cc=imbrenda@linux.ibm.com \
--cc=kvm@vger.kernel.org \
--cc=linux-s390@vger.kernel.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.