From patchwork Wed Aug 22 10:18:27 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vitaly Kuznetsov X-Patchwork-Id: 10572841 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 41CB01390 for ; Wed, 22 Aug 2018 10:19:16 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3249F2AE1A for ; Wed, 22 Aug 2018 10:19:16 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 26D002AE34; Wed, 22 Aug 2018 10:19:16 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C41CE2AE1A for ; Wed, 22 Aug 2018 10:19:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728360AbeHVNmv (ORCPT ); Wed, 22 Aug 2018 09:42:51 -0400 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:44042 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727396AbeHVNmv (ORCPT ); Wed, 22 Aug 2018 09:42:51 -0400 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 3510540241C5; Wed, 22 Aug 2018 10:18:35 +0000 (UTC) Received: from vitty.brq.redhat.com (unknown [10.43.2.155]) by smtp.corp.redhat.com (Postfix) with ESMTP id 6BEE163F37; Wed, 22 Aug 2018 10:18:33 +0000 (UTC) From: Vitaly Kuznetsov To: kvm@vger.kernel.org Cc: Paolo Bonzini , =?utf-8?b?UmFkaW0gS3LEjW3DocWZ?= , Roman Kagan , "K. Y. Srinivasan" , Haiyang Zhang , Stephen Hemminger , "Michael Kelley (EOSG)" , Wanpeng Li , linux-kernel@vger.kernel.org Subject: [PATCH v4 RESEND 0/5] KVM: x86: hyperv: PV IPI support for Windows guests Date: Wed, 22 Aug 2018 12:18:27 +0200 Message-Id: <20180822101832.31763-1-vkuznets@redhat.com> MIME-Version: 1.0 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.7]); Wed, 22 Aug 2018 10:18:35 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.7]); Wed, 22 Aug 2018 10:18:35 +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: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Changes since v4: - Adjust KVM_CAP_HYPERV_SEND_IPI's number [158] - Add Roman's Reviewed-bys 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 | 211 +++++++++++++++++++++++++++---------- 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, 224 insertions(+), 73 deletions(-)