From: Janosch Frank <frankja@linux.ibm.com>
To: kvm@vger.kernel.org
Cc: linux-s390@vger.kernel.org, imbrenda@linux.ibm.com,
thuth@redhat.com, david@redhat.com, nsg@linux.ibm.com,
nrb@linux.ibm.com
Subject: [kvm-unit-tests PATCH v2 1/5] lib: s390x: sigp: Dirty CC before sigp execution
Date: Wed, 31 Jan 2024 07:44:23 +0000 [thread overview]
Message-ID: <20240131074427.70871-2-frankja@linux.ibm.com> (raw)
In-Reply-To: <20240131074427.70871-1-frankja@linux.ibm.com>
Dirtying the CC allows us to find missing CC changes when sigp is
emulated.
Signed-off-by: Janosch Frank <frankja@linux.ibm.com>
---
lib/s390x/asm/sigp.h | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/lib/s390x/asm/sigp.h b/lib/s390x/asm/sigp.h
index 61d2c625..4eae95d0 100644
--- a/lib/s390x/asm/sigp.h
+++ b/lib/s390x/asm/sigp.h
@@ -49,13 +49,17 @@ static inline int sigp(uint16_t addr, uint8_t order, unsigned long parm,
uint32_t *status)
{
register unsigned long reg1 asm ("1") = parm;
+ uint64_t bogus_cc = SIGP_CC_NOT_OPERATIONAL;
int cc;
asm volatile(
+ " tmll %[bogus_cc],3\n"
" sigp %1,%2,0(%3)\n"
" ipm %0\n"
" srl %0,28\n"
- : "=d" (cc), "+d" (reg1) : "d" (addr), "a" (order) : "cc");
+ : "=d" (cc), "+d" (reg1)
+ : "d" (addr), "a" (order), [bogus_cc] "d" (bogus_cc)
+ : "cc");
if (status)
*status = reg1;
return cc;
--
2.40.1
next prev parent reply other threads:[~2024-01-31 7:44 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-31 7:44 [kvm-unit-tests PATCH v2 0/5] s390x: Dirty cc before executing tested instructions Janosch Frank
2024-01-31 7:44 ` Janosch Frank [this message]
2024-01-31 11:56 ` [kvm-unit-tests PATCH v2 1/5] lib: s390x: sigp: Dirty CC before sigp execution Claudio Imbrenda
2024-01-31 14:16 ` Janosch Frank
2024-01-31 7:44 ` [kvm-unit-tests PATCH v2 2/5] lib: s390x: uv: Dirty CC before uvc execution Janosch Frank
2024-01-31 11:50 ` Claudio Imbrenda
2024-01-31 7:44 ` [kvm-unit-tests PATCH v2 3/5] lib: s390x: css: Dirty CC before css instructions Janosch Frank
2024-01-31 7:44 ` [kvm-unit-tests PATCH v2 4/5] s390x: mvpg: Dirty CC before mvpg execution Janosch Frank
2024-01-31 7:44 ` [kvm-unit-tests PATCH v2 5/5] s390x: sclp: Dirty CC before sclp execution Janosch Frank
2024-02-01 17:49 ` [kvm-unit-tests PATCH v2 0/5] s390x: Dirty cc before executing tested instructions 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=20240131074427.70871-2-frankja@linux.ibm.com \
--to=frankja@linux.ibm.com \
--cc=david@redhat.com \
--cc=imbrenda@linux.ibm.com \
--cc=kvm@vger.kernel.org \
--cc=linux-s390@vger.kernel.org \
--cc=nrb@linux.ibm.com \
--cc=nsg@linux.ibm.com \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox