Skip to content

RFC KVM: Restore original behavior of kvm.halt_poll_ns

David Matlack kvm 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest3 patches 11 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3KVM: Cap vcpu->halt_poll_ns before halting rather than aftervirt/kvm/kvm_main.c+6 -42 replies
2/3KVM: Avoid re-reading kvm->max_halt_poll_ns during halt-pollingvirt/kvm/kvm_main.c+15 -62 replies
3/3KVM: Obey kvm.halt_poll_ns in VMs not using KVM_CAP_HALT_POLLinclude/linux/kvm_host.h virt/kvm/kvm_main.c+25 -37 replies

Reviews trailers per patch

All 3 patches have a Reviewed-by or Acked-by.

PatchChristian BorntraegerYanan Wang
1/3A-b R-b
2/3A-b R-b
3/3T-b R-b R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [RFC PATCH 0/3] KVM: Restore original behavior of kvm.halt_poll_ns

This series restores the original behavior of the module parameter kvm.halt_poll_ns in VMs not using KVM_CAP_HALT_POLL. This should allow admins to administer VMs not using KVM_CAP_HALT_POLL just as they were before this capability was introduced.

VMs that use KVM_CAP_HALT_POLL can be administered through userspace changes that invoke KVM_CAP_HALT_POLL (i.e. the capability can be invoked multiple times to change the max halt poll time).

If any admin needs a system-wide override of KVM_CAP_HALT_POLL we can add that through a new mechanism (e.g. a new bool module parameter).

Compile-tested only. I want to get feedback from Christian and Yunan if this approach would address their concerns.

Cc Christian Borntraeger <[email protected]>
Cc Yanan Wang <[email protected]>

David Matlack (3):
KVM: Cap vcpu->halt_poll_ns before halting rather than after
KVM: Avoid re-reading kvm->max_halt_poll_ns during halt-polling
KVM: Obey kvm.halt_poll_ns in VMs not using KVM_CAP_HALT_POLL

 include/linux/kvm_host.h |  1 +
 virt/kvm/kvm_main.c      | 52 ++++++++++++++++++++++++++++++++--------
 2 files changed, 43 insertions(+), 10 deletions(-)

base-commit: d663b8a285986072428a6a145e5994bc275df994

Signature · 1 line
2.38.1.431.g37b22c650d-goog