From: "Nadav Har'El" Subject: Re: [PATCH 17/30] nVMX: Prepare vmcs02 from vmcs01 and vmcs12 Date: Mon, 9 May 2011 13:27:12 +0300 Message-ID: <20110509102712.GA26926@fermat.math.technion.ac.il> References: <1304842511-nyh@il.ibm.com> <201105080823.p488Nuj8018238@rice.haifa.ibm.com> <4DC7BE01.80709@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: kvm@vger.kernel.org, gleb@redhat.com To: Avi Kivity Return-path: Received: from mailgw12.technion.ac.il ([132.68.225.12]:17112 "EHLO mailgw12.technion.ac.il" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751557Ab1EIKhM (ORCPT ); Mon, 9 May 2011 06:37:12 -0400 Content-Disposition: inline In-Reply-To: <4DC7BE01.80709@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: Hi, and thanks again for the reviews. On Mon, May 09, 2011, Avi Kivity wrote about "Re: [PATCH 17/30] nVMX: Prepare vmcs02 from vmcs01 and vmcs12": > >+ vmcs_write64(TSC_OFFSET, > >+ vmx->nested.vmcs01_tsc_offset + vmcs12->tsc_offset); > > This is probably wrong (everything with time is probably wrong), but we > can deal with it (much) later. I thought this was right :-) Why do you believe it to be wrong? L1 wants to add vmcs12->tsc_offset to its own TSC to generate L2's TSC. But L1's TSC is itself with vmx->nested.vmcs01_tsc_offset from L0's TSC. So their sum, vmx->nested.vmcs01_tsc_offset + vmcs12->tsc_offset, is the offset of L2's TSC from L0's TSC. Am I missing something? Thanks, Nadav. -- Nadav Har'El | Monday, May 9 2011, 5 Iyyar 5771 nyh@math.technion.ac.il |----------------------------------------- Phone +972-523-790466, ICQ 13349191 |I couldn't think of an interesting http://nadav.harel.org.il |signature to put here... Maybe next time.