From mboxrd@z Thu Jan 1 00:00:00 1970 From: Paolo Bonzini Subject: Re: [PATCH 09/10] KVM: nVMX: Synchronize VMCS12 content with the shadow vmcs Date: Wed, 17 Apr 2013 23:59:48 +0200 Message-ID: <516F1B54.4040801@redhat.com> References: <1366199437-abelg@il.ibm.com> <20130417115510.ED10F7B802A@moren.haifa.ibm.com> <20130417143449.GK1682@redhat.com> <20130417153901.GC8997@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: Gleb Natapov , dongxiao.xu@intel.com, jun.nakajima@intel.com, kvm@vger.kernel.org, nadav@harel.org.il, owasserm@redhat.com To: Abel Gordon Return-path: Received: from mail-ee0-f51.google.com ([74.125.83.51]:38149 "EHLO mail-ee0-f51.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965829Ab3DQV77 (ORCPT ); Wed, 17 Apr 2013 17:59:59 -0400 Received: by mail-ee0-f51.google.com with SMTP id c4so960830eek.38 for ; Wed, 17 Apr 2013 14:59:58 -0700 (PDT) In-Reply-To: Sender: kvm-owner@vger.kernel.org List-ID: Il 17/04/2013 18:03, Abel Gordon ha scritto: >> > Right, not a big deal if this is the only case when it happens. When we >> > discussed accessors vs sync_shadow_vmcs flag approach I said that flag >> > will work only if no vmcs12 fields are changed not as part of vmexit or >> > vmwrite emulations. This one is such a field unfortunately. Hope it is >> > the only one. > Yep, remember that. I answered that L0 should NOT change VMCS12 fields > if L1 is running and L1 didn't execute any vmlaunch, vmresume, vmwrite... > (any vmx instruction. Sorry if I wasn't clear). > nested_vmx_failValid is called ONLY when L1 executes vmx instructions > which L0 traps and emulate. > > So, can we keep this part of the code as is ? I think so. Not shadowing the field is just as good a solution as forcing the copy. Perhaps at the top of the field lists you can replace the comment about VM_INSTRUCTION_ERROR with one that is more generic, and mentions that fields that are changed as part of vmexit or vmwrite emulation must not be shadowed, or alternatively *insert explanation here*... Paolo