Skip to content

RFC KVM: nVMX: enlightened VMCS initial implementation

Vitaly Kuznetsov kvm lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest7 patches 13 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/7KVM: x86: rename HV_X64_MSR_APIC_ASSIST_PAGE to HV_X64_MSR_VP_ASSIST_PAGEarch/x86/include/uapi/asm/hyperv.h arch/x86/kvm/hyperv.c arch/x86/kvm/lapic.h +1 more+11 -110 replies
2/7KVM: nVMX: modify vmcs12 fields to match Hyper-V enlightened VMCSarch/x86/kvm/vmx.c+187 -1348 replies
3/7KVM: nVMX: add I/O exit ECX, ESI, EDI, EIP vmcs12 fieldsarch/x86/include/asm/vmx.h arch/x86/kvm/vmx.c+12 -10 replies
4/7KVM: hyperv: define VP assist page structure and add helpersarch/x86/include/uapi/asm/hyperv.h arch/x86/kvm/hyperv.c arch/x86/kvm/hyperv.h +3 more+39 -60 replies
5/7KVM: nVMX: add KVM_CAP_HYPERV_ENLIGHTENED_VMCS capabilityarch/x86/include/asm/kvm_host.h arch/x86/kvm/svm.c arch/x86/kvm/vmx.c +2 more+79 -00 replies
6/7KVM: nVMX: add enlightened VMCS statearch/x86/kvm/vmx.c+52 -80 replies
7/7KVM: nVMX: implement enlightened VMPTRLDarch/x86/kvm/vmx.c+28 -00 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH RFC 0/7] KVM: nVMX: enlightened VMCS initial implementation

The original author of these patches does no longer work at Red Hat, I agreed to take this over and send upstream. Here is his original description:

"Makes KVM implement the enlightened VMCS feature per Hyper-V TLFS 5.0b. I've measured about %5 improvement in cost of a nested VM exit (Hyper-V enabled Windows Server 2016 nested in KVM)."

This is just an initial implementation. By leveraging clean fields mask we can further improve performance. I'm also interested in implementing the other part of the feature: consuming enlightened VMCS when KVM is running on top of Hyper-V.

Ladi Prosek (7):
KVM: x86: rename HV_X64_MSR_APIC_ASSIST_PAGE to

    HV_X64_MSR_VP_ASSIST_PAGE

KVM: nVMX: modify vmcs12 fields to match Hyper-V enlightened VMCS
KVM: nVMX: add I/O exit ECX, ESI, EDI, EIP vmcs12 fields
KVM: hyperv: define VP assist page structure and add helpers
KVM: nVMX: add KVM_CAP_HYPERV_ENLIGHTENED_VMCS capability
KVM: nVMX: add enlightened VMCS state
KVM: nVMX: implement enlightened VMPTRLD

 arch/x86/include/asm/kvm_host.h    |   3 +
 arch/x86/include/asm/vmx.h         |   4 +
 arch/x86/include/uapi/asm/hyperv.h |  20 +-
 arch/x86/kvm/hyperv.c              |  31 ++-
 arch/x86/kvm/hyperv.h              |   4 +
 arch/x86/kvm/lapic.c               |   4 +-
 arch/x86/kvm/lapic.h               |   4 +-
 arch/x86/kvm/svm.c                 |   9 +
 arch/x86/kvm/vmx.c                 | 467 ++++++++++++++++++++++++++-----------
 arch/x86/kvm/x86.c                 |  19 +-
 include/uapi/linux/kvm.h           |   1 +
 11 files changed, 407 insertions(+), 159 deletions(-)
Signature · 1 line
2.14.3