From: Nina Schoetterl-Glausch <nsg@linux.ibm.com>
To: Claudio Imbrenda <imbrenda@linux.ibm.com>,
Janosch Frank <frankja@linux.ibm.com>,
Thomas Huth <thuth@redhat.com>
Cc: Nina Schoetterl-Glausch <nsg@linux.ibm.com>,
David Hildenbrand <david@redhat.com>,
kvm@vger.kernel.org, linux-s390@vger.kernel.org
Subject: [kvm-unit-tests PATCH v4 0/3] s390x: Add misaligned instruction tests
Date: Fri, 17 Mar 2023 14:32:50 +0100 [thread overview]
Message-ID: <20230317133253.965010-1-nsg@linux.ibm.com> (raw)
Instructions on s390 must be halfword aligned.
Add two tests for that.
These currently fail when using TCG, Ilya Leoshkevich <iii@linux.ibm.com>
posted fixes to the qemu mailing list.
v3 -> v4:
* zero whole register with xgr (thanks Janosch)
* pick up tags (thanks Janosch)
v2 -> v3:
* pick up R-b (thanks Janosch)
* use br instead of bcr (thanks Claudio)
* use text section instead of rodata for ex target (thanks Claudio)
* fix label position (thanks Claudio)
v1 -> v2:
* rebase
* use PSW macros
* simplify odd psw test (thanks Claudio)
* rename some identifiers
* pick up R-b (thanks Claudio)
Nina Schoetterl-Glausch (3):
s390x/spec_ex: Use PSW macro
s390x/spec_ex: Add test introducing odd address into PSW
s390x/spec_ex: Add test of EXECUTE with odd target address
s390x/spec_ex.c | 85 +++++++++++++++++++++++++++++++++++++++++++------
1 file changed, 76 insertions(+), 9 deletions(-)
Range-diff against v3:
1: 6ae1eb7d = 1: c00f8aa2 s390x/spec_ex: Use PSW macro
2: a0d02438 ! 2: d9e3f6e0 s390x/spec_ex: Add test introducing odd address into PSW
@@ Commit message
the odd address.
Add a test for this.
+ Acked-by: Janosch Frank <frankja@linux.ibm.com>
Signed-off-by: Nina Schoetterl-Glausch <nsg@linux.ibm.com>
## s390x/spec_ex.c ##
@@ s390x/spec_ex.c: static int psw_bit_12_is_1(void)
+
+ expect_invalid_psw(odd);
+ fixup_psw.mask = extract_psw_mask();
-+ asm volatile ( "xr %%r0,%%r0\n"
++ asm volatile ( "xgr %%r0,%%r0\n"
+ " larl %%r1,0f\n"
+ " stg %%r1,%[fixup_addr]\n"
+ " lpswe %[odd_psw]\n"
3: e771deeb ! 3: 7ea75611 s390x/spec_ex: Add test of EXECUTE with odd target address
@@ Commit message
specification exception occurs.
Add a test for this.
+ Reviewed-by: Janosch Frank <frankja@linux.ibm.com>
Signed-off-by: Nina Schoetterl-Glausch <nsg@linux.ibm.com>
## s390x/spec_ex.c ##
base-commit: 20de8c3b54078ebc3df0b47344f9ce55bf52b7a5
--
2.39.1
next reply other threads:[~2023-03-17 13:33 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-17 13:32 Nina Schoetterl-Glausch [this message]
2023-03-17 13:32 ` [kvm-unit-tests PATCH v4 1/3] s390x/spec_ex: Use PSW macro Nina Schoetterl-Glausch
2023-03-17 13:32 ` [kvm-unit-tests PATCH v4 2/3] s390x/spec_ex: Add test introducing odd address into PSW Nina Schoetterl-Glausch
2023-03-17 13:32 ` [kvm-unit-tests PATCH v4 3/3] s390x/spec_ex: Add test of EXECUTE with odd target address Nina Schoetterl-Glausch
2023-04-03 15:38 ` Thomas Huth
2023-04-04 8:57 ` Nina Schoetterl-Glausch
2023-03-17 14:41 ` [kvm-unit-tests PATCH v4 0/3] s390x: Add misaligned instruction tests 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=20230317133253.965010-1-nsg@linux.ibm.com \
--to=nsg@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox