Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp1006443imm; Wed, 26 Sep 2018 10:04:59 -0700 (PDT) X-Google-Smtp-Source: ACcGV63pHAv45TUbGgirYuuSAU3+1mYGRXxVlg7zj/qqTpMb+pcvS8sTMemRzjxRk5TT1ZsJ/nDq X-Received: by 2002:a62:7f8c:: with SMTP id a134-v6mr7109242pfd.257.1537981499287; Wed, 26 Sep 2018 10:04:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537981499; cv=none; d=google.com; s=arc-20160816; b=NV/RJa2dOFa7qxWqKTa62y0JbMCJZp4LNDXRPuOmlqnFWwt4A3S1CMWmJmqKbEhbRM /mAFFsg1RpmlI1eoEacyzN+WozdNh55n5vvuqmP6XKhnDsV0EMJg9Eis0vKxX8OEz+Rr TQwGQsRyehRSRZAYm00VXlmSraGpYq4IIP+pAJQ9NZs3Fg+Sh9M3qcpPLctCtK0+PvY7 VQ1cdMr4TOw9ogQ/3yxsQD/JrADGHxp70ypkMnfVgpp/DoZxoVrOmhOdHzsQnUxLaf51 xzXVPCWxF9CvLkUhL8+k4iy4wL4j4VlqHTUDCQND1+OCwbOlOwjuNvBlpBBbiIw8+P/Q 9PNA== 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; bh=R4VL5Mf+CVr0vSWvejdroSBx3IWYsPFc5iCN+LzflAE=; b=GDYQhlm57fsCwqpiuMhFGkNgPRjJprriauG+iUtyQMVUAc2aKwJtQwZwGhhfOJYN+N BvHP15Dm+ZkuOBtammN0AKmUQP6p77/9hmXiNJWCvVjCsi0McCc7Tcg6u5/qhGTIHLOL JJqHiJCZD5DSZfTOlzL5rEerlnLfE3XmbWWl6cjG7z04YnlIe0FWM3fwFbTB5HJHj8ng lK/XYdXD8FAQR10sQ1kWba/6qgZQSCo1khJ81mZ6TbQ1qFvnQZRzFH61VodTDqHzRsPb kdVI+uN9uGhzGqSd5uD1hDt8/Duk4wvZpfbJU7zzf1G+xF/KK8gqL4mkIIBq2E4P89Zb oLiw== 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 64-v6si5924648ply.375.2018.09.26.10.04.43; Wed, 26 Sep 2018 10:04:59 -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 S1728601AbeIZXQ5 (ORCPT + 99 others); Wed, 26 Sep 2018 19:16:57 -0400 Received: from mx1.redhat.com ([209.132.183.28]:52220 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727692AbeIZXQ4 (ORCPT ); Wed, 26 Sep 2018 19:16:56 -0400 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id D4A2B3083391; Wed, 26 Sep 2018 17:03:03 +0000 (UTC) Received: from vitty.brq.redhat.com (unknown [10.43.2.217]) by smtp.corp.redhat.com (Postfix) with ESMTP id 47D4F60BE7; Wed, 26 Sep 2018 17:03:01 +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 , Wanpeng Li , linux-kernel@vger.kernel.org Subject: [PATCH v6 0/7] KVM: x86: hyperv: PV IPI support for Windows guests Date: Wed, 26 Sep 2018 19:02:52 +0200 Message-Id: <20180926170259.29796-1-vkuznets@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.44]); Wed, 26 Sep 2018 17:03:04 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Changes since v5: - New 'hybrid' approach to VP indexes: introduce 'num_mismatched_vp_indexes' and use it for optimization in both PV IPI and TLB flush [Paolo Bonzini, Roman Kagan]. - Rebase, KVM_CAP_HYPERV_SEND_IPI is now '160'. - Patches 3-5 are new in this version. - Drop "x86/hyper-v: rename ipi_arg_{ex,non_ex} structures" patch as it is already merged in kvm/queue. Original description: 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 (7): KVM: x86: hyperv: enforce vp_index < KVM_MAX_VCPUS KVM: x86: hyperv: optimize 'all cpus' case in kvm_hv_flush_tlb() KVM: x86: hyperv: consistently use 'hv_vcpu' for 'struct kvm_vcpu_hv' variables KVM: x86: hyperv: keep track of mismatched VP indexes KVM: x86: hyperv: valid_bank_mask should be 'u64' KVM: x86: hyperv: optimize kvm_hv_flush_tlb() for vp_index == vcpu_idx case KVM: x86: hyperv: implement PV IPI send hypercalls Documentation/virtual/kvm/api.txt | 7 + arch/x86/include/asm/kvm_host.h | 3 + arch/x86/kvm/hyperv.c | 268 +++++++++++++++++++++++------- arch/x86/kvm/trace.h | 42 +++++ arch/x86/kvm/x86.c | 1 + include/uapi/linux/kvm.h | 1 + virt/kvm/kvm_main.c | 6 +- 7 files changed, 265 insertions(+), 63 deletions(-) -- 2.17.1