Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp1169982imm; Tue, 3 Jul 2018 06:46:14 -0700 (PDT) X-Google-Smtp-Source: ADUXVKLMm+2HwpzuLQs/siffNdFbFSJcQ9hljUop4LI5JaoxJXnlzSzbaEj7uUZLic+rL+lr0PjS X-Received: by 2002:a65:448a:: with SMTP id l10-v6mr25783581pgq.382.1530625574812; Tue, 03 Jul 2018 06:46:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530625574; cv=none; d=google.com; s=arc-20160816; b=b3/BTXMxNzqhP2+QD0UbJ7tvtnMdLiVysvHAndk9XguF9PDaE+yTeWBT+ZQ1R4Akso Q2YF5xCk1thJLNebHU7QgQgq/A6wP4ieJmMVe4BpYXTm6httUEDVfEHZas2t7G7MaPJ/ KTzF8GYSjl9gSJZqdqThqeSt7L2qc8dGRi5cNhPnE7IxOTIIMH5KeKn1rJWyKCEiyous zQ6KaLOD+53x//bmH6N2MSoRsKv4HMuzEJK2jzXbRYgrDqQdLLYhkXd6FYZAvAZgpLqu P6LMOAOZRYL40S6m3qUOT8deU5fGvbWJBmYwPM6aDEfDlV2Yd51ctQFwumhhZgnWz+hC pLIw== 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=F1QcY7r4RmnDXh5IjXxXDmtxQF+KtDIRwhOw2Z8Qrhk=; b=qoK9zDqnu521HB0LWFPhZHX0ECFib3xF0UJfJLnYrDg86ZSwObXEHpP+2tVmQLSI+k ElgBDw+DOUx7fhqqVUbXcM6FuNt6PCrDj5rnkwLsEW/ead7wA8402qi0c3tkNflqskfy sxI31PgX9phJT862R71lDCN0nCoJActPJ0hZQ84HEqXkbp9lES3OLDNj6BypLqWk3APy y4vcl/GHRxYg2VIEeS/q+EA/LoDqwyTj7zKXzJtDpKeQBJ+bLurwZjZyJSiwUimk5ZiZ bCpcEmaPm+uqYMvOf5gXI7iqBLLvc5j5uG5FEo5voYbW4sCaNPwt3ozn0Gz6sa5Rg4qd YLxw== 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 b10-v6si1083399pls.501.2018.07.03.06.46.00; Tue, 03 Jul 2018 06:46:14 -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 S1753490AbeGCNmN (ORCPT + 99 others); Tue, 3 Jul 2018 09:42:13 -0400 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:48570 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753370AbeGCNmM (ORCPT ); Tue, 3 Jul 2018 09:42:12 -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 9B5BAC320; Tue, 3 Jul 2018 13:42:11 +0000 (UTC) Received: from vitty.brq.redhat.com (unknown [10.43.2.155]) by smtp.corp.redhat.com (Postfix) with ESMTP id 9CB42111AF02; Tue, 3 Jul 2018 13:42:07 +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 v4 0/5] KVM: x86: hyperv: PV IPI support for Windows guests Date: Tue, 3 Jul 2018 15:42:01 +0200 Message-Id: <20180703134206.27240-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.1]); Tue, 03 Jul 2018 13:42:11 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.1]); Tue, 03 Jul 2018 13:42:11 +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 v3 [Roman Kagan]: - Don't use vcpu_id in kvm_make_vcpus_request_mask to avoid dealing with sparse CPU masks. - Create get_vcpu_idx_by_vpidx() and use it in get_vcpu_by_vpidx() and kvm_hv_flush_tlb(). 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(-) -- 2.14.4