From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Gleixner Subject: Re: [PATCH v3 3/7] x86/hyper-v: reenlightenment notifications support Date: Tue, 16 Jan 2018 19:33:18 +0100 (CET) Message-ID: References: <20180116182700.1042-1-vkuznets@redhat.com> <20180116182700.1042-4-vkuznets@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: Stephen Hemminger , kvm@vger.kernel.org, =?ISO-8859-2?Q?Radim_Kr=E8m=E1=F8?= , Haiyang Zhang , x86@kernel.org, linux-kernel@vger.kernel.org, devel@linuxdriverproject.org, "Michael Kelley \(EOSG\)" , Ingo Molnar , Roman Kagan , Andy Lutomirski , "H. Peter Anvin" , Paolo Bonzini , Mohammed Gamal To: Vitaly Kuznetsov Return-path: In-Reply-To: <20180116182700.1042-4-vkuznets@redhat.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: driverdev-devel-bounces@linuxdriverproject.org Sender: "devel" List-Id: kvm.vger.kernel.org On Tue, 16 Jan 2018, Vitaly Kuznetsov wrote: > Hyper-V supports Live Migration notification. This is supposed to be used > in conjunction with TSC emulation: when we are migrated to a host with > different TSC frequency for some short period host emulates our accesses > to TSC and sends us an interrupt to notify about the event. When we're > done updating everything we can disable TSC emulation and everything will > start working fast again. > > We didn't need these notifications before as Hyper-V guests are not > supposed to use TSC as a clocksource: in Linux we even mark it as unstable > on boot. Guests normally use 'tsc page' clocksouce and host updates its > values on migrations automatically. > > Things change when we want to run nested virtualization: even when we pass > through PV clocksources (kvm-clock or tsc page) to our guests we need to > know TSC frequency and when it changes. > > Hyper-V Top Level Functional Specification (as of v5.0b) wrongly specifies > EAX:BIT(12) of CPUID:0x40000009 as the feature identification bit. The > right one to check is EAX:BIT(13) of CPUID:0x40000003. I was assured that > the fix in on the way. > > Signed-off-by: Vitaly Kuznetsov Reviewed-by: Thomas Gleixner