From mboxrd@z Thu Jan 1 00:00:00 1970 From: Arbel Moshe Subject: [PATCH v2 2/3] KVM: nVMX: Update nested MSRs in case APICv refreshing Date: Wed, 22 Nov 2017 12:23:39 +0200 Message-ID: <20171122102340.7110-3-arbel.moshe@oracle.com> References: <20171122102340.7110-1-arbel.moshe@oracle.com> Cc: jmattson@google.com, wanpeng.li@hotmail.com, idan.brown@oracle.com, liran.alon@oracle.com, Arbel Moshe , Krish Sadhukhan To: pbonzini@redhat.com, rkrcmar@redhat.com, kvm@vger.kernel.org Return-path: Received: from userp1040.oracle.com ([156.151.31.81]:19298 "EHLO userp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753670AbdKVKYi (ORCPT ); Wed, 22 Nov 2017 05:24:38 -0500 In-Reply-To: <20171122102340.7110-1-arbel.moshe@oracle.com> Sender: kvm-owner@vger.kernel.org List-ID: Fix bug of not updating nested MSRs regarding APICv, when refreshing apicv exec ctrl. Before this commit, enabling Hyper-V SynIC would disable APICv controls in VMCS but still expose APICv controls to nested guest. Signed-off-by: Arbel Moshe Reviewed-by: Liran Alon Reviewed-by: Krish Sadhukhan Signed-off-by: Krish Sadhukhan --- arch/x86/kvm/vmx.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c index 84ccd3b2762c..0450fbdb97be 100644 --- a/arch/x86/kvm/vmx.c +++ b/arch/x86/kvm/vmx.c @@ -5253,6 +5253,8 @@ static void vmx_refresh_apicv_exec_ctrl(struct kvm_vcpu *vcpu) if (cpu_has_vmx_msr_bitmap()) vmx_set_msr_bitmap(vcpu); + + nested_vmx_setup_ctls_msrs(vmx); } static u32 vmx_exec_control(struct vcpu_vmx *vmx) -- 2.14.1