Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp1194433ybc; Tue, 19 Nov 2019 16:26:31 -0800 (PST) X-Google-Smtp-Source: APXvYqwbl4pYR9BbLyyZR1S3d0qhB4JxURmBYbvOW2fzPviL0sEzdPHjcc970BR2830dMZ8N4Aft X-Received: by 2002:a17:906:3d2:: with SMTP id c18mr830610eja.111.1574209591338; Tue, 19 Nov 2019 16:26:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574209591; cv=none; d=google.com; s=arc-20160816; b=ibNKZXoQUBWz6isxUBffHSHhALu7+gU1eBfhhVqGF6lKSlRact3aet7RRmRi5j5wcI y2pEUZTErGnuDJZPLqcFVG5adCBv2VBLzKkTXp1f2dC2V8I8iyGD8oytt5IcdTFY0xgi FaFZiong9MX2Yq9Vbu77cO0FtXWiA6wCx/71KkASdLg2XAodiblTvokn0v37BexjCh/e pHEKqlw8jr/JuS54Ml2jgBMwjt44THT64xw3zD6YgvsPRWVwZdj4VDZwnpYUuUa6QvWo rpVrq2dOIuVOAJA+e7nN447cxn9sPSdP4Fa66OFXDDb7GI6N3mFhTanZOROZ3W2YCoKw vaxA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=zj3yLRE9mChhE9Y5QGgi6KN2BsNMSKx/IHvPGJJ4ykE=; b=lR/tobKX406fSNkZ4GNJ3qHsGatelOKMupJgtiLgFYfp0IdJX/iK1ZuHJSx6n3OejF rjOeGdgvdZOHyyvgMSrhamK4ZgT10I2GBkWRNNpQxZ4f3Q0z5oB05+zz41LkuOITYr/g ZetOOBd4a7pmFAuVKF5c950Aof7mDqTG8alT+9YgCAzlR2c/ZPOs6XjuzWQQzy3N793m +59ObyNrxnPOiAokN0/7jtpq00pEqnnv+mZPv1NDw2mlPG2J/qQdjq1wpLgI7fIwswwH RGaIyQWt0p640qsdT/0tvMNzc+BsHx/5IBf8PenI81dfRcMamWO5ILVRXIK3eCPaZ/Mr TUaQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=N5ceSSCt; 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 g6si20010787edk.210.2019.11.19.16.26.05; Tue, 19 Nov 2019 16:26:31 -0800 (PST) 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=N5ceSSCt; 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 S1727508AbfKTAY4 (ORCPT + 99 others); Tue, 19 Nov 2019 19:24:56 -0500 Received: from mail-oi1-f196.google.com ([209.85.167.196]:33552 "EHLO mail-oi1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726911AbfKTAYz (ORCPT ); Tue, 19 Nov 2019 19:24:55 -0500 Received: by mail-oi1-f196.google.com with SMTP id m193so20871418oig.0; Tue, 19 Nov 2019 16:24:53 -0800 (PST) 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; bh=zj3yLRE9mChhE9Y5QGgi6KN2BsNMSKx/IHvPGJJ4ykE=; b=N5ceSSCtzoVYd7iWmBRN1bNulvCxzlk98qJxo5GJC2GT0yGtml/gsqVSXUc/6f2z7B /B2QEx0Xb7YN83EJzchBuA/6w8aSfHAoBNSCRkriEyIaq2uGRtOV669JZUgyea2oG44I LqJKHxpmWlLhfTO3Rje/4Cws36BPCyGziJAjDfjypf1F+5wkEmV8GsWizJ6K0QalJ401 n0zDibXvyF8ThW8ZkY31NOL2YM07T6UxAZprDik5ozePdBf+Sw7+KXRBmTZX16Wwm+eU M1SOaiCp3KItHzsk4k57Fnlz+5PqS6ngQcpe9f6FOT0DRXytQRpmtJbuvnmRRu2sLixo 1LjQ== 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; bh=zj3yLRE9mChhE9Y5QGgi6KN2BsNMSKx/IHvPGJJ4ykE=; b=m2kXgQpTH7RR5lGncDu4PlvJUaTUGLPK47yIz7BlGQVfYRd00CnviHtOShG5EyNrOg TePe6iXS7tfBLzNnz+eFmc41M+AehTnTBOZCdDC9auqSC1npSdsATs3xRypyowZt9Gwx l5nIEuQHWOTFrxzTot7EezS2iZtLl1H40SWLiVezuawOB6YnzJFUsHGpyp6wdTBpgfRC e9lNAfv2qqCqfP0ILtCXgxKKgYojHichIYMzQvK1h+xJTDtKvComKalXN4dg5zr5Vukl 8i7OI1wyJpRup4Go+feu39gWPtf1k5kQKPcPUohiQ2Gik9tuBEFbqL/gTX5Qqr2Iycye bgbQ== X-Gm-Message-State: APjAAAV7cOdoN94eZWIG3QJtAB5IwW+iXYUsAxwiTKdBjY2g3hAiwHox UnKv2JO/YxBK78TNXVkfMdCJxxyolgS2MWmLFc0= X-Received: by 2002:aca:5015:: with SMTP id e21mr255434oib.174.1574209493397; Tue, 19 Nov 2019 16:24:53 -0800 (PST) MIME-Version: 1.0 References: <1574145389-12149-1-git-send-email-wanpengli@tencent.com> <20191119183658.GC25672@linux.intel.com> In-Reply-To: <20191119183658.GC25672@linux.intel.com> From: Wanpeng Li Date: Wed, 20 Nov 2019 08:24:45 +0800 Message-ID: Subject: Re: [PATCH v2 1/2] KVM: VMX: FIXED+PHYSICAL mode single target IPI fastpath To: Sean Christopherson Cc: LKML , kvm , Paolo Bonzini , =?UTF-8?B?UmFkaW0gS3LEjW3DocWZ?= , Vitaly Kuznetsov , Wanpeng Li , Jim Mattson , Joerg Roedel Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 20 Nov 2019 at 02:36, Sean Christopherson wrote: [...] > > From 1ea8ff1aa766928c869ef7c1eb437fe4f7b8daf9 Mon Sep 17 00:00:00 2001 > From: Sean Christopherson > Date: Tue, 19 Nov 2019 09:50:42 -0800 > Subject: [PATCH] KVM: x86: Add a fast path for sending virtual IPIs in x2APIC > mode > > Add a fast path to handle writes to the ICR when the local APIC is > emulated in the kernel and x2APIC is enabled. The fast path is invoked > at ->handle_exit_irqoff() to emulate only the effect of the ICR write > itself, i.e. the sending of IPIs. Sending IPIs early in the VM-Exit > flow reduces the latency of virtual IPIs by avoiding the expensive bits > of transitioning from guest to host, e.g. reacquiring KVM's SRCU lock. > > Suggested-by: Wanpeng Li > Signed-off-by: Sean Christopherson Hmm, I welcome the idea to improve the original patch, but this is too much for me. :(