All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v1 0/6] VMX MSRs policy for Nested Virt: part 1
@ 2017-06-26 10:44 Sergey Dyasli
  2017-06-26 10:44 ` [PATCH v1 1/6] vmx: add struct vmx_msr_policy Sergey Dyasli
                   ` (6 more replies)
  0 siblings, 7 replies; 23+ messages in thread
From: Sergey Dyasli @ 2017-06-26 10:44 UTC (permalink / raw)
  To: xen-devel
  Cc: Andrew Cooper, Kevin Tian, Jan Beulich, Jun Nakajima, Sergey Dyasli

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 virt 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 introduces struct vmx_msr_policy and the following instances:

* Raw policy (raw_vmx_msr_policy) -- the actual contents of H/W VMX MSRs
* HVM max policy (hvm_max_vmx_msr_policy) -- the end result of
                               nvmx_msr_read_intercept() on current H/W
* Per-domain policy (d->arch.vmx_msr) -- the copy of HVM max policy
                                         (for now)

There is no "Host policy" because Xen already has a set of variables
(vmx_pin_based_exec_control and others) which represent the set of
VMX features that Xen uses.  There are features that Xen doesn't use
(i.g. CPU_BASED_PAUSE_EXITING) but they are available to L1.  This makes
it not worthy to introduce "Host policy" at this stage.

Sergey Dyasli (6):
  vmx: add struct vmx_msr_policy
  vmx: add raw_vmx_msr_policy
  vmx: refactor vmx_init_vmcs_config()
  vvmx: add hvm_max_vmx_msr_policy
  vvmx: add per domain vmx msr policy
  vmx: print H/W VMX MSRs values during startup

 xen/arch/x86/domain.c              |   6 +
 xen/arch/x86/hvm/vmx/vmcs.c        | 639 ++++++++++++++++++++++++++++++++-----
 xen/arch/x86/hvm/vmx/vmx.c         |   4 +
 xen/arch/x86/hvm/vmx/vvmx.c        | 309 +++++++++---------
 xen/include/asm-x86/domain.h       |   2 +
 xen/include/asm-x86/hvm/vmx/vmcs.h | 346 ++++++++++++++++++++
 xen/include/asm-x86/hvm/vmx/vvmx.h |   3 +
 7 files changed, 1070 insertions(+), 239 deletions(-)

-- 
2.11.0


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

^ permalink raw reply	[flat|nested] 23+ messages in thread

end of thread, other threads:[~2017-07-07 14:01 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-06-26 10:44 [PATCH v1 0/6] VMX MSRs policy for Nested Virt: part 1 Sergey Dyasli
2017-06-26 10:44 ` [PATCH v1 1/6] vmx: add struct vmx_msr_policy Sergey Dyasli
2017-07-04 13:57   ` Jan Beulich
2017-07-06  9:21     ` Sergey Dyasli
2017-07-06  9:59       ` Jan Beulich
2017-07-05  3:02   ` Tian, Kevin
2017-06-26 10:44 ` [PATCH v1 2/6] vmx: add raw_vmx_msr_policy Sergey Dyasli
2017-07-04 14:15   ` Jan Beulich
2017-07-06  9:29     ` Sergey Dyasli
2017-07-06  9:45       ` Jan Beulich
2017-06-26 10:44 ` [PATCH v1 3/6] vmx: refactor vmx_init_vmcs_config() Sergey Dyasli
2017-07-04 14:26   ` Jan Beulich
2017-07-05  3:21   ` Tian, Kevin
2017-06-26 10:44 ` [PATCH v1 4/6] vvmx: add hvm_max_vmx_msr_policy Sergey Dyasli
2017-07-04 15:04   ` Jan Beulich
2017-07-06 10:23     ` Sergey Dyasli
2017-07-06 12:28       ` Jan Beulich
2017-07-07 13:01         ` Sergey Dyasli
2017-07-07 14:01           ` Andrew Cooper
2017-06-26 10:44 ` [PATCH v1 5/6] vvmx: add per domain vmx msr policy Sergey Dyasli
2017-07-04 15:09   ` Jan Beulich
2017-06-26 10:44 ` [DEBUG PATCH 6/6] vmx: print H/W VMX MSRs values during startup Sergey Dyasli
2017-07-05  2:52 ` [PATCH v1 0/6] VMX MSRs policy for Nested Virt: part 1 Tian, Kevin

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.