Received: by 10.223.185.111 with SMTP id b44csp1363392wrg; Sat, 10 Mar 2018 04:22:28 -0800 (PST) X-Google-Smtp-Source: AG47ELv9P+tXO7xMdozs2jqvQhudvh9XNJn3RHBz4H9bwkVLHeu7JDO+gLc04mGOJkYAykoNX0E/ X-Received: by 10.98.59.218 with SMTP id w87mr1877604pfj.37.1520684547964; Sat, 10 Mar 2018 04:22:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1520684547; cv=none; d=google.com; s=arc-20160816; b=PE2ApKRbIuGp8KBhHfzz5P+dv+E6LBip76jvn7H383GRvlVpfNEvtkjwovOR14p1De APQI4taxgjAZtIt/mI9G/lpxlKTKA4GetR7wkJxxAQdzXHv9RYrWf14Xm48nOCQ1aFkT VOa1jUgUokiW+EyLYO+EFMackbXQdYt7oM0oYW5Z8Sb/fMxj8PEbt0jnounNQ7MHYQlv WHtwO/gaZ5IeAmp148cXsrKh4mcpEnXQZXGTdHMBVJS0WSd88m+OhBqLua5G02xl0v7Z VB8cCJ0GSuvHosf2B2wwFfe++zSd0/hqgV1W3gc/ygfGDFoYteO7jI1YBoin3KjGKGo+ cJsA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:organization:user-agent :references:in-reply-to:subject:cc:to:from:message-id:date :arc-authentication-results; bh=ZMdg/IkkfFYEA8wkRPed6d8zVKO4EepjDNF0usUwsgk=; b=iwV5fSbyI1ikqoB0Fm5jL9kxTOsjsKRQEx4rvkaAhYLA46/luoAO6JXYtwu6lItXlf eB5qwI2/uKQKfETqt2w9rogyKUhhkpvkxRHrD97pVWOhScMnFU8leOi0b41SCANfsGQ9 m7kalyiiBkFzdrVPvlAiVsaxh65nBzr/YmO2qfiR7M+9xTyrKL+NTF1WfhZINYuUU8Dw BSQW55CwH9gO+T1GXTl4aG3PWSHGZwoGSvgQdzblDlQgzPH6ZTbSeJcObkkEEqfXO5iB 6CiEuNKzESsFSNEJhb7kPDJE7zEmUqsM0YpT1mYCb5dXp8WwpT8D9kX5iGul5478jiYI UxUw== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i12-v6si2792236plr.308.2018.03.10.04.21.54; Sat, 10 Mar 2018 04:22:27 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932876AbeCJMU0 (ORCPT + 99 others); Sat, 10 Mar 2018 07:20:26 -0500 Received: from usa-sjc-mx-foss1.foss.arm.com ([217.140.101.70]:35392 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932528AbeCJMUZ (ORCPT ); Sat, 10 Mar 2018 07:20:25 -0500 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 091A21596; Sat, 10 Mar 2018 04:20:25 -0800 (PST) Received: from big-swifty.misterjones.org (usa-sjc-mx-foss1.foss.arm.com [217.140.101.70]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 7FD073F487; Sat, 10 Mar 2018 04:20:22 -0800 (PST) Date: Sat, 10 Mar 2018 12:20:19 +0000 Message-ID: <86k1ukazr0.wl-marc.zyngier@arm.com> From: Marc Zyngier To: Christoffer Dall Cc: Shunyong Yang , ard.biesheuvel@linaro.org, will.deacon@arm.com, eric.auger@redhat.com, david.daney@cavium.com, linux-arm-kernel@lists.infradead.org, kvmarm@lists.cs.columbia.edu, linux-kernel@vger.kernel.org, Joey Zheng Subject: Re: [RFC PATCH] KVM: arm/arm64: vgic: change condition for level interrupt resampling In-Reply-To: <20180309213612.GD1917@lvm> References: <1520492490-7943-1-git-send-email-shunyong.yang@hxt-semitech.com> <9ad47673-068e-f732-d2ca-9c76a8fbdfbc@arm.com> <0a15633d-8944-cb9b-3e6b-b08ee5ec42b9@arm.com> <20180308161900.GC1917@lvm> <86r2oubho3.wl-marc.zyngier@arm.com> <20180309213612.GD1917@lvm> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM/1.14.9 (=?ISO-8859-4?Q?Goj=F2?=) APEL/10.8 EasyPG/1.0.0 Emacs/25.1 (aarch64-unknown-linux-gnu) MULE/6.0 (HANACHIRUSATO) Organization: ARM Ltd MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 09 Mar 2018 21:36:12 +0000, Christoffer Dall wrote: > > On Thu, Mar 08, 2018 at 05:28:44PM +0000, Marc Zyngier wrote: > > I'd be more confident if we did forbid P+A for such interrupts > > altogether, as they really feel like another kind of HW interrupt. > > How about a slightly bigger hammer: Can we avoid doing P+A for level > interrupts completely? I don't think that really makes much sense, and > I think we simply everything if we just come back out and resample the > line. For an edge, something like a network card, there's a potential > performance win to appending a new pending state, but I doubt that this > is the case for level interrupts. I started implementing the same thing yesterday. Somehow, it feels slightly better to have the same flow for all level interrupts, including the timer, and we only use the MI on EOI as a way to trigger the next state of injection. Still testing, but looking good so far. I'm still puzzled that we have this level-but-not-quite behaviour for VFIO interrupts. At some point, it is going to bite us badly. M. -- Jazz is not dead, it just smell funny.