Skip to content

VMX MSRs policy for Nested Virt: part 1

Sergey Dyasli xen-devel 6 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v6 Latest5 patches 4 repliesIn review
  2. v55 patches 9 repliesSuperseded
  3. v47 patches 7 repliesSuperseded
Earlier versions · 3
VersionPostedPatchesRepliesStatus
v36 patches8 repliesSuperseded
v25 patches5 repliesSuperseded
v16 patches16 repliesSuperseded

Changes in v6 from the cover letter

- Various shortenings of control bit names
- Added Reviewed-by: Andrew Cooper to pathes 3,4 and 5
- Other changes are provided on per-patch basis

Patches in v6 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5x86/msr: add VMX MSRs definitions and populate Raw domain policyxen/arch/x86/msr.c xen/include/asm-x86/msr.h xen/include/asm-x86/x86-defns.h+502 -01 reply
2/5x86/msr: add VMX MSRs into HVM_max domain policyxen/arch/x86/msr.c+135 -01 reply
3/5x86/cpuid: update signature of hvm_cr4_guest_valid_bits()xen/arch/x86/hvm/domain.c xen/arch/x86/hvm/hvm.c xen/arch/x86/hvm/svm/svmdebug.c +3 more+11 -111 reply
4/5x86/msr: update domain policy on CPUID policy changesxen/arch/x86/domctl.c xen/arch/x86/msr.c xen/include/asm-x86/msr.h+39 -00 replies
5/5x86/msr: handle VMX MSRs with guest_rd/wrmsr()xen/arch/x86/hvm/vmx/vmx.c xen/arch/x86/hvm/vmx/vvmx.c xen/arch/x86/msr.c +1 more+32 -1860 replies

Reviews trailers per patch

3 of 5 patches have a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchAndrew CooperKevin TianJan Beulich
SeriesA-b
1/5
2/5
3/5R-b R-b
4/5R-b
5/5R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.

Read the v6 thread

Cover letter [PATCH v6 0/5] VMX MSRs policy for Nested Virt: part 1

The end goal of having VMX MSRs policy is to be able to manage L1 VMX features. This patch series is the first part of this work. There is no functional change to what L1 sees in VMX MSRs at this point. But each domain will have a policy object which allows to sensibly query what VMX features the domain has. This will unblock some other nested virtualization work items.

Currently, when nested virt is enabled, the set of L1 VMX features is fixed and calculated by nvmx_msr_read_intercept() as an intersection between the full set of Xen's supported L1 VMX features, the set of actual H/W features and, for MSR_IA32_VMX_EPT_VPID_CAP, the set of features that Xen uses.

The above makes L1 VMX feature set inconsistent between different H/W and there is no ability to control what features are available to L1. The overall set of issues has much in common with CPUID policy.

Part 1 adds VMX MSRs into struct msr_domain_policy and initializes them during domain creation based on CPUID policy. In the future it should be possible to independently configure values of VMX MSRs for each domain.

v5 --> v6:
- Various shortenings of control bit names
- Added Reviewed-by: Andrew Cooper to pathes 3,4 and 5
- Other changes are provided on per-patch basis

Sergey Dyasli (5):
x86/msr: add VMX MSRs definitions and populate Raw domain policy x86/msr: add VMX MSRs into HVM_max domain policy x86/cpuid: update signature of hvm_cr4_guest_valid_bits() x86/msr: update domain policy on CPUID policy changes x86/msr: handle VMX MSRs with guest_rd/wrmsr()

 xen/arch/x86/domctl.c              |   1 +
 xen/arch/x86/hvm/domain.c          |   3 +-
 xen/arch/x86/hvm/hvm.c             |   7 +-
 xen/arch/x86/hvm/svm/svmdebug.c    |   4 +-
 xen/arch/x86/hvm/vmx/vmx.c         |  10 +-
 xen/arch/x86/hvm/vmx/vvmx.c        | 178 --------------------
 xen/arch/x86/msr.c                 | 320 +++++++++++++++++++++++++++++++++++
 xen/include/asm-x86/hvm/hvm.h      |   2 +-
 xen/include/asm-x86/hvm/vmx/vvmx.h |   2 -
 xen/include/asm-x86/msr.h          | 333 +++++++++++++++++++++++++++++++++++++
 xen/include/asm-x86/x86-defns.h    |  54 ++++++
 11 files changed, 718 insertions(+), 196 deletions(-)
Signature · 7 lines
2.14.1


_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel