From mboxrd@z Thu Jan 1 00:00:00 1970 From: Gleb Natapov Subject: Re: [PATCH v4 01/13] nEPT: Support LOAD_IA32_EFER entry/exit controls for L1 Date: Mon, 29 Jul 2013 16:12:03 +0300 Message-ID: <20130729131203.GJ18009@redhat.com> References: <1374750001-28527-1-git-send-email-gleb@redhat.com> <1374750001-28527-2-git-send-email-gleb@redhat.com> <51F628BA.7040209@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: kvm@vger.kernel.org, Xiao Guangrong , Jun Nakajima , Yang Zhang To: Paolo Bonzini Return-path: Received: from mx1.redhat.com ([209.132.183.28]:3591 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754433Ab3G2NMH (ORCPT ); Mon, 29 Jul 2013 09:12:07 -0400 Content-Disposition: inline In-Reply-To: <51F628BA.7040209@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: On Mon, Jul 29, 2013 at 10:32:58AM +0200, Paolo Bonzini wrote: > Il 25/07/2013 12:59, Gleb Natapov ha scritto: > > + * we should use its exit controls. Note that IA32_MODE, LOAD_IA32_EFER > > + * bits are further modified by vmx_set_efer() below. > > IA32E_MODE, but the last sentence is not relevant anyway for this > vmcs_write32; in fact, the next command basically duplicates it. > IA32E_MODE is not relevant, it never changes in VM_EXIT_CONTROLS, but LOAD_IA32_EFER refers to VM_EXIT_LOAD_IA32_EFER, which can be set by vmx_set_efer() and is different from VM_ENTRY_LOAD_IA32_EFER that comment bellow talks about. > This can be fixed while applying. > > Paolo > > > + */ > > + vmcs_write32(VM_EXIT_CONTROLS, vmcs_config.vmexit_ctrl); > > + > > + /* vmcs12's VM_ENTRY_LOAD_IA32_EFER and VM_ENTRY_IA32E_MODE are > > + * emulated by vmx_set_efer(), below. > > + */ > > + vmcs_write32(VM_ENTRY_CONTROLS, > > + (vmcs12->vm_entry_controls & ~VM_ENTRY_LOAD_IA32_EFER & > > + ~VM_ENTRY_IA32E_MODE) | > > (vmcs_config.vmentry_ctrl & ~VM_ENTRY_IA32E_MODE)); > > > > if (vmcs12->vm_entry_controls & VM_ENTRY_LOAD_IA32_PAT) > > -- 1.7.10.4 -- Gleb.