Skip to content

KVM: x86: Hyper-V hypercall fix and cleanups

Sean Christopherson kvm linux-arch linux-hyperv lkml 2 versions – Applied

Status from this message: Queued this one for stable, thanks.

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest8 patches 3 repliesApplied
  2. v28 patches 13 repliesSuperseded

Changes in v3 from the cover letter

- Collect reviews. [Vitaly]
- Add BUILD_BUG_ON() to protect KVM_HV_MAX_SPARSE_VCPU_SET_BITS. [Vitaly]
- Fix misc typos. [Vitaly]
- Opportunistically rename "cnt" to "rep_cnt" in tracepoint. [Vitaly]
- Drop var_cnt checks for debug hypercalls due to lack of documentation as to their expected behavior. [Vitaly]
- Tweak the changelog regarding the TLFS spec issue to reference the bug filed by Vitaly.

Patches in v3 Applied

#Subject and filesSizeRepliesApplied
1/8KVM: x86: Ignore sparse banks size for an "all CPUs", non-sparse IPI reqarch/x86/kvm/hyperv.c+5 -21 reply
2/8KVM: x86: Get the number of Hyper-V sparse banks from the VARHEAD fieldarch/x86/kvm/hyperv.c arch/x86/kvm/trace.h include/asm-generic/hyperv-tlfs.h+30 -200 replies
3/8KVM: x86: Refactor kvm_hv_flush_tlb() to reduce indentationarch/x86/kvm/hyperv.c+21 -190 replies
4/8KVM: x86: Add a helper to get the sparse VP_SET for IPIs and TLB flushesarch/x86/kvm/hyperv.c+16 -160 replies
5/8KVM: x86: Don't bother reading sparse banks that end up being ignoredarch/x86/kvm/hyperv.c+16 -30 replies
6/8KVM: x86: Shove vp_bitmap handling down into sparse_set_to_vcpu_mask()arch/x86/kvm/hyperv.c+38 -270 replies
7/8KVM: x86: Reject fixeds-size Hyper-V hypercalls with non-zero "var_cnt"arch/x86/kvm/hyperv.c+6 -61 reply
8/8KVM: x86: Add checks for reserved-to-zero Hyper-V hypercall fieldsarch/x86/kvm/hyperv.c include/asm-generic/hyperv-tlfs.h+11 -00 replies

Reviews trailers per patch

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

PatchVitaly Kuznetsov
1/8R-b
2/8R-b
3/8R-b
4/8R-b
5/8R-b
6/8R-b
7/8R-b
8/8R-b

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

Read the v3 thread

Cover letter [PATCH v3 0/8] KVM: x86: Hyper-V hypercall fix and cleanups

Fix a bug where KVM incorrectly skips an "all_cpus" IPI request, and misc cleanups and enhancements for KVM handling of Hyper-V hypercalls.

Based on kvm/queue, commit 1cf84614b04a ("KVM: x86: Exit to ...").

v3:
- Collect reviews. [Vitaly]
- Add BUILD_BUG_ON() to protect KVM_HV_MAX_SPARSE_VCPU_SET_BITS. [Vitaly]
- Fix misc typos. [Vitaly]
- Opportunistically rename "cnt" to "rep_cnt" in tracepoint. [Vitaly]
- Drop var_cnt checks for debug hypercalls due to lack of documentation as to their expected behavior. [Vitaly]
- Tweak the changelog regarding the TLFS spec issue to reference the bug filed by Vitaly.

v2: https://lore.kernel.org/all/[email protected]/

Sean Christopherson (8):
KVM: x86: Ignore sparse banks size for an "all CPUs", non-sparse IPI
req
KVM: x86: Get the number of Hyper-V sparse banks from the VARHEAD
field
KVM: x86: Refactor kvm_hv_flush_tlb() to reduce indentation
KVM: x86: Add a helper to get the sparse VP_SET for IPIs and TLB
flushes
KVM: x86: Don't bother reading sparse banks that end up being ignored
KVM: x86: Shove vp_bitmap handling down into sparse_set_to_vcpu_mask()
KVM: x86: Reject fixeds-size Hyper-V hypercalls with non-zero

    "var_cnt"

KVM: x86: Add checks for reserved-to-zero Hyper-V hypercall fields

 arch/x86/kvm/hyperv.c             | 175 ++++++++++++++++++------------
 arch/x86/kvm/trace.h              |  14 ++-
 include/asm-generic/hyperv-tlfs.h |   7 ++
 3 files changed, 123 insertions(+), 73 deletions(-)
Signature · 1 line
2.34.1.400.ga245620fadb-goog