Received: by 10.223.185.116 with SMTP id b49csp3986019wrg; Mon, 26 Feb 2018 09:15:13 -0800 (PST) X-Google-Smtp-Source: AH8x224d3qvylKI5uG4SRVyW0wqUbA1WTczVZKRqyi9+bkubrGFsvDznpqISEAx+uzB+1p6Aaf9Q X-Received: by 10.99.140.29 with SMTP id m29mr9176187pgd.320.1519665313214; Mon, 26 Feb 2018 09:15:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519665313; cv=none; d=google.com; s=arc-20160816; b=NxEUB5c4wxWFjiddgzhtDz47JIwYHhcyuQuWb96LdSajXC7W15YF9XU0XYAQoylknm 2kNswHnukh2ymPt3B4smJUboKfMiglZj1ihpz3nW59iQwJmImzECzO0vg4+Xdca7jt0f 1tB+nh5tf5O87GDIkmBSxC3ALCkNVA8w3A4Wsoz8Mf2RjbUaMvoB4lZUJOjaFx+WpSEC OcOmii0awrQqxGz7kck34BeWdKFH1CqN6fdLnqE+RWM4MHWoD31kirpedzjhs1Pmkkxk 3BqLaGhnEsROH1BBGi8+4W0kpzxIqbqSosxfBP51WuiohnqJ/lyNmHCPGv3F0FEMWrgx +d9g== 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=3uJYpL399Cm1+lEXlUq4/KJv9sU0d2maR420Kwak5a8=; b=dPN2PeF5YifxWEvf7cdXQm94TXyt5WxAYRPDZovwBs3TTWhRUwoaLG2D7hMM21zhC1 vfvRU0RszuxLQBMARYSpPSis/Mdzla0gX/N6pRrvgEKiOQuxpp+nLaQ1RFI4mMHPmiiS 1/8vEzx71pcLhG+fHPZ+SvmXOa/5mPm3fvTayeg/J35MgloxLV8YKfas8KyhHKW/Sc5U WrAxxzWLnnedfEmjYxEMnoW5ZM9vPB6fQu1o6lbXcJAz7K1yW9y1cxks7SdroJdx7duD sSx3uOOMkqS7xLnQxEnZYUFI8iNePvrR4zkM21cHjWeV0Zs605L0YaA107ph34uKURuE /Cfg== 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 bd7-v6si6943939plb.46.2018.02.26.09.14.56; Mon, 26 Feb 2018 09:15:13 -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 S1751675AbeBZRL2 (ORCPT + 99 others); Mon, 26 Feb 2018 12:11:28 -0500 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:36670 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751463AbeBZRL1 (ORCPT ); Mon, 26 Feb 2018 12:11:27 -0500 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 7C184400187D; Mon, 26 Feb 2018 17:11:26 +0000 (UTC) Received: from vitty.brq.redhat.com (unknown [10.43.2.155]) by smtp.corp.redhat.com (Postfix) with ESMTP id DF16C111DCF7; Mon, 26 Feb 2018 17:11:22 +0000 (UTC) From: Vitaly Kuznetsov To: kvm@vger.kernel.org Cc: x86@kernel.org, Paolo Bonzini , =?UTF-8?q?Radim=20Kr=C4=8Dm=C3=A1=C5=99?= , "K. Y. Srinivasan" , Haiyang Zhang , Stephen Hemminger , "Michael Kelley (EOSG)" , Mohammed Gamal , Cathy Avery , Bandan Das , linux-kernel@vger.kernel.org Subject: [PATCH v2 0/5] Enlightened VMCS support for KVM on Hyper-V Date: Mon, 26 Feb 2018 18:11:16 +0100 Message-Id: <20180226171121.18974-1-vkuznets@redhat.com> X-Scanned-By: MIMEDefang 2.78 on 10.11.54.3 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.5]); Mon, 26 Feb 2018 17:11:26 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.5]); Mon, 26 Feb 2018 17:11:26 +0000 (UTC) for IP:'10.11.54.3' DOMAIN:'int-mx03.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: - The only comment I got for v1 was from kbuild test robot. The issue was addressed by moving HV_X64_ENLIGHTENED_VMCS_RECOMMENDED definition to PATCH2. - Rebased to current kvm/queue. When running nested KVM on Hyper-V it's possible to use so called 'Enlightened VMCS' and do normal memory reads/writes instead of doing VMWRITE/VMREAD instructions. In addition, clean field mask provides a huge room for optimization on L0's side. Tight CPUID loop test shows significant speedup (current kvm/queue on E5-2667 v4 @ 3.20GHz): Before: 20766 cycles After: 8912 cycles The series is based on current kvm/queue tree. Ladi Prosek (1): x86/kvm: rename HV_X64_MSR_APIC_ASSIST_PAGE to HV_X64_MSR_VP_ASSIST_PAGE Vitaly Kuznetsov (4): x86/hyper-v: allocate and use Virtual Processor Assist Pages x86/hyper-v: define struct hv_enlightened_vmcs and clean field bits x86/hyper-v: detect nested features x86/kvm: use Enlightened VMCS when running on Hyper-V arch/x86/hyperv/hv_init.c | 33 +++ arch/x86/include/asm/mshyperv.h | 12 + arch/x86/include/uapi/asm/hyperv.h | 223 ++++++++++++++- arch/x86/kernel/cpu/mshyperv.c | 3 + arch/x86/kvm/hyperv.c | 8 +- arch/x86/kvm/lapic.h | 2 +- arch/x86/kvm/vmx.c | 561 ++++++++++++++++++++++++++++++++++++- arch/x86/kvm/x86.c | 2 +- 8 files changed, 825 insertions(+), 19 deletions(-) -- 2.14.3