Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp860226imm; Fri, 29 Jun 2018 07:34:13 -0700 (PDT) X-Google-Smtp-Source: ADUXVKKZlrXei+H6dahUzOwm3Q5hE5fT211eoO69ZftTsviPawW2N/+APpUwlcn9/CSsYB0Ghuat X-Received: by 2002:a63:4d5:: with SMTP id 204-v6mr12878818pge.129.1530282853709; Fri, 29 Jun 2018 07:34:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530282853; cv=none; d=google.com; s=arc-20160816; b=mTQPUWlQQrT2htobjiGnlsvJahpzlx76lInAUmFW8ue2Z66FI0sqNXI9irdiQQDodM 45uIV3ZtTS8cxCiobI+BjRWJ9y4VqL+bLja2GvhQPQRw/+vpUqi3e1S/HMCj0vl5ZHQh XtoCge4GTG6y6/tTRf665H+IQ9kai8wZ9X5CDvBA4EgoRS/EhLv1MDM7F33tRVaR2dKy S/jHovbyigqqiXZv6OQ+Ls5pVoS7X7+xt/T4y2vxXejzyvys5GsWasn8l+mxi4kMh1I9 SgR8vtHRIsr6ksUtt4S2MCWlLjC0SoCkd0OQWlFwiKeUAdSN+o97ISh164cBIkjyLPc7 GdqQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:arc-authentication-results; bh=ArAHNOjNguMpnMy+c5FDbZNpH9MM4wm8PV2zlYpaVkk=; b=lOKo3DmzUWSmmCgdiIgsH09g7tCsrG63cys0CX8NrO9p4DtFIUOIvPPgdhk5fKOX8X pf3xK0c6HJbLHF3WwuZg+dVlbhw7fZpyrw9pWlprzaBF8H0trT92BMyp65xgToAbwLmV DbXClnXk6eTeiIDE6EPEYD8uk9Rmb4zVWXtSaJV+dhR1pQ5OukZLd1p7Fq7z1jeHBiAN X2Se0i/2ZGNTco9FepO29QL0zzbS0hxswVw6B69eXssx7fQgRf+L7NMDKqPecmKYCHMD Wq/VHPAJgSSfLxBj9BKW2XQrb3j6X5FSOQiiViOT24ljLYvLa5Ba47pWbfbebLSYrxhs kOZg== 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 q1-v6si9489385plb.331.2018.06.29.07.33.58; Fri, 29 Jun 2018 07:34:13 -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 S1755567AbeF2OPA (ORCPT + 99 others); Fri, 29 Jun 2018 10:15:00 -0400 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:57088 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1754825AbeF2OO7 (ORCPT ); Fri, 29 Jun 2018 10:14:59 -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 229B3401DEAB; Fri, 29 Jun 2018 14:14:59 +0000 (UTC) Received: from vitty.brq.redhat.com (unknown [10.43.2.155]) by smtp.corp.redhat.com (Postfix) with ESMTP id 157E11102E29; Fri, 29 Jun 2018 14:14:56 +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?= , Roman Kagan , "K. Y. Srinivasan" , Haiyang Zhang , Stephen Hemminger , "Michael Kelley (EOSG)" , Mohammed Gamal , Cathy Avery , Wanpeng Li , linux-kernel@vger.kernel.org Subject: [PATCH v3 0/5] KVM: x86: hyperv: PV IPI support for Windows guests Date: Fri, 29 Jun 2018 16:14:50 +0200 Message-Id: <20180629141455.19525-1-vkuznets@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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]); Fri, 29 Jun 2018 14:14:59 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.6]); Fri, 29 Jun 2018 14:14:59 +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 [Roman Kagan]: - Drop vp_index_to_vcpu_idx mapping. get_vcpu_by_vpidx() should be fast (1:1 mapping) in all valid use-cases. We'll optimize it later if needed (or at least discuss this in a separate patchset). - "enforce vp_index < KVM_MAX_VCPUS" patch added. - Issues reported by kbuild are now gone with the PATCH2 from v2. Using hypercall for sending IPIs is faster because this allows to specify any number of vCPUs (even > 64 with sparse CPU set), the whole procedure will take only one VMEXIT. Same as PV TLB flush, this allows Windows guests having > 64 vCPUs to boot on KVM when Hyper-V extensions are enabled. Vitaly Kuznetsov (5): KVM: x86: hyperv: enforce vp_index < KVM_MAX_VCPUS KVM: x86: hyperv: optimize 'all cpus' case in kvm_hv_flush_tlb() KVM: x86: hyperv: use get_vcpu_by_vpidx() in kvm_hv_flush_tlb() x86/hyper-v: rename ipi_arg_{ex,non_ex} structures KVM: x86: hyperv: implement PV IPI send hypercalls Documentation/virtual/kvm/api.txt | 8 ++ arch/x86/hyperv/hv_apic.c | 12 +-- arch/x86/include/asm/hyperv-tlfs.h | 16 +-- arch/x86/kvm/hyperv.c | 194 +++++++++++++++++++++++++++---------- arch/x86/kvm/trace.h | 42 ++++++++ arch/x86/kvm/x86.c | 1 + include/uapi/linux/kvm.h | 1 + virt/kvm/kvm_main.c | 6 +- 8 files changed, 210 insertions(+), 70 deletions(-) -- 2.14.4