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 rena...
Showing
- Documentation/virt/kvm/vcpu-requests.rst 10 additions, 0 deletionsDocumentation/virt/kvm/vcpu-requests.rst
- arch/s390/kvm/kvm-s390.c 1 addition, 1 deletionarch/s390/kvm/kvm-s390.c
- include/linux/kvm_host.h 31 additions, 7 deletionsinclude/linux/kvm_host.h
- virt/kvm/kvm_main.c 2 additions, 1 deletionvirt/kvm/kvm_main.c
- virt/kvm/pfncache.c 11 additions, 7 deletionsvirt/kvm/pfncache.c
Please register or sign in to comment