qemu-e2k/target/s390x
David Hildenbrand c35622387e hw/s390x/s390-skeys: lazy storage key enablement under TCG
Let's enable storage keys lazily under TCG, just as we do under KVM.
Only fairly old Linux versions actually make use of storage keys, so it
can be kind of wasteful to allocate quite some memory and track
changes and references if nobody cares.

We have to make sure to flush the TLB when enabling storage keys after
the VM was already running: otherwise it might happen that we don't
catch references or modifications afterwards.

Add proper documentation to all callbacks.

The kvm-unit-tests skey tests keeps on working with this change.

Signed-off-by: David Hildenbrand <david@redhat.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Message-Id: <20210903155514.44772-14-david@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
2021-09-06 16:24:05 +02:00
..
kvm target/s390x: move kvm files into kvm/ 2021-07-07 14:01:59 +02:00
tcg hw/s390x/s390-skeys: lazy storage key enablement under TCG 2021-09-06 16:24:05 +02:00
Kconfig meson: Introduce target-specific Kconfig 2021-07-09 18:21:34 +02:00
arch_dump.c target/s390x: rename internal.h to s390x-internal.h 2021-07-07 14:01:56 +02:00
cpu-dump.c target/s390x: split cpu-dump from helper.c 2021-07-07 14:01:58 +02:00
cpu-param.h tcg: Split out target/arch/cpu-param.h 2019-06-10 07:03:34 -07:00
cpu-qom.h qom: Remove module_obj_name parameter from OBJECT_DECLARE* macros 2020-09-18 14:12:32 -04:00
cpu-sysemu.c arch_init.h: Don't include arch_init.h unnecessarily 2021-08-26 17:02:00 +01:00
cpu.c target/s390x: move kvm files into kvm/ 2021-07-07 14:01:59 +02:00
cpu.h target/s390x: Expose load_psw and get_psw_mask to cpu.h 2021-06-21 08:48:21 +02:00
cpu_features.c s390x: pv: Fence additional unavailable SCLP facilities for PV guests 2020-12-21 18:11:32 +01:00
cpu_features.h s390x: pv: Fix diag318 PV fencing 2020-10-22 15:47:27 +02:00
cpu_features_def.h meson: rename .inc.h files to .h.inc 2020-08-21 06:18:35 -04:00
cpu_features_def.h.inc s390x/cpumodel: add 3931 and 3932 2021-07-07 13:57:25 +02:00
cpu_models.c target/s390x: split sysemu part of cpu models 2021-07-07 14:01:59 +02:00
cpu_models.h meson: convert target/s390x/gen-features.h 2020-08-21 06:30:17 -04:00
cpu_models_sysemu.c target/s390x: split sysemu part of cpu models 2021-07-07 14:01:59 +02:00
cpu_models_user.c target/s390x: split sysemu part of cpu models 2021-07-07 14:01:59 +02:00
diag.c target/s390x: move kvm files into kvm/ 2021-07-07 14:01:59 +02:00
gdbstub.c target/s390x: rename internal.h to s390x-internal.h 2021-07-07 14:01:56 +02:00
gen-features.c s390x/cpumodel: add 3931 and 3932 2021-07-07 13:57:25 +02:00
helper.c target/s390x: make helper.c sysemu-only 2021-07-07 14:01:59 +02:00
helper.h s390x/tcg: check for addressing exceptions for RRBE, SSKE and ISKE 2021-09-06 16:24:05 +02:00
interrupt.c target/s390x: move kvm files into kvm/ 2021-07-07 14:01:59 +02:00
ioinst.c s390x/ioinst: Fix wrong MSCH alignment check on little endian 2021-09-06 16:23:22 +02:00
machine.c target/s390x: move kvm files into kvm/ 2021-07-07 14:01:59 +02:00
meson.build target/s390x: split sysemu part of cpu models 2021-07-07 14:01:59 +02:00
mmu_helper.c hw/s390x/s390-skeys: lazy storage key enablement under TCG 2021-09-06 16:24:05 +02:00
s390x-internal.h s390x/mmu_helper: move address validation into mmu_translate*() 2021-09-06 16:24:05 +02:00
sigp.c target/s390x: rename internal.h to s390x-internal.h 2021-07-07 14:01:56 +02:00
trace-events target/s390x: move kvm files into kvm/ 2021-07-07 14:01:59 +02:00
trace.h trace: switch position of headers to what Meson requires 2020-08-21 06:18:24 -04:00