Skip to content

VMX Capability MSRs

David Matlack kvm lkml 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest5 patches 9 repliesIn review
  2. v14 patches 17 repliesSuperseded

Changes in v3 from the cover letter

* Generate CR0_FIXED1 in addition to CR4_FIXED1
* Generate "non-true" capability MSRs from the "true" versions and remove "non-true" MSRs from struct nested_vmx.
* Disallow restore of CR{0,4}_FIXED1 and "non-true" MSRs since they are generated.

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5KVM: nVMX: generate non-true VMX MSRs based on true versionsarch/x86/kvm/vmx.c+19 -263 replies
2/5KVM: nVMX: support restore of VMX capability MSRsarch/x86/include/asm/vmx.h arch/x86/kvm/vmx.c+297 -240 replies
3/5KVM: nVMX: fix checks on CR{0,4} during virtual VMX operationarch/x86/kvm/vmx.c+53 -244 replies
4/5KVM: nVMX: generate MSR_IA32_CR{0,4}_FIXED1 from guest CPUIDarch/x86/kvm/vmx.c+52 -30 replies
5/5KVM: nVMX: load GUEST_EFER after GUEST_CR0 during emulated VM-entryarch/x86/kvm/vmx.c+9 -90 replies

Reviews trailers per patch

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

Read the v3 thread

Cover letter [PATCH v3 0/5] VMX Capability MSRs

This patchset adds support setting the VMX capability MSRs from userspace. This is required for migration of nested-capable VMs to different CPUs and KVM versions.

Patch 1 generates the non-true VMX MSRs using the true MSRs, which allows userspace to skip restoring them.

Patch 2 adds support for restoring the VMX capability MSRs.

Patches 3 and 4 make KVM's emulation of MSR_IA32_VMX_CR{0,4}_FIXED1 more accurate.

Patch 5 fixes a bug in emulated VM-entry that came up when testing patches 3 and 4.

Changes since v2:
* Generate CR0_FIXED1 in addition to CR4_FIXED1
* Generate "non-true" capability MSRs from the "true" versions and remove "non-true" MSRs from struct nested_vmx.
* Disallow restore of CR{0,4}_FIXED1 and "non-true" MSRs since they are generated.

Changes since v1:
* Support restoring less-capable versions of MSR_IA32_VMX_BASIC,

    MSR_IA32_VMX_CR{0,4}_FIXED{0,1}.

* Include VMX_INS_OUTS in MSR_IA32_VMX_BASIC initial value.

David Matlack (5):
KVM: nVMX: generate non-true VMX MSRs based on true versions
KVM: nVMX: support restore of VMX capability MSRs
KVM: nVMX: fix checks on CR{0,4} during virtual VMX operation
KVM: nVMX: generate MSR_IA32_CR{0,4}_FIXED1 from guest CPUID
KVM: nVMX: load GUEST_EFER after GUEST_CR0 during emulated VM-entry

 arch/x86/include/asm/vmx.h |  31 +++
 arch/x86/kvm/vmx.c         | 479 +++++++++++++++++++++++++++++++++++++--------
 2 files changed, 427 insertions(+), 83 deletions(-)
Signature · 1 line
2.8.0.rc3.226.g39d4020