Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp1655543imm; Thu, 14 Jun 2018 01:27:21 -0700 (PDT) X-Google-Smtp-Source: ADUXVKJMyM+0/PRF27o+RIkBpcdOS19oSlJVFsAv46G94SypvSwboQUpTirsIWwAOeSNt3hanDYb X-Received: by 2002:a17:902:6046:: with SMTP id a6-v6mr1958467plt.59.1528964841484; Thu, 14 Jun 2018 01:27:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528964841; cv=none; d=google.com; s=arc-20160816; b=F4X+Jy2fVpnwCO/MNQeBhKnDA0cf9d0rwRc2twILv+coBKVXKil7C4iRtZBwyyBS4P 85H/DaR9BYAla+1UpA5McFoyvrqLzkrwIpERihuiHQIKQGpXjqVk2pkDFed7JBdptAi5 x3VUTtlzrLu8WCtLsha2m9vT1f8XQYnlD7TiSYV7ld3v4ntw1Zc/iAAHMY/0/COMe2kX sCpFTt3iC8TDEgMH8doDvQAlAVULFkhAQSBvBBL5I6VnrsIX/gYy5AkL5FdKXHkwpHlx 6LYpradDmYsgNl2z5I/ndOeFca1uMCWFCzsWSqphf6atS6K6wlAYlLvZ1sagER8BIWQq W6vw== 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=j46Nzaa7s5S1ty/V2uvye6vX7r9nn1LusmWiM8UlONQ=; b=xnClbMUfn+SSpAQ2la+dSqg+qq3GLFcELafL803+gb/XLdHaB3fMu8jUVJxoW7Wkm2 50St/98ngZOXSjdXi8qCW2JwLg5cgsB/dLt9GEE+VmvkjUntLTOSkaS+zsTsdkZNBEfV I1xlYkWw8w5/retsvza5nephD7Uooo6MHfvaBKSY+WTQTEx7mTDx7HUDRZwNyaDbpAYL bD0n14+oeAvEWMtN8Ebuejwy5tsPHlLdvQR6NwySkFrL9dJXWHfQLC0+e75jvD97wX3w +tYfh3wmtaO/QSHhumaaaL6sZcL6rnVY6wnF7Uv/bQM18GquYO1UWPZkk/BapKtnBC6S A6rQ== 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 e88-v6si5026165pfk.198.2018.06.14.01.27.07; Thu, 14 Jun 2018 01:27:21 -0700 (PDT) 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 S1754782AbeFNIZJ (ORCPT + 99 others); Thu, 14 Jun 2018 04:25:09 -0400 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:43962 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752876AbeFNIZI (ORCPT ); Thu, 14 Jun 2018 04:25:08 -0400 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 8E077402345E; Thu, 14 Jun 2018 08:25:07 +0000 (UTC) Received: from vitty.brq.redhat.com (ovpn-204-228.brq.redhat.com [10.40.204.228]) by smtp.corp.redhat.com (Postfix) with ESMTP id B369310FFE4D; Thu, 14 Jun 2018 08:25:03 +0000 (UTC) From: Vitaly Kuznetsov To: kvm@vger.kernel.org Cc: Paolo Bonzini , =?UTF-8?q?Radim=20Kr=C4=8Dm=C3=A1=C5=99?= , Roman Kagan , "K. Y. Srinivasan" , Haiyang Zhang , Stephen Hemminger , "Michael Kelley (EOSG)" , Mohammed Gamal , Cathy Avery , linux-kernel@vger.kernel.org, Jim Mattson Subject: [PATCH 0/5] KVM: nVMX: Enlightened VMCS for Hyper-V on KVM Date: Thu, 14 Jun 2018 10:24:55 +0200 Message-Id: <20180614082500.18548-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.6]); Thu, 14 Jun 2018 08:25:07 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.6]); Thu, 14 Jun 2018 08:25:07 +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 This is an initial implementation of Enlightened VMCS for nested Hyper-V on KVM. Using it helps to spare 1500 cpu cycles for nested vmexit (tight cpuid loop in WS2016 with Hyper-V role on KVM: 15200 cycles -> 13700 cycles). Changes since RFCv2: - Rename sync_shadow_vmcs to need_vmcs12_sync and reuse for eVMCS case [Paolo Bonzini] Ladi Prosek (1): KVM: hyperv: define VP assist page helpers Vitaly Kuznetsov (4): KVM: nVMX: add KVM_CAP_HYPERV_ENLIGHTENED_VMCS capability KVM: nVMX: add enlightened VMCS state KVM: nVMX: implement enlightened VMPTRLD and VMCLEAR KVM: nVMX: optimize prepare_vmcs02{,_full} for Enlightened VMCS case arch/x86/include/asm/kvm_host.h | 3 + arch/x86/kvm/hyperv.c | 23 +- arch/x86/kvm/hyperv.h | 4 + arch/x86/kvm/lapic.c | 4 +- arch/x86/kvm/lapic.h | 2 +- arch/x86/kvm/svm.c | 9 + arch/x86/kvm/vmx.c | 810 +++++++++++++++++++++++++++++++++------- arch/x86/kvm/x86.c | 17 +- include/uapi/linux/kvm.h | 1 + 9 files changed, 724 insertions(+), 149 deletions(-) -- 2.14.4