From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754935AbdLOJBS (ORCPT ); Fri, 15 Dec 2017 04:01:18 -0500 Received: from mx1.redhat.com ([209.132.183.28]:36976 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754729AbdLOJBO (ORCPT ); Fri, 15 Dec 2017 04:01:14 -0500 Subject: Re: [PATCH v2 0/7] x86/kvm/hyperv: stable clocksorce for L2 guests when running nested KVM on Hyper-V To: Vitaly Kuznetsov , kvm@vger.kernel.org, x86@kernel.org Cc: =?UTF-8?B?UmFkaW0gS3LEjW3DocWZ?= , Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , "K. Y. Srinivasan" , Haiyang Zhang , Stephen Hemminger , "Michael Kelley (EOSG)" , Andy Lutomirski , Mohammed Gamal , Cathy Avery , Roman Kagan , linux-kernel@vger.kernel.org, devel@linuxdriverproject.org References: <20171213150945.24054-1-vkuznets@redhat.com> From: Paolo Bonzini Message-ID: Date: Fri, 15 Dec 2017 10:01:06 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0 MIME-Version: 1.0 In-Reply-To: <20171213150945.24054-1-vkuznets@redhat.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Fri, 15 Dec 2017 09:01:14 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 13/12/2017 16:09, Vitaly Kuznetsov wrote: > Currently, KVM passes PVCLOCK_TSC_STABLE_BIT to its guests when running in > so called 'masterclock' mode and this is only possible when the clocksource > on the host is TSC. When running nested on Hyper-V we're using a different > clocksource in L1 (Hyper-V TSC Page) which can actually be used for > masterclock. This series brings the required support. > > Making KVM work with TSC page clocksource is relatively easy, it is done in > PATCH 5 of the series. All the rest is required to support L1 migration ^^^^^^^ Patch 6. :) > when TSC frequency changes, we use a special feature from Hyper-V to do > the job. Patches 5-7 are Acked-by: Paolo Bonzini I would appreciate if the Hyper-V folks can provide a topic branch to be merged in both HV and KVM trees. Thanks, Paolo > Vitaly Kuznetsov (7): > x86/hyper-v: check for required priviliges in hyperv_init() > x86/hyper-v: add a function to read both TSC and TSC page value > simulateneously > x86/hyper-v: reenlightenment notifications support > x86/hyper-v: redirect reenlightment notifications on CPU offlining > x86/irq: Count Hyper-V reenlightenment interrupts > x86/kvm: pass stable clocksource to guests when running nested on > Hyper-V > x86/kvm: support Hyper-V reenlightenment > > arch/x86/entry/entry_32.S | 3 + > arch/x86/entry/entry_64.S | 3 + > arch/x86/hyperv/hv_init.c | 133 ++++++++++++++++++++++++++++++++++- > arch/x86/include/asm/hardirq.h | 3 + > arch/x86/include/asm/irq_vectors.h | 7 +- > arch/x86/include/asm/mshyperv.h | 32 +++++++-- > arch/x86/include/uapi/asm/hyperv.h | 27 ++++++++ > arch/x86/kernel/cpu/mshyperv.c | 6 ++ > arch/x86/kernel/irq.c | 9 +++ > arch/x86/kvm/x86.c | 138 ++++++++++++++++++++++++++++++------- > 10 files changed, 329 insertions(+), 32 deletions(-) >