WSL2-Linux-Kernel/Documentation
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
..
ABI f2fs-for-5.17-rc1 2022-01-19 11:50:20 +02:00
PCI
RCU
accounting - A bunch of fixes: forced idle time accounting, utilization values 2022-01-23 17:35:27 +02:00
admin-guide KVM: x86/mmu: Remove MMU auditing 2022-02-18 13:46:23 -05:00
arc
arm Documentation: arm: marvell: Extend Avanta list 2022-01-27 11:22:34 -07:00
arm64 KVM: arm64: Workaround Cortex-A510's single-step and PAC trap errata 2022-02-03 09:22:30 +00:00
block
bpf
cdrom
core-api
cpu-freq
crypto
dev-tools docs/kselftest: clarify running mainline tests on stables 2022-01-27 10:56:09 -07:00
devicetree Networking fixes for 5.17-rc3, including fixes from bpf, netfilter, 2022-02-03 16:54:18 -08:00
doc-guide
driver-api Three small documentation fixes. 2022-01-22 09:02:57 +02:00
fault-injection
fb
features
filesystems netfs, cachefiles: Add a method to query presence of data in the cache 2022-02-01 10:29:18 -06:00
firmware-guide
firmware_class
fpga
gpu Revert "fbcon: Disable accelerated scrolling" 2022-02-02 15:15:11 +01:00
hid
hwmon
i2c
ia64
ide
iio
infiniband
input
isdn
kbuild
kernel-hacking docs: fix typo in Documentation/kernel-hacking/locking.rst 2022-01-27 11:22:33 -07:00
leds
litmus-tests
livepatch
locking
m68k
maintainer
mhi
mips
misc-devices
netlabel
networking
nios2
nvdimm
openrisc
parisc
pcmcia
power
powerpc
process Kbuild updates for v5.17 2022-01-19 11:15:19 +02:00
riscv riscv: Move KASAN mapping next to the kernel mapping 2022-01-19 17:54:04 -08:00
s390
scheduler
scsi
security
sh
sound
sparc
sphinx
sphinx-static
spi
staging Three small documentation fixes. 2022-01-22 09:02:57 +02:00
target
timers
tools docs: Hook the RTLA documents into the kernel docs build 2022-01-27 11:20:39 -07:00
trace Three small documentation fixes. 2022-01-22 09:02:57 +02:00
translations
tty
usb
userspace-api xen: update missing ioctl magic numers documentation 2022-02-03 08:24:34 +01:00
virt KVM: Don't actually set a request when evicting vCPUs for GFN cache invd 2022-04-02 05:34:39 -04:00
vm docs/vm: Fix typo in *harden* 2022-01-27 11:22:34 -07:00
w1
watchdog
x86
xtensa
.gitignore
COPYING-logo
Changes
CodingStyle
Kconfig
Makefile
SubmittingPatches
arch.rst
asm-annotations.rst
atomic_bitops.txt
atomic_t.txt
conf.py
docutils.conf
dontdiff
index.rst docs: Hook the RTLA documents into the kernel docs build 2022-01-27 11:20:39 -07:00
logo.gif
memory-barriers.txt
watch_queue.rst