Received: by 10.223.185.116 with SMTP id b49csp6206368wrg; Wed, 28 Feb 2018 05:47:44 -0800 (PST) X-Google-Smtp-Source: AH8x224gUhsrm+CWuYoSx120n6KrdO4ovmLTjQvT4cqaeigmw6B/7Rpji7lkbzcgqNKAH2hl9yg4 X-Received: by 10.101.78.143 with SMTP id b15mr14430435pgs.229.1519825664136; Wed, 28 Feb 2018 05:47:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519825664; cv=none; d=google.com; s=arc-20160816; b=jPcYsUf20JNMTIa7+fVebjwKr/2fKQ6GFqKU3tJhdUOXGnU8GCFwhExXJsNEpU4inn kKN/Cl0mjl5JxCF7HpEXtVudvcO3H9M6UTqzZTxPyacXT5P5VfdyYfl+Flt41AQZ9HS2 e2kZnA6Hg2q7pu/Qj+8lOqeo4hh10ryOwfpe1GBO4vAGIb/FuyAJlDFD/ZhGxu7Djjvt NIzlQ1CHSfFE02tDvwN226GnSykKZVNtLSQ5Vga0skp+2/g2Y7G/CiXSAIhGwl62t2oU kR6wMrOD8MTge4eMTTlEuPnhuDq7Rv8L2k98JOvDp7m1MaYiqo+J+a8f843lCR93AapO 6Gvg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :arc-authentication-results; bh=ukeFbJWD0W7kasylXyiOQD0eEJiuH35c9tB/oeiHtCg=; b=TsVFP6niY++5YR/53iu1VSZ5cKIZZGFni1qIHHuW4eR4AolHJkYJGUaVvPK8Hkyks3 W4UBqALRisJ0sBB6urcYP4Xu5fPgtB0iNwGtuOUXgLw2mDV/mNaPXOlfQTLQ40au1FAC 3LMn7oO+Q29uSqO2ygB6+G+sIkWqqqm81JfFunLnIjwmaws0cu2SzB9ucGUngnM+cq7k eQiFfaDCg1FXVNZhtcteIBn+hp0rxHypa3ElAdGg3XIQdO4VRtfWPSXqjtHvcr9R6w06 Oh9LkQAuXnt0r2qE5YcwhPHuGeQZd3KTe4Xd0LGEVBlgyDYgfyAUbh+CgSkh9/a9vCFf LtTg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g34-v6si1309412pld.513.2018.02.28.05.47.27; Wed, 28 Feb 2018 05:47:44 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752611AbeB1NoH (ORCPT + 99 others); Wed, 28 Feb 2018 08:44:07 -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 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 8FBFE4084FEF; Wed, 28 Feb 2018 13:44:05 +0000 (UTC) Received: from vitty.brq.redhat.com (unknown [10.43.2.155]) by smtp.corp.redhat.com (Postfix) with ESMTP id DEC3F946B5; Wed, 28 Feb 2018 13:44:02 +0000 (UTC) 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> X-Scanned-By: MIMEDefang 2.79 on 10.11.54.5 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.5]); Wed, 28 Feb 2018 13:44:05 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.5]); Wed, 28 Feb 2018 13:44:05 +0000 (UTC) for IP:'10.11.54.5' DOMAIN:'int-mx05.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'vkuznets@redhat.com' RCPT:'' Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk 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