From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752626AbeB1NoI (ORCPT ); Wed, 28 Feb 2018 08:44:08 -0500 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:35892 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752206AbeB1NoG (ORCPT ); Wed, 28 Feb 2018 08:44:06 -0500 From: Vitaly Kuznetsov To: kvm@vger.kernel.org Cc: linux-kernel@vger.kernel.org, x86@kernel.org, Paolo Bonzini , =?UTF-8?q?Radim=20Kr=C4=8Dm=C3=A1=C5=99?= , "K. Y. Srinivasan" , "Michael Kelley (EOSG)" , Andrey Smetanin , Roman Kagan , "Denis V . Lunev" Subject: [PATCH 0/3] x86/kvm/hyper-v: More fixes for TSC page clocksource for Hyper-V on KVM Date: Wed, 28 Feb 2018 14:43:58 +0100 Message-Id: <20180228134401.6544-1-vkuznets@redhat.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Previously (see commit 72c139bacf) it was found that Hyper-V frequency MSRs are required to make Hyper-V on KVM pass through TSC page as stable clocksource to its guests. However, to make things work this is not enough. Hyper-V tries to prove that TSC frequency underneath it won't change (e.g. when it's migrated), there are two mechanisms: 1) Invariant TSC (CPUID.80000007H:EDX[8]). If Hyper-V sees this bit it will treat TSC as stable. We, however, don't want to pass it as it makes migration hard (e.g. Qemu adds a migration blocker when 'invtsc' flag is passed. Genuine Hyper-V running in L0 doesn't pass it either. 2) Hyper-V Reenlightenment (CPUID.40000003H:EAX[13]). This patch series add rudimentary support for Hyper-V reenlightenment notifications to KVM ('producer' part; we already implemented reenlightenment 'consumer' for KVM-on Hyper-V some time ago) and fixes bugs I found during testing. Fully fledged reenlightenment implementation will be added later when we learn to migrate nested workloads in KVM making testing possible. Qemu patches are also required, I'll post them separately. Vitaly Kuznetsov (3): x86/kvm/hyper-v: add reenlightenment MSRs support x86/kvm/hyper-v: remove stale entries from vec_bitmap/auto_eoi_bitmap on vector change x86/kvm/hyper-v: inject #GP only when invalid SINTx vector is unmasked arch/x86/include/asm/kvm_host.h | 4 +++ arch/x86/include/uapi/asm/hyperv.h | 3 ++ arch/x86/kvm/hyperv.c | 58 +++++++++++++++++++++++++++++++------- arch/x86/kvm/x86.c | 12 +++++++- 4 files changed, 66 insertions(+), 11 deletions(-) -- 2.14.3