Received: by 10.192.245.15 with SMTP id i15csp994828imn; Sat, 10 Mar 2018 17:56:28 -0800 (PST) X-Google-Smtp-Source: AG47ELtbJN0frbx/KQg+q3vLhmNKxPa1apA/WSZF7zRBWpQTbawlFG8UiPkhKgJoHjtwAq2zfKit X-Received: by 10.99.99.65 with SMTP id x62mr1535098pgb.157.1520733388234; Sat, 10 Mar 2018 17:56:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1520733388; cv=none; d=google.com; s=arc-20160816; b=ZXg8wXVOaQOz6/4NoxYq8xVzWQmE52439yKz6kxiLU4vhobS37mnJTLy5ROLYJYbRh 2l94z97HrdON9UYfdvkI7SPOjXtyPpmq7dXAnGvVwrfq2R4mU7nMlt6Y7OE02vcehPHy fiEkVIkGoAWqzr4KYZNXSvujfgICioO9j9nRwgL/E7JhZqjGYhlD6v3oJ7zSSL81v+fY MJeWVeuAJj/RC4eRL0CjPPxCm+6iHDFfSt/LBPWeG0szd5avHHJyFcK4TzMOSFfrKSCG MLRdWbv3jC8nD6pPC03I0ASI+CNAj+OhnrjC/Sta8OcAlNgRo5uPJYTJVx1BPOa4IxNh u2hQ== 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 :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=ntN9TTXveysvsTwfkmoV2gxAC22iNewh9CWyFBK3ub0=; b=Hp71IZkTPcI+wM/F49pXQ2+ZlxNXqBZp7Uf6Z1CGhHj5YKH1N8GN5x4wBGOStsczKD sWdy2jZzlMMwqyZyMwVilrAXa6ltFYZGI3Hplsrlh7qvaKiFw/EeXsVDD9nj6Ds+C+rG 45k7wcVcJKBV454XP84KdARIWIiunUSoXn8XAKWLzWVSksZXZaonAGxL/dYis0GluIXS Bet1axt6wzgP91VsZ1MV9rpErmaaJFjVV8GblQyNHTK7SBUk3xeZuhPJU5S3jiMTyxqi 8Pe+BKvXDU9U61BqhL8IBhttc+eMb/iuLK9biCVdkHXL+2xbjrc3zY+M75COiRELx0Iv rE4g== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@christofferdall-dk.20150623.gappssmtp.com header.s=20150623 header.b=euCDrDbH; 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 d7si3064252pgn.829.2018.03.10.17.56.12; Sat, 10 Mar 2018 17:56:28 -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=fail header.i=@christofferdall-dk.20150623.gappssmtp.com header.s=20150623 header.b=euCDrDbH; 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 S1751227AbeCKBzL (ORCPT + 99 others); Sat, 10 Mar 2018 20:55:11 -0500 Received: from mail-lf0-f51.google.com ([209.85.215.51]:42423 "EHLO mail-lf0-f51.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751164AbeCKBzK (ORCPT ); Sat, 10 Mar 2018 20:55:10 -0500 Received: by mail-lf0-f51.google.com with SMTP id t204-v6so18260007lff.9 for ; Sat, 10 Mar 2018 17:55:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=christofferdall-dk.20150623.gappssmtp.com; s=20150623; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=ntN9TTXveysvsTwfkmoV2gxAC22iNewh9CWyFBK3ub0=; b=euCDrDbHtENtsD3Gm1Pz86kKoKFp1AmNUWv/suAEY+Ad9YKAWZkOdgQ8qnNabgNpwn 2mzcZxawJGy0IMmToALu4i5FKF+ovD9W4ropvmCNWKyq+DcSJWMzAaVpGM5mIJmmWlod 2ZvFTIMhGPnDU/dz53cQ/rBIQXUTHZRlCdsXFfqABOd6kXvnx67aypeADKlku8XDhFuY w2Vc0a/qiZtzF6kD9avNrkEVAHOtHS8l6zPZ7skbZR7UbN/IOcZ/aFvzg0zK6/+CXUYc HxJEGNF7lJVH3deoz2YSnB2rzcSJbaRnSw2R1j9F6Q7DjSJoQuAPGNKJXlBVxv6MR6Tu Z6rQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=ntN9TTXveysvsTwfkmoV2gxAC22iNewh9CWyFBK3ub0=; b=EKJb770TTS57WJ81Yb8NCn0H7MGeb5X+nU4/boPphpDqWSnDi9HGFbNXekqQkjs4++ EACgm7IX1uZIBr3/uWeBxzjucaaTlxN5vsaRJSSrRjzULagqz67ha1a8ILtFMrRb7o6o sRvIVwwgXRuCk9xDsmml2zLu7ud7bSEdJptnrbpnqut8YD0qYIt47CaD+lCa3y+GH4HE gI2yK8wUY5EPRCttb1cqXc1g5ey87F+QwB5DNikxKBTwg9U3wVAJ9/OhbiPUPJh4hn9r iDAuqc4XaX+U/xLCtg/tKwVkmk+lm4on5wMb2Xkj5FQAt1Y2dD8+g5rrisnJshyqs1fX dGTw== X-Gm-Message-State: AElRT7EmBy/11ESFoaQoX92UbQb/nsChTWiGhd70ktgG0wFtiYeY2E9B aG8rRc4MljW/Ytl+U9aLfWjxsrZWTjjWsTjLhrx8aA== X-Received: by 2002:a19:6912:: with SMTP id e18-v6mr2060202lfc.52.1520733308512; Sat, 10 Mar 2018 17:55:08 -0800 (PST) MIME-Version: 1.0 Received: by 10.46.92.5 with HTTP; Sat, 10 Mar 2018 17:55:08 -0800 (PST) In-Reply-To: <86k1ukazr0.wl-marc.zyngier@arm.com> 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> <86k1ukazr0.wl-marc.zyngier@arm.com> From: Christoffer Dall Date: Sun, 11 Mar 2018 01:55:08 +0000 X-Google-Sender-Auth: IKcRQCZXeu6sBJzHIJOJWnd-Qik Message-ID: Subject: Re: [RFC PATCH] KVM: arm/arm64: vgic: change condition for level interrupt resampling To: Marc Zyngier Cc: Shunyong Yang , Ard Biesheuvel , Will Deacon , Auger Eric , david.daney@cavium.com, linux-arm-kernel , kvmarm@lists.cs.columbia.edu, linux-kernel , Joey Zheng 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 Sat, Mar 10, 2018 at 12:20 PM, Marc Zyngier wrote: > 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. > Where is the departure from level-triggered behavior with VFIO? As far as I can tell, the GIC flow of the interrupts will be just a level interrupt, but we just need to make sure the resamplefd mechanism is supported for both types of interrupts. Whether or not that's a decent mechanism seems orthogonal to me, but that's a discussion for another day I think. Thanks, -Christoffer