On 05/13/2019 11:49 AM, Sean Christopherson wrote:
On Wed, Apr 24, 2019 at 07:17:17PM -0400, Krish Sadhukhan wrote:
Signed-off-by: Krish Sadhukhan <krish.sadhukhan@xxxxxxxxxx>
Reviewed-by: Karl Heubaum <karl.heubaum@xxxxxxxxxx>
---
arch/x86/kvm/vmx/nested.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/arch/x86/kvm/vmx/nested.c b/arch/x86/kvm/vmx/nested.c
index 3170e291215d..42a4deb662c6 100644
--- a/arch/x86/kvm/vmx/nested.c
+++ b/arch/x86/kvm/vmx/nested.c
@@ -5493,7 +5493,8 @@ void nested_vmx_setup_ctls_msrs(struct nested_vmx_msrs *msrs, u32 ept_caps,
msrs->exit_ctls_high |=
VM_EXIT_ALWAYSON_WITHOUT_TRUE_MSR |
VM_EXIT_LOAD_IA32_EFER | VM_EXIT_SAVE_IA32_EFER |
- VM_EXIT_SAVE_VMX_PREEMPTION_TIMER | VM_EXIT_ACK_INTR_ON_EXIT;
+ VM_EXIT_SAVE_VMX_PREEMPTION_TIMER | VM_EXIT_ACK_INTR_ON_EXIT |
+ VM_EXIT_LOAD_IA32_PERF_GLOBAL_CTRL;
This exposes the control to L1 but doesn't implement the backing
functionality. The backing functionality, consistency checks and exposure
to L1 should be a single patch. The consistency checks could be added
earlier, but I don't see much value in doing so given that the checks are
(currently) a few lines.
I will combine the exposure of the control and its backing functionality
into a single patch. But I would prefer to keep the consistency checks
in separate patches just to make it a gradual progression i.e., first
enabling the controls in a patch and then checking their consistency in
the successive patch.
/* We support free control of debug control saving. */
msrs->exit_ctls_low &= ~VM_EXIT_SAVE_DEBUG_CONTROLS;
--
2.17.2