Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp30976imm; Tue, 17 Jul 2018 20:01:50 -0700 (PDT) X-Google-Smtp-Source: AAOMgpfUUqof58I0JFXU3BWbR04JNZMnuFlYECzGdX2PrJHYKARASMzRwcsAeTFKAedkRgyhwwKU X-Received: by 2002:a62:d646:: with SMTP id r67-v6mr3353490pfg.130.1531882910299; Tue, 17 Jul 2018 20:01:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1531882910; cv=none; d=google.com; s=arc-20160816; b=sO8yCOuQFyUXvCVeUhfGb7YKU8IMoJM46zkTP3zxxC8q2116qXUGhsOwV3zX/UlLXE /gyvpYXWPFjb6QlClhKiqZb3VAzBdz2WYd92aXE1zVyKdfaJVzU65f0p6SVndCblp5c8 2ThCiqx1gPFB+RhaOzQfOKndNYQoh2RQRFA7zfnsYDu/EmOEGABLgZ/qYtt55Gn3/h5E H1nbsi4UY1nuSg/79GwjE+QWNxaT5SuTZXqf2WSplz9gLvj79bfnOuLdoAaRb8urNxLV ckNhsJlCp9A1TIP0SSmAJw23rhH+noXEDD51TQDcGS+a785z8a7kmaOsKcx5T+UPfyiq 0Rkg== 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:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature:arc-authentication-results; bh=Cnefx7irmJ3TS12NaPO0aEpVKLaNVbb1qmdRU1dTkIU=; b=0+IEUq0HduzHtgUoYJK6TqFrYNeHX6lPI09ApLkUk0uXdfhnh0ArNr+Q0eX7t8kO1/ Hcst1rPeuvMDvOR3f0vXIQyOTFPWLQNaSDyDHrCng88u2+0ooRsHT3RmUS7495cuG9oy kv1dzh6IFoOXrNhRhzXsmhbN3kkWAOUlSQFMvuQMI1IL3EvjSj/HKwwZ33FxTwPVJaW3 ftUbm6+hYA1QJdedxZUqKzn/wu0mx4Zkadc8Z0BKgfpfBOemH9iAahHev3iCy0Uk2Rxf uz4e/6bpznxnihXnwRHovqWRw8k/T5KMFFkoA0dk5d3vhK7+uSCGe5BmQJ5NGWuIl9kK GqOg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="QocN/lVF"; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z8-v6si2344596pgr.260.2018.07.17.20.01.33; Tue, 17 Jul 2018 20:01:50 -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; dkim=pass header.i=@gmail.com header.s=20161025 header.b="QocN/lVF"; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731356AbeGRDgV (ORCPT + 99 others); Tue, 17 Jul 2018 23:36:21 -0400 Received: from mail-oi0-f66.google.com ([209.85.218.66]:36141 "EHLO mail-oi0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730614AbeGRDgV (ORCPT ); Tue, 17 Jul 2018 23:36:21 -0400 Received: by mail-oi0-f66.google.com with SMTP id r16-v6so6008572oie.3; Tue, 17 Jul 2018 20:00:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=Cnefx7irmJ3TS12NaPO0aEpVKLaNVbb1qmdRU1dTkIU=; b=QocN/lVF7mBUiNgfjIdDgxwzCG/m5TajItpw1LNy/l3V3zUMiP6EtrM8NwHU9R/0bV dhOAeiedna96ii6yrhrikWSUyGu7VYpc83EaaoWh5/HZ99b4pqt9CHpJIXgu35BlTWE5 11k8eoGNiIjTuHOiHVkk97xpxHu37+MX3xifIAZoC+GicHUQemxv63nil325n2sd0SiI fK8KBJmfLr1pHQXR4In2THCxfvKk0qDXy6oBasNIp5YwAhumqFSoy9OqFospUWzZcxqI TKMkKwHkJQlF/JaEn14Jv4tW3DpaGwamE/GDWF3h5qDCKT8OwpMC0hwI/AhgjlTBoEdd YLkA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=Cnefx7irmJ3TS12NaPO0aEpVKLaNVbb1qmdRU1dTkIU=; b=VZVcLyQ7nBj8OM+SdkhpZ/CvyBZnWW1OpeR6lIMiaqn8/6cFn80RJgVI13PYesV8te ZmT6rqZPNVDRHd3O4S/JUHzgUS9KUh+U89J/zUKOdRHQZYwkERfGon388PP42+9rtMPZ +CR6ojxL3QvJPMsXu7a/UJTJj9eRX12AfWnspbU6Yq2EwtZ2gA3lflHP7PxbuatUdQOa YNskUBoLvcRpMVY3CKLjPmFHntXrbu6bUIeecrK8PqCIh5rv5uPoyzApZMQx1GZqBaZ6 Jj54ge8vTVrfyupo8iEKyGOQAH1Daow6e8jE99ozximEMI8L0DYev5J6FBy5+K+7wtOo xSsA== X-Gm-Message-State: AOUpUlET2WWuZ50grRRfWQxYOGXsaFGggrPyTwnwvNSV7TI3xm7n64su diIuK36tfxg9QbV/a21FxPWFVGLUr4qZrjYpoHA= X-Received: by 2002:aca:7c5:: with SMTP id 188-v6mr4775127oih.58.1531882842837; Tue, 17 Jul 2018 20:00:42 -0700 (PDT) MIME-Version: 1.0 References: <1530598891-21370-1-git-send-email-wanpengli@tencent.com> In-Reply-To: <1530598891-21370-1-git-send-email-wanpengli@tencent.com> From: Wanpeng Li Date: Wed, 18 Jul 2018 11:00:39 +0800 Message-ID: Subject: Re: [PATCH v3 0/6] KVM: X86: Implement PV IPIs support To: LKML , kvm Cc: Paolo Bonzini , Radim Krcmar , Vitaly Kuznetsov Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Gentle ping, hope this series can catch up with the next merge window. :) On Tue, 3 Jul 2018 at 14:21, Wanpeng Li wrote: > > Using hypercall to send IPIs by one vmexit instead of one by one for > xAPIC/x2APIC physical mode and one vmexit per-cluster for x2APIC cluster > mode. Intel guest can enter x2apic cluster mode when interrupt remmaping > is enabled in qemu, however, latest AMD EPYC still just supports xapic > mode which can get great improvement by PV IPIs. This patchset supports > PV IPIs for maximal 128 vCPUs VM, it is big enough for cloud environment > currently, supporting more vCPUs needs to introduce more complex logic, > in the future this might be extended if needed. > > Hardware: Xeon Skylake 2.5GHz, 2 sockets, 40 cores, 80 threads, the VM > is 80 vCPUs, IPI microbenchmark(https://lkml.org/lkml/2017/12/19/141): > > x2apic cluster mode, vanilla > > Dry-run: 0, 2392199 ns > Self-IPI: 6907514, 15027589 ns > Normal IPI: 223910476, 251301666 ns > Broadcast IPI: 0, 9282161150 ns > Broadcast lock: 0, 8812934104 ns > > x2apic cluster mode, pv-ipi > > Dry-run: 0, 2449341 ns > Self-IPI: 6720360, 15028732 ns > Normal IPI: 228643307, 255708477 ns > Broadcast IPI: 0, 7572293590 ns =3D> 22% perf= ormance boost > Broadcast lock: 0, 8316124651 ns > > x2apic physical mode, vanilla > > Dry-run: 0, 3135933 ns > Self-IPI: 8572670, 17901757 ns > Normal IPI: 226444334, 255421709 ns > Broadcast IPI: 0, 19845070887 ns > Broadcast lock: 0, 19827383656 ns > > x2apic physical mode, pv-ipi > > Dry-run: 0, 2446381 ns > Self-IPI: 6788217, 15021056 ns > Normal IPI: 219454441, 249583458 ns > Broadcast IPI: 0, 7806540019 ns =3D> 154% per= formance boost > Broadcast lock: 0, 9143618799 ns > > v2 -> v3: > * rename ipi_mask_done to irq_restore_exit, __send_ipi_mask return int > instead of bool > * fix build errors reported by 0day > * split patches, nothing change > > v1 -> v2: > * sparse apic id > 128, or any other errors, fallback to original apic h= ooks > * have two bitmask arguments so that one hypercall handles 128 vCPUs > * fix KVM_FEATURE_PV_SEND_IPI doc > * document hypercall > * fix NMI selftest fails > * fix build errors reported by 0day > > Cc: Paolo Bonzini > Cc: Radim Kr=C4=8Dm=C3=A1=C5=99 > Cc: Vitaly Kuznetsov > > Wanpeng Li (6): > KVM: X86: Add kvm hypervisor init time platform setup callback > KVM: X86: Implement PV IPIs in linux guest > KVM: X86: Fallback to original apic hooks when bad happens > KVM: X86: Implement PV IPIs send hypercall > KVM: X86: Add NMI support to PV IPIs > KVM: X86: Expose PV_SEND_IPI CPUID feature bit to guest > > Documentation/virtual/kvm/cpuid.txt | 4 ++ > Documentation/virtual/kvm/hypercalls.txt | 6 ++ > arch/x86/include/uapi/asm/kvm_para.h | 1 + > arch/x86/kernel/kvm.c | 101 +++++++++++++++++++++++++= ++++++ > arch/x86/kvm/cpuid.c | 3 +- > arch/x86/kvm/x86.c | 42 +++++++++++++ > include/uapi/linux/kvm_para.h | 1 + > 7 files changed, 157 insertions(+), 1 deletion(-) > > -- > 2.7.4 >