linux/arch/s390
Sean Christopherson df06dae3f2 KVM: Don't actually set a request when evicting vCPUs for GFN cache invd
Don't actually set a request bit in vcpu->requests when making a request
purely to force a vCPU to exit the guest.  Logging a request but not
actually consuming it would cause the vCPU to get stuck in an infinite
loop during KVM_RUN because KVM would see the pending request and bail
from VM-Enter to service the request.

Note, it's currently impossible for KVM to set KVM_REQ_GPC_INVALIDATE as
nothing in KVM is wired up to set guest_uses_pa=true.  But, it'd be all
too easy for arch code to introduce use of kvm_gfn_to_pfn_cache_init()
without implementing handling of the request, especially since getting
test coverage of MMU notifier interaction with specific KVM features
usually requires a directed test.

Opportunistically rename gfn_to_pfn_cache_invalidate_start()'s wake_vcpus
to evict_vcpus.  The purpose of the request is to get vCPUs out of guest
mode, it's supposed to _avoid_ waking vCPUs that are blocking.

Opportunistically rename KVM_REQ_GPC_INVALIDATE to be more specific as to
what it wants to accomplish, and to genericize the name so that it can
used for similar but unrelated scenarios, should they arise in the future.
Add a comment and documentation to explain why the "no action" request
exists.

Add compile-time assertions to help detect improper usage.  Use the inner
assertless helper in the one s390 path that makes requests without a
hardcoded request.

Cc: David Woodhouse <dwmw@amazon.co.uk>
Signed-off-by: Sean Christopherson <seanjc@google.com>
Message-Id: <20220223165302.3205276-1-seanjc@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2022-04-02 05:34:39 -04:00
..
appldata s390/appldata: use struct_size() helper 2020-06-29 16:32:34 +02:00
boot arch: decompressor: remove useless vmlinux.bin.all-y 2022-01-14 02:55:44 +09:00
configs s390: update defconfigs 2022-01-24 09:10:59 +01:00
crypto Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 2022-01-11 10:21:35 -08:00
hypfs s390/hypfs: include z/VM guests with access control group set 2022-01-26 18:42:39 +01:00
include KVM: s390: Fix, test and feature for 5.18 part 2 2022-03-15 17:19:02 -04:00
kernel s390/module: fix loading modules with a lot of relocations 2022-01-24 09:10:37 +01:00
kvm KVM: Don't actually set a request when evicting vCPUs for GFN cache invd 2022-04-02 05:34:39 -04:00
lib s390/uaccess: Add copy_from/to_user_key functions 2022-02-14 16:12:57 +01:00
mm Merge branch 'akpm' (patches from Andrew) 2022-01-15 20:37:06 +02:00
net bpf: Change value of MAX_TAIL_CALL_CNT from 32 to 33 2021-11-16 14:03:15 +01:00
pci Rework of the MSI interrupt infrastructure: 2022-01-13 09:05:29 -08:00
purgatory s390: enable KCSAN 2021-07-30 17:09:23 +02:00
tools s390/disassembler: update opcode table 2021-12-16 19:58:07 +01:00
Kbuild kbuild: use more subdir- for visiting subdirectories while cleaning 2021-10-24 13:49:46 +09:00
Kconfig s390/module: test loading modules with a lot of relocations 2022-01-24 09:10:59 +01:00
Kconfig.debug tracing: Refactor TRACE_IRQFLAGS_SUPPORT in Kconfig 2021-08-16 11:37:21 -04:00
Makefile s390/vdso: filter out -mstack-guard and -mstack-size 2021-11-16 12:29:19 +01:00