Skip to content

KVM: s390: vsie: Do not overwrite guest 3 state on early validity icpt

Gautam Gala kvm linux-kselftest linux-s390 lkml 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 0 repliesNew

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2KVM: s390: vsie: Do not overwrite guest 3 state on early validity icptarch/s390/kvm/s390/vsie.c+17 -70 replies
2/2KVM: s390: selftests: Add vsie validity interception teststools/testing/selftests/kvm/Makefile.kvm tools/testing/selftests/kvm/s390/vsie_validity_test.c+436 -00 replies

Reviews trailers per patch

1 of 2 patches has a Reviewed-by or Acked-by.

PatchChristian Borntraeger
1/2R-b
2/2

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH v1 0/2] KVM: s390: vsie: Do not overwrite guest 3 state on early validity icpt

If prepare_cpuflags() rejects the SCB provided by guest 2 with a validity interception, shadow_scb() still calls unshadow_scb(). That copies the guest state from the shadow SCB back into the guest 2 SCB, although the shadow SCB does not hold guest 3 state at that point. Guest 2 then sees its guest 3 state overwritten with zeroes (new or recycled vsie page) or with the state of the previous run (cached vsie page), without guest 3 having run.

Patch 1 copies back only the interception data in this case and clears the stale interception data (icptstatus, ipa, ipb) when a shadow SCB is reused.

Patch 2 adds a selftest for early and late validity interceptions.

Gautam Gala (2):
KVM: s390: vsie: Do not overwrite guest 3 state on early validity icpt
KVM: s390: selftests: Add vsie validity interception tests

 arch/s390/kvm/s390/vsie.c                     |  24 +-
 tools/testing/selftests/kvm/Makefile.kvm      |   1 +
 .../selftests/kvm/s390/vsie_validity_test.c   | 435 ++++++++++++++++++
 3 files changed, 453 insertions(+), 7 deletions(-)
 create mode 100644 tools/testing/selftests/kvm/s390/vsie_validity_test.c
Signature · 1 line
2.56.0