Received: by 2002:a25:31c3:0:0:0:0:0 with SMTP id x186csp6360018ybx; Mon, 11 Nov 2019 07:59:47 -0800 (PST) X-Google-Smtp-Source: APXvYqzNtxhwxssxGlXC8W2jyymwHMMwhywxnWZ22cnz34+snCQvki46GpedBVUwFFNWetjAI8kw X-Received: by 2002:a17:906:4c8c:: with SMTP id q12mr12567878eju.256.1573487987342; Mon, 11 Nov 2019 07:59:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573487987; cv=none; d=google.com; s=arc-20160816; b=Miml/OTruOrzpUY/1M/+gIa4fOniSIDFmQYEuk+eGpG4+0FPV3iku1hUGZXt/zLoAC DoDhVy9puPnQ0pgJX7NSaOhlRQQXsYnBSCpu8KPL2I4cOVYZUTtrourX5p4Mo2EYIGiU acmERo6/id5WsQ/FRhZ4ssCXdq3fL0gWScpLahMR0QADr6fBjU++0bsSOPMfVZ9G19KE w9haboSz+MUmLdLm4u7GPd90M/b6pctYbsyd6IuoEBPBceguKUP0eP/tlhEDc5pUyZYt gd4abtvgoFtRQJ9KJykll/CSYeNMjcG22pVsEP4NtfRMkO+wOl4cO1MPYnFkGg/u5pc1 T1wg== 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 :content-language:in-reply-to:mime-version:user-agent:date :message-id:openpgp:from:references:cc:to:subject:dkim-signature; bh=/zG3yoOFQ60fgDUu8iKgwOvLofe+T2ZT+OEjsdj3fPg=; b=dpAMSvgGdgIgrCrfb5ceB7B8Y70hhj5PYF8wMboKy7qotWrybdIaV4Xbq6IlIt6Ezj a71TndMjNwxmBVMXPyohJ043kw4xfcc3baM9fHLU8bhOT5aWQ7ruViAKduBvE1yYEjmI zLdTirU4+a5yoR6dV8QaOXqOqyFDiwPUZdUYsGEbufXon+FllBJAhX4V9LkH1nM+kNDL Pna4kILfFyZ1/ppatHCBIw/S2iSh+/lP16rPcjwzZhoF38M7YLzOFwa0WDFuwr5gBkj6 K9aiJ4b4p6NDOZGGmwThO4XOfy5Xkp/NbAiRvRJh78qyilTM371d4mEdsGKWrrhrZrig f9dQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=O2EKXZ6u; 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=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 u24si12371039edl.447.2019.11.11.07.59.22; Mon, 11 Nov 2019 07:59:47 -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=@redhat.com header.s=mimecast20190719 header.b=O2EKXZ6u; 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=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726962AbfKKP6g (ORCPT + 99 others); Mon, 11 Nov 2019 10:58:36 -0500 Received: from us-smtp-1.mimecast.com ([205.139.110.61]:45614 "EHLO us-smtp-delivery-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726857AbfKKP6f (ORCPT ); Mon, 11 Nov 2019 10:58:35 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1573487914; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:openpgp:openpgp; bh=/zG3yoOFQ60fgDUu8iKgwOvLofe+T2ZT+OEjsdj3fPg=; b=O2EKXZ6u1/DY7o3DsNRk4yZY0zXVtoqxeX0NQJOyb1N+/PsTCcvHQNyw+MKuQb9USPtDQ3 lD0oUbMOjmz5X/GvAeR1mRmmaEg+LiHHcNGsyn2KGrkbG7pBGlWmveDbVP3RuGzT6vfN3k kJ1ER5boN2fWiffRdQaNmD8wU7mbVK0= Received: from mail-wr1-f71.google.com (mail-wr1-f71.google.com [209.85.221.71]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-386-c_KtEQboPJ27eSAl31xmyA-1; Mon, 11 Nov 2019 10:58:33 -0500 Received: by mail-wr1-f71.google.com with SMTP id k15so2924039wrp.22 for ; Mon, 11 Nov 2019 07:58:33 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:openpgp:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=F+pHRgddGzkdWCbCt4gYbg2WEhYZkSyJrPGHwvy6a9c=; b=rbEWZEmgsxPuhpkwqpfsj0JOfSXoL1UDJnsOpos203StFMilmo3R+2WE/svAlqZhZ8 qi0VQYKAU4EDz8HVx8pukZpxmAEXUYk+sM6kIAfiNYp1N0POr3YEgbgFV8XOo6MCMVWJ 81a3EDrBOHu7lkAlFjh2Ltvd72ZYgbZtw2ONTHUWZCZz4R44dPTe4mcOcYdbIBnsjpeo xYuxSSi9+5gySZo6iP6QWDWynI1RTEJSWfcACTSU0s/tJYafsUTA7vs89L9jB+qGbk6t C7wOJAnRfxGqJjpaXkdesRKkogcT+Jriw2Dh/pJBOdilOez32T0xX8JPt5aPzgIqXhjx c/5A== X-Gm-Message-State: APjAAAUUt+bReojEL7jryAqRComjw1pfquHedodUdXQfKcCKH7HkzVim Nk5MgarH+DptaA8xSmDKZd3HYA/o9Hi9+F3L9n6L+bSQz3nBmXDyVDDn4xRm1ZWSe4cxchxPRBR fD+TiCq9nC8oTF4dqwevlbiOw X-Received: by 2002:a5d:4684:: with SMTP id u4mr16878024wrq.352.1573487912239; Mon, 11 Nov 2019 07:58:32 -0800 (PST) X-Received: by 2002:a5d:4684:: with SMTP id u4mr16877997wrq.352.1573487911940; Mon, 11 Nov 2019 07:58:31 -0800 (PST) Received: from ?IPv6:2001:b07:6468:f312:a0f7:472a:1e7:7ef? ([2001:b07:6468:f312:a0f7:472a:1e7:7ef]) by smtp.gmail.com with ESMTPSA id w17sm8727264wrt.45.2019.11.11.07.58.30 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 11 Nov 2019 07:58:31 -0800 (PST) Subject: Re: [PATCH v1 1/3] KVM: VMX: Consider PID.PIR to determine if vCPU has pending interrupts To: Joao Martins Cc: kvm@vger.kernel.org, linux-kernel@vger.kernel.org, =?UTF-8?B?UmFkaW0gS3LEjW3DocWZ?= , Sean Christopherson , Vitaly Kuznetsov , Wanpeng Li , Jim Mattson , Joerg Roedel , Liran Alon , Jag Raman References: <20191106175602.4515-1-joao.m.martins@oracle.com> <20191106175602.4515-2-joao.m.martins@oracle.com> <67bca655-fea3-4b57-be3c-7dc58026b5d9@redhat.com> <030dd147-8c4f-d6e3-85a8-ee743ce4d5b0@oracle.com> From: Paolo Bonzini Openpgp: preference=signencrypt Message-ID: <5ee4c4ae-9d22-d560-bb61-e5f40b56da2e@redhat.com> Date: Mon, 11 Nov 2019 16:58:33 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 In-Reply-To: <030dd147-8c4f-d6e3-85a8-ee743ce4d5b0@oracle.com> Content-Language: en-US X-MC-Unique: c_KtEQboPJ27eSAl31xmyA-1 X-Mimecast-Spam-Score: 0 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 On 11/11/19 15:59, Joao Martins wrote: >> Should we check the bitmap only if SN is false? ^^^^^ Of course it should be skipped if SN is false, as you correctly say below. >> We have a precondition >> that if SN is clear then non-empty PIR implies ON=3D1 (modulo the small >> window in vmx_vcpu_pi_load of course), so that'd be a bit faster. > Makes sense; >=20 > The bitmap check was really meant for SN=3D1. >=20 > Should SN=3D0 we would be saving ~22-27 cycles as far as I micro-benchmar= ked a few > weeks ago. Now that you suggest it, it would be also good for older platf= orms too. Or even newer platforms if they don't use VT-d. Paolo