From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Nadav Har'El" Subject: Re: [PATCH 20/31] nVMX: Exiting from L2 to L1 Date: Wed, 25 May 2011 16:21:03 +0300 Message-ID: <20110525132103.GD16418@fermat.math.technion.ac.il> References: <1305575004-nyh@il.ibm.com> <201105161954.p4GJs9XB001955@rice.haifa.ibm.com> <625BA99ED14B2D499DC4E29D8138F1505C9BFA3758@shsmsx502.ccr.corp.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: "kvm@vger.kernel.org" , "gleb@redhat.com" , "avi@redhat.com" To: "Tian, Kevin" Return-path: Received: from mailgw12.technion.ac.il ([132.68.225.12]:12549 "EHLO mailgw12.technion.ac.il" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754183Ab1EYNVI (ORCPT ); Wed, 25 May 2011 09:21:08 -0400 Content-Disposition: inline In-Reply-To: <625BA99ED14B2D499DC4E29D8138F1505C9BFA3758@shsmsx502.ccr.corp.intel.com> Sender: kvm-owner@vger.kernel.org List-ID: On Wed, May 25, 2011, Tian, Kevin wrote about "RE: [PATCH 20/31] nVMX: Exiting from L2 to L1": > How about SYSENTER and PERF_GLOBAL_CTRL MSRs? At least a TODO comment > here make the whole load process complete. :-) > > Also isn't it more sane to update vmcs01's guest segment info based on vmcs12's > host segment info? Though you can assume the environment in L1 doesn't change > from VMLAUNCH/VMRESUME to VMEXIT handler, it's more architectural clear > to load those segments fields according to L1's desire. Right... One of these days, I (or some other volunteer ;-)) would need to print out the relevant sections of the SDM, sit down with a marker, a read it line by line marking lines, fields, capabilities, and so on, which we forgot to implement... How about these additions: vmcs_write32(GUEST_SYSENTER_CS, vmcs12->host_ia32_sysenter_cs); vmcs_writel(GUEST_SYSENTER_ESP, vmcs12->host_ia32_sysenter_esp); vmcs_writel(GUEST_SYSENTER_EIP, vmcs12->host_ia32_sysenter_eip); vmcs_writel(GUEST_IDTR_BASE, vmcs12->host_idtr_base); vmcs_writel(GUEST_GDTR_BASE, vmcs12->host_gdtr_base); vmcs_writel(GUEST_TR_BASE, vmcs12->host_tr_base); vmcs_writel(GUEST_GS_BASE, vmcs12->host_gs_base); vmcs_writel(GUEST_FS_BASE, vmcs12->host_fs_base); vmcs_write16(GUEST_ES_SELECTOR, vmcs12->host_es_selector); vmcs_write16(GUEST_CS_SELECTOR, vmcs12->host_cs_selector); vmcs_write16(GUEST_SS_SELECTOR, vmcs12->host_ss_selector); vmcs_write16(GUEST_DS_SELECTOR, vmcs12->host_ds_selector); vmcs_write16(GUEST_FS_SELECTOR, vmcs12->host_fs_selector); vmcs_write16(GUEST_GS_SELECTOR, vmcs12->host_gs_selector); vmcs_write16(GUEST_TR_SELECTOR, vmcs12->host_tr_selector); if (vmcs12->vm_exit_controls & VM_EXIT_LOAD_IA32_PAT) vmcs_write64(GUEST_IA32_PAT, vmcs12->host_ia32_pat); if (vmcs12->vm_exit_controls & VM_EXIT_LOAD_IA32_PERF_GLOBAL_CTRL) vmcs_write64(GUEST_IA32_PERF_GLOBAL_CTRL, vmcs12->host_ia32_perf_global_ctrl); -- Nadav Har'El | Wednesday, May 25 2011, 21 Iyyar 5771 nyh@math.technion.ac.il |----------------------------------------- Phone +972-523-790466, ICQ 13349191 |AAAAA: the American Association for the http://nadav.harel.org.il |Abolition of Abbreviations and Acronyms