linux-s390.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [kvm-unit-tests PATCH v3 0/3] s390x: Add misaligned instruction tests
@ 2023-03-15 15:54 Nina Schoetterl-Glausch
  2023-03-15 15:54 ` [kvm-unit-tests PATCH v3 1/3] s390x/spec_ex: Use PSW macro Nina Schoetterl-Glausch
                   ` (2 more replies)
  0 siblings, 3 replies; 13+ messages in thread
From: Nina Schoetterl-Glausch @ 2023-03-15 15:54 UTC (permalink / raw)
  To: Claudio Imbrenda, Janosch Frank, Thomas Huth
  Cc: Nina Schoetterl-Glausch, David Hildenbrand, kvm, linux-s390

Instructions on s390 must be halfword aligned.
Add two tests for that.
These currently fail when using TCG.

v3 -> v2:
 * 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 v2:
1:  d82f4fb6 ! 1:  6ae1eb7d s390x/spec_ex: Use PSW macro
    @@ Commit message
         Replace explicit psw definition by PSW macro.
         No functional change intended.
     
    +    Reviewed-by: Janosch Frank <frankja@linux.ibm.com>
         Signed-off-by: Nina Schoetterl-Glausch <nsg@linux.ibm.com>
     
      ## s390x/spec_ex.c ##
2:  e537797f ! 2:  a0d02438 s390x/spec_ex: Add test introducing odd address into PSW
    @@ s390x/spec_ex.c: static int psw_bit_12_is_1(void)
     +"	. = . + 1\n"
     +"misaligned_code:\n"
     +"	larl	%r0,0\n"
    -+"	bcr	0xf,%r1\n"
    ++"	br	%r1\n"
     +);
     +
     +static int psw_odd_address(void)
3:  dc552880 ! 3:  e771deeb s390x/spec_ex: Add test of EXECUTE with odd target address
    @@ s390x/spec_ex.c: static int short_psw_bit_12_is_0(void)
     +	uint64_t pre_target_addr;
     +	int to = 0, from = 0x0dd;
     +
    -+	asm volatile ( ".pushsection .rodata\n"
    -+		"pre_odd_ex_target:\n"
    ++	asm volatile ( ".pushsection .text.ex_odd\n"
     +		"	.balign	2\n"
    ++		"pre_odd_ex_target:\n"
     +		"	. = . + 1\n"
     +		"	lr	%[to],%[from]\n"
     +		"	.popsection\n"

base-commit: e3c5c3ef2524c58023073c0fadde2e8ae3c04ec6
-- 
2.39.1


^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2023-03-20 12:21 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-15 15:54 [kvm-unit-tests PATCH v3 0/3] s390x: Add misaligned instruction tests Nina Schoetterl-Glausch
2023-03-15 15:54 ` [kvm-unit-tests PATCH v3 1/3] s390x/spec_ex: Use PSW macro Nina Schoetterl-Glausch
2023-03-15 15:54 ` [kvm-unit-tests PATCH v3 2/3] s390x/spec_ex: Add test introducing odd address into PSW Nina Schoetterl-Glausch
2023-03-17  9:26   ` Janosch Frank
2023-03-17 10:51     ` Nina Schoetterl-Glausch
2023-03-17 12:21       ` Janosch Frank
2023-03-15 15:54 ` [kvm-unit-tests PATCH v3 3/3] s390x/spec_ex: Add test of EXECUTE with odd target address Nina Schoetterl-Glausch
2023-03-17  9:51   ` Janosch Frank
2023-03-17 14:09   ` Thomas Huth
2023-03-17 14:11     ` Thomas Huth
2023-03-17 15:36       ` Claudio Imbrenda
2023-03-17 16:37         ` Thomas Huth
2023-03-20 12:21           ` Janosch Frank

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).