From mboxrd@z Thu Jan 1 00:00:00 1970 From: Vadim Rozenfeld Subject: Re: [RFC PATCH v2 2/2] add support for Hyper-V invariant TSC Date: Fri, 24 May 2013 06:11:16 -0400 (EDT) Message-ID: <278937736.7040157.1369390276708.JavaMail.root@redhat.com> References: <1368947197-9033-1-git-send-email-vrozenfe@redhat.com> <1368947197-9033-3-git-send-email-vrozenfe@redhat.com> <20130522005046.GA7589@amt.cnet> <643480794.5761686.1369207375451.JavaMail.root@redhat.com> <20130522212330.GA29387@amt.cnet> <20130523091229.GI4725@redhat.com> <20130523135338.GA15652@amt.cnet> <20130523153110.GI26157@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Cc: Marcelo Tosatti , kvm@vger.kernel.org, pl@dlh.net To: Gleb Natapov Return-path: Received: from mx3-phx2.redhat.com ([209.132.183.24]:45545 "EHLO mx3-phx2.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753508Ab3EXKLS (ORCPT ); Fri, 24 May 2013 06:11:18 -0400 In-Reply-To: <20130523153110.GI26157@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: ----- Original Message ----- From: "Gleb Natapov" To: "Marcelo Tosatti" Cc: "Vadim Rozenfeld" , kvm@vger.kernel.org, pl@dlh.net Sent: Friday, May 24, 2013 1:31:10 AM Subject: Re: [RFC PATCH v2 2/2] add support for Hyper-V invariant TSC On Thu, May 23, 2013 at 10:53:38AM -0300, Marcelo Tosatti wrote: > On Thu, May 23, 2013 at 12:12:29PM +0300, Gleb Natapov wrote: > > > To address migration scenarios to physical platforms that do not support > > > iTSC, the TscSequence field is used. In the event that a guest partition > > > is migrated from an iTSC capable host to a non-iTSC capable host, the > > > hypervisor sets TscSequence to the special value of 0xFFFFFFFF, which > > > directs the guest operating system to fall back to a different clock > > > source (for example, the virtual PM timer)." > > > > > > Why it would not/does not work after migration? > > > > > Please read the whole discussion, we talked about it already. We > > definitely do not want to fall back to PM timer either, we want to use > > reference counter instead. > > Case 1) On migration of TSC page enabled Windows guest, from invariant TSC host, > to non-invariant TSC host, Windows guests fallback to PMTimer > and not to reference timer via MSR. > > This is suboptimal because pmtimer emulation is excessively slow. > > Is there a better option? > If setting TscSequence to zero makes Windows fall back to the MSR this is a better option. +1 This is why MS has two different mechanisms: iTSC as a primary, reference counters as a fall-back. > Case 2) > Reference timer (via MSR) support is interesting for the case of non invariant TSC > host. -- Gleb.