mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v1 0/2] KVM: s390: vsie: Do not overwrite guest 3 state on early validity icpt
@ 2026-11-19 12:49 Gautam Gala
  2026-11-19 12:49 ` [PATCH v1 1/2] " Gautam Gala
  2026-11-19 12:49 ` [PATCH v1 2/2] KVM: s390: selftests: Add vsie validity interception tests Gautam Gala
  0 siblings, 2 replies; 3+ messages in thread
From: Gautam Gala @ 2026-11-19 12:49 UTC (permalink / raw)
  To: kvm, linux-s390
  Cc: borntraeger, frankja, imbrenda, david, hca, gor, agordeev, svens,
	pbonzini, seanjc, shuah, ggala, linux-kselftest, linux-kernel

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

-- 
2.56.0


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

end of thread, other threads:[~2026-11-19 12:49 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-19 12:49 [PATCH v1 0/2] KVM: s390: vsie: Do not overwrite guest 3 state on early validity icpt Gautam Gala
2026-11-19 12:49 ` [PATCH v1 1/2] " Gautam Gala
2026-11-19 12:49 ` [PATCH v1 2/2] KVM: s390: selftests: Add vsie validity interception tests Gautam Gala

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

all inboxes | Powered by JetHome®