public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v1 0/2] KVM: s390: Fix AR parameter in MEM_OP ioctl
@ 2024-02-09 20:45 Eric Farman
  2024-02-09 20:45 ` [PATCH v1 1/2] KVM: s390: load guest access registers " Eric Farman
  2024-02-09 20:45 ` [PATCH v1 2/2] KVM: s390: selftests: memop: add a simple AR test Eric Farman
  0 siblings, 2 replies; 6+ messages in thread
From: Eric Farman @ 2024-02-09 20:45 UTC (permalink / raw)
  To: Christian Borntraeger, Janosch Frank, Claudio Imbrenda,
	David Hildenbrand
  Cc: Heiko Carstens, Vasily Gorbik, Alexander Gordeev, Sven Schnelle,
	Paolo Bonzini, Shuah Khan, kvm, linux-s390, linux-kselftest,
	Eric Farman

Hi Christian, Janosch, Heiko,

Here is a pair of patches to replace the RFC I recently sent [1].

Patch 1 performs the host/guest access register swap that Christian
suggested (instead of a full sync_reg/store_reg process).

Patch 2 provides a selftest patch that exercises this scenario.
Applying patch 2 without patch 1 fails in the following way:

[eric@host linux]# ./tools/testing/selftests/kvm/s390x/memop 
TAP version 13
1..16
ok 1 simple copy
ok 2 generic error checks
ok 3 copy with storage keys
ok 4 cmpxchg with storage keys
ok 5 concurrently cmpxchg with storage keys
ok 6 copy with key storage protection override
ok 7 copy with key fetch protection
ok 8 copy with key fetch protection override
==== Test Assertion Failure ====
  s390x/memop.c:186: !r
  pid=5720 tid=5720 errno=4 - Interrupted system call
     1	0x00000000010042af: memop_ioctl at memop.c:186 (discriminator 3)
     2	0x0000000001006697: test_copy_access_register at memop.c:400 (discriminator 2)
     3	0x0000000001002aaf: main at memop.c:1181
     4	0x000003ffaec33a5b: ?? ??:0
     5	0x000003ffaec33b5d: ?? ??:0
     6	0x0000000001002ba9: _start at ??:?
  KVM_S390_MEM_OP failed, rc: 40 errno: 4 (Interrupted system call)

Thoughts on this approach?

Thanks,
Eric

[1] https://lore.kernel.org/r/20240131205832.2179029-1-farman@linux.ibm.com/

Eric Farman (2):
  KVM: s390: load guest access registers in MEM_OP ioctl
  KVM: s390: selftests: memop: add a simple AR test

 arch/s390/kvm/kvm-s390.c                  |  6 +++++
 tools/testing/selftests/kvm/s390x/memop.c | 28 +++++++++++++++++++++++
 2 files changed, 34 insertions(+)

-- 
2.40.1


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

end of thread, other threads:[~2024-02-13 17:31 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-02-09 20:45 [PATCH v1 0/2] KVM: s390: Fix AR parameter in MEM_OP ioctl Eric Farman
2024-02-09 20:45 ` [PATCH v1 1/2] KVM: s390: load guest access registers " Eric Farman
2024-02-12 10:21   ` Heiko Carstens
2024-02-12 11:52     ` Heiko Carstens
2024-02-13 17:31       ` Eric Farman
2024-02-09 20:45 ` [PATCH v1 2/2] KVM: s390: selftests: memop: add a simple AR test Eric Farman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox