Received: by 10.223.185.116 with SMTP id b49csp7481907wrg; Thu, 1 Mar 2018 06:17:53 -0800 (PST) X-Google-Smtp-Source: AG47ELtij3WyBgmpDM1zeNc56ePTz14ljlOw9kjCxyX+Rix4TWd3ZDvPAJDw09CN2HsYuqhn+I9h X-Received: by 10.101.102.2 with SMTP id w2mr1693332pgv.326.1519913873062; Thu, 01 Mar 2018 06:17:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519913873; cv=none; d=google.com; s=arc-20160816; b=ouDDgnRFqL2F+6WU9G6geeP+CnErAxNYSBauoR7ATfE8DNrjK2se21Yem4epS2dXri 5VFC8yGZvKsbMfxXjoB+l/IMwABLPJ0Yv/q5pO8nSDlo1FBiomwNJ7vdHFruAmyQWRV0 zliEzSjyjOOpRJRMnU/MV6x67fV1s7uJW3M3EwI9/6QIJliSx8GIDgT8Yav5hJrTdzS3 ji1BUH0ueoLZ2cqJhZpVoWW7EOJxPD0qSpo6cxRzZ0613Bn9XJqWlI4L0K4veVx7FHVi 8KQg25RUFM0VbghtiGU62Y/xhAIdBPxgjIlN5jRV/sD0x23sbtfz8YJzoSjFSh7lkLwQ b3Ww== 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=sXvFtmQm7F3VYR4wz3PYigT1ONough6VV75vVLxCTWw=; b=rB04ccI1YU9A9N9OGt/4nWWVfGIES+ew+yweegMAsrf/AEU7cr27P61ldX6aQEidZj m86F8Wr0JiESX5bKFriZHhpDsiPr84bp+dUYyhTZ9lmfLchWlAmvO0UEOBeDcuomACEx tSPh8d6GRCR8uHM8/a0JkmGn+y940y/Ljce0kcsV/Q8DGfKunMfnoFENWHf52aBRDz1r IXgBQNxlPShcBZulJrq8rh60wjRoXekcFOjxDBKFWVDWimqzmNlKEk/P0Ho7RxhQ1PvD jBuvGX9r3CCH0iASujmYhHUKmerK+o7WdG+lfmDqzUBBW4UZXR9EZDEWlPIRvD/utJYv OHCA== 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 m16-v6si3144001pls.471.2018.03.01.06.17.37; Thu, 01 Mar 2018 06:17:53 -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 S1031259AbeCAOPV (ORCPT + 99 others); Thu, 1 Mar 2018 09:15:21 -0500 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:41992 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1031211AbeCAOPT (ORCPT ); Thu, 1 Mar 2018 09:15:19 -0500 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id BC05740FB646; Thu, 1 Mar 2018 14:15:18 +0000 (UTC) Received: from vitty.brq.redhat.com (unknown [10.43.2.155]) by smtp.corp.redhat.com (Postfix) with ESMTP id 3B0AB2024CA6; Thu, 1 Mar 2018 14:15:16 +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)" , Roman Kagan , "Denis V . Lunev" Subject: [PATCH v2 0/4] x86/kvm/hyper-v: More fixes for TSC page clocksource for Hyper-V on KVM Date: Thu, 1 Mar 2018 15:15:11 +0100 Message-Id: <20180301141514.3482-1-vkuznets@redhat.com> X-Scanned-By: MIMEDefang 2.78 on 10.11.54.4 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.7]); Thu, 01 Mar 2018 14:15:18 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.7]); Thu, 01 Mar 2018 14:15:18 +0000 (UTC) for IP:'10.11.54.4' DOMAIN:'int-mx04.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 Changes since v1: - Drop 'polling' bit check for now as we don't support this mode [Roman Kagan]. - Add a comment explaining "!host && !masked" in synic_set_sint() - Add Roman's R-b to PATCH1 and PATCH2. 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 | 2 ++ arch/x86/kvm/hyperv.c | 61 +++++++++++++++++++++++++++++++------- arch/x86/kvm/x86.c | 12 +++++++- 4 files changed, 68 insertions(+), 11 deletions(-) -- 2.14.3