Received: by 2002:a05:6a10:d5a5:0:0:0:0 with SMTP id gn37csp2920119pxb; Fri, 8 Oct 2021 19:19:40 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwTmXfNbIuu1youMDEGaYhcdIdavrxYAiaO3kyRKExlMSrEB2rXNyQyboAHEROlHrYVOFo+ X-Received: by 2002:a17:906:fc11:: with SMTP id ov17mr8712997ejb.249.1633745980553; Fri, 08 Oct 2021 19:19:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1633745980; cv=none; d=google.com; s=arc-20160816; b=D8C8SSPisK6ih1Hig2fzQvVAE4d9myfu66IwpA3DPejnLL/KifWmdG06fBsAhcAyND DkAGNcLeCeRqLo4vhxIwsVPFX7PIAgE6bOwGANUXg12J1QvCmxMPEXV+ZgfMX0VSVCqX 65jO2QiXbVRx8TOoHVsqo4mTbsCPEHjVKiYD/4O87T/ToIX1q+uFDvsIf8R/PhEurchh eRdpg/8WBS7bvzzVkVx0yFamXu25wmWjoxM6wFDkcIa6YB30xUPeX2I2FOdN63hbM0qt 7Ey96XPj24fIeWLw38eEdm6oLgGyck8Zn6lPLQ/N//nuZjcOC5YB/xadsUx2+HrRXZcd jtkw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:from:subject:references:mime-version :message-id:in-reply-to:date:reply-to:dkim-signature; bh=DNh7SHjv27CkTpVQ6UDQfpazfFfU/7m49a7OyCmxJ04=; b=KDC/XomAPyIp1Ht9eUJbjvcFGva2IckxCOOEAtHX8zRZT5N/t1F8/nipYn/MqE8O6O fY3jfZC/zqLRGj4Q/r0r/2vauYx+FZ1d+S7mWYieS5n7Tul8gVlYVhs3NEKBGyf9b4BH 2bziihs3tuH5iSsHZdWvkOc6F374dbHJCq9xjCNqTbhkfcPSkaEP1qJuAacauz7emEVB 7/xPxKUFqp5ORkmMBWLeklHZ1o5FJwJJdfpVHqGwas6YjA9r7s6t+/Xj6CCRNK1ZuWGo 2VFNTgbSpTnqgvrwy3c1bDOI3BVACZ9LuaHCKvlonuFe4OyKh9/5I2QJzNaEOujS7JBt e0dQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=OmBEyvgB; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id ry6si1912118ejc.180.2021.10.08.19.19.14; Fri, 08 Oct 2021 19:19:40 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=OmBEyvgB; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244657AbhJICTn (ORCPT + 99 others); Fri, 8 Oct 2021 22:19:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38370 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244561AbhJICTI (ORCPT ); Fri, 8 Oct 2021 22:19:08 -0400 Received: from mail-yb1-xb49.google.com (mail-yb1-xb49.google.com [IPv6:2607:f8b0:4864:20::b49]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 31CF1C061776 for ; Fri, 8 Oct 2021 19:14:28 -0700 (PDT) Received: by mail-yb1-xb49.google.com with SMTP id b9-20020a5b07890000b0290558245b7eabso15006071ybq.10 for ; Fri, 08 Oct 2021 19:14:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=reply-to:date:in-reply-to:message-id:mime-version:references :subject:from:to:cc; bh=DNh7SHjv27CkTpVQ6UDQfpazfFfU/7m49a7OyCmxJ04=; b=OmBEyvgBxrWmm+DnEXtUY5SGJEDJ8rfSRexcZ/sLohcuuuU8wRBxtkVvWgAcEXTtDu CSHWkz3NrHAP8CQWDZPjwrNyXQv8t3ZVqtgnkJTeroV4I4ofTpUhF08tAgeFlhHpdjz5 DSzs4995JQ4bvC8+hT2zhEZx03XMTSTWwaAlUhES+GMR0I/ltEGK03OtIT6xjHVnTBjL MK1iAMhumx1HDCHEN7Q0/UoppdBB6U1GwAdJ4EO2l1vq2DEjW94MHM8qR3/RmALo617b gz6KYIdYwOM9rgqP7AeVSQ/Il0lIODnMHAbfZnMNEpK7JCaMpNzkLfJZPqdAxx+LfqzC +uFQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:reply-to:date:in-reply-to:message-id :mime-version:references:subject:from:to:cc; bh=DNh7SHjv27CkTpVQ6UDQfpazfFfU/7m49a7OyCmxJ04=; b=C3/NAAtY7yegU6DKUTahBZJOQim9pD1t3gvu4k1yKUTsmieJ3npj96EjVXZdfS9F0O pJc2624t+beqPKf+WOzrdVVrtNZMHPOY5Cq5e2dH22qaiSc/bwnzbb3NU6ffmOS7frbr 7GX40F/kWScw2GqyFdZp2C0GxCR9x1MbPfGrnx2DJM9Frglp+LC3Am3fMFUHJhtARbEl Q9O05t3vhuoNsbPuOqkezRne54aYO4zLWh+U2tlSc1/3J4yY5de4oaO+3gcboxZ5sTN4 SyvL46FJ2a9QI28d1RUuzxlpunlC0b3b9PfWvCN0DklGljz5mJog8rG40felwDyjCn9F 7eLQ== X-Gm-Message-State: AOAM531ySlc59Og8L4cwQ1nSPVSy5c6ftc4QSY12brq1Eg/glDPs1RtT hB+WC8bB3231yCS5M2hmuRSO8SfE4/w= X-Received: from seanjc798194.pdx.corp.google.com ([2620:15c:90:200:e39b:6333:b001:cb]) (user=seanjc job=sendgmr) by 2002:a25:77d6:: with SMTP id s205mr6993283ybc.529.1633745667357; Fri, 08 Oct 2021 19:14:27 -0700 (PDT) Reply-To: Sean Christopherson Date: Fri, 8 Oct 2021 19:12:36 -0700 In-Reply-To: <20211009021236.4122790-1-seanjc@google.com> Message-Id: <20211009021236.4122790-44-seanjc@google.com> Mime-Version: 1.0 References: <20211009021236.4122790-1-seanjc@google.com> X-Mailer: git-send-email 2.33.0.882.g93a45727a2-goog Subject: [PATCH v2 43/43] KVM: VMX: Don't do full kick when handling posted interrupt wakeup From: Sean Christopherson To: Marc Zyngier , Huacai Chen , Aleksandar Markovic , Paul Mackerras , Anup Patel , Paul Walmsley , Palmer Dabbelt , Albert Ou , Christian Borntraeger , Janosch Frank , Paolo Bonzini Cc: James Morse , Alexandru Elisei , Suzuki K Poulose , Atish Patra , David Hildenbrand , Cornelia Huck , Claudio Imbrenda , Sean Christopherson , Vitaly Kuznetsov , Wanpeng Li , Jim Mattson , Joerg Roedel , linux-arm-kernel@lists.infradead.org, kvmarm@lists.cs.columbia.edu, linux-mips@vger.kernel.org, kvm@vger.kernel.org, kvm-ppc@vger.kernel.org, kvm-riscv@lists.infradead.org, linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org, David Matlack , Oliver Upton , Jing Zhang Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org When waking vCPUs in the posted interrupt wakeup handling, do exactly that and no more. There is no need to kick the vCPU as the wakeup handler just need to get the vCPU task running, and if it's in the guest then it's definitely running. Signed-off-by: Sean Christopherson --- arch/x86/kvm/vmx/posted_intr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/kvm/vmx/posted_intr.c b/arch/x86/kvm/vmx/posted_intr.c index f1bcf8c32b6d..06eb9c950760 100644 --- a/arch/x86/kvm/vmx/posted_intr.c +++ b/arch/x86/kvm/vmx/posted_intr.c @@ -192,7 +192,7 @@ void pi_wakeup_handler(void) pi_wakeup_list) { if (pi_test_on(&vmx->pi_desc)) - kvm_vcpu_kick(&vmx->vcpu); + kvm_vcpu_wake_up(&vmx->vcpu); } spin_unlock(&per_cpu(wakeup_vcpus_on_cpu_lock, cpu)); } -- 2.33.0.882.g93a45727a2-goog