From: Nadav Har'El Subject: Re: [PATCH 10/11] KVM: nVMX: Synchronize VMCS12 content with the shadow vmcs Date: Mon, 11 Mar 2013 00:43:35 +0200 Message-ID: <20130310224335.GA16549@fermat.math.technion.ac.il> References: <1362931402-abelg@il.ibm.com> <20130310160826.1E005380134@moren.haifa.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: kvm@vger.kernel.org, owasserm@redhat.com, jun.nakajima@intel.com, dongxiao.xu@intel.com To: Abel Gordon Return-path: Received: from mailgw13.technion.ac.il ([132.68.225.13]:17168 "EHLO mailgw13.technion.ac.il" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751642Ab3CJWqV (ORCPT ); Sun, 10 Mar 2013 18:46:21 -0400 Content-Disposition: inline In-Reply-To: <20130310160826.1E005380134@moren.haifa.ibm.com> Sender: kvm-owner@vger.kernel.org List-ID: Hi Abel, very nice patches. On Sun, Mar 10, 2013, Abel Gordon wrote about "[PATCH 10/11] KVM: nVMX: Synchronize VMCS12 content with the shadow vmcs": > nested_vmx_vmexit(vcpu); > + if (enable_shadow_vmcs) > + copy_vmcs12_to_shadow(to_vmx(vcpu)); I was curious why your patch adds this call to copy_vmcs12_to_shadow after every nested_vmx_vmexit (3 times), instead of making this call inside nested_vmx_vmexit(), say right after prepare_vmcs12(). Until I saw: > nested_vmx_vmexit(vcpu); > vmcs12->vm_exit_reason = EXIT_REASON_EXTERNAL_INTERRUPT; > vmcs12->vm_exit_intr_info = 0; > + if (enable_shadow_vmcs) > + copy_vmcs12_to_shadow(to_vmx(vcpu)); where you need to copy this exit-reason override as well... I wonder if there isn't a less ugly and repetitive way to do this :( -- Nadav Har'El | Monday, Mar 11 2013, 29 Adar 5773 nyh@math.technion.ac.il |----------------------------------------- Phone +972-523-790466, ICQ 13349191 |Fame: when your name is in everything but http://nadav.harel.org.il |the phone book.