Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp819679pxb; Tue, 3 Nov 2020 13:27:37 -0800 (PST) X-Google-Smtp-Source: ABdhPJy1NyjXqcZMXdpE09/yJrmAVn+XgPTKuxojeNl57rYpjt5Np1b2g2lYx3fCnIMOsQv7/6zy X-Received: by 2002:a17:906:944f:: with SMTP id z15mr13517140ejx.111.1604438857108; Tue, 03 Nov 2020 13:27:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1604438857; cv=none; d=google.com; s=arc-20160816; b=VRCqzR+0czcQEsA0+I5B8IXY//CPR604e/GvmLsm/000rA1QIGZ4EOwcXWIZizPLYB twT+MuaErBc8jdT+fsARkrXJssm7KuQpF6FuW86HCem87HCdMXFGvKo1YKiZGeuzleHM RWYbGYcFQn+7fE0h+EegB9GWYnQUqD7R1GhbwDbxvbxBNSVduZQt7Y5ZOMKvQM3yMbTp lZxaAxkWd/3HS4WmKl172wDTpgTnBJ63zqkjpDRUXwiA2VoHZr+Xaz23WLmKKx+p+tfW 1INP80mbDwZ3JV7qzw/++hkHZNaF2V7ADAAKMK5QDsx5EfxhPDP9Xdf5RCd2u0btcS1r yObw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=5ilv3eCOxiJ72pB3sWBC/h7GnoIa4EEMti3mMhVNmsA=; b=GFZmhtccJDmAll0Tuv2tkpKTgAxLYIOrdHMKSeofWmQDLUYT0cgSI2R5uM9awn32Uh y7SJMKknxDnbQrmZUwAKIqDQd6mnPzk1l4jtuRMVtpO8TEfP/AYCS9Hafnf6E+hlEI5d zEi23I7xfRDfgryjxJku9xs5sDGRfO8mNEs+9dvUZiiXk0SEwo14OKnC3hn+EslAjD+K 6uki6C5gA82lXFXX+P7v9S3ounNmX6sLBsE+KeRvqyCZQXgdaDGjOX0TBmAiDNWFjIcv IFlMFz3A+nbPrZjX5y3AzFyvEowBCa348GY3BbJcJ1LBZ1MBgeR5Ao37dOPr+DtOdecP d4Zw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=V79eGJXG; 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=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id k9si40150ejx.605.2020.11.03.13.27.14; Tue, 03 Nov 2020 13:27:37 -0800 (PST) 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=@kernel.org header.s=default header.b=V79eGJXG; 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=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388156AbgKCVYn (ORCPT + 99 others); Tue, 3 Nov 2020 16:24:43 -0500 Received: from mail.kernel.org ([198.145.29.99]:41020 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387436AbgKCVD1 (ORCPT ); Tue, 3 Nov 2020 16:03:27 -0500 Received: from localhost (83-86-74-64.cable.dynamic.v4.ziggo.nl [83.86.74.64]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id B7C1B206B5; Tue, 3 Nov 2020 21:03:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1604437407; bh=Rwx0OUtf9ciC9CjFxF8pK/9cDjSWHEq82aK1Iv1sdAA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=V79eGJXGzDhQncHD7wEn+/3Y7N7sloyrC9q9M9cyVPPvGVD3wOS5fe/PfadU3Di35 VhMOE/ahDgCBzd3ALBiReKWtECnrPTcPP5BE5rYjm/1YqNpPLZUt6ukUhVxAOT+Ofc pJB+At3u3iP0COJ6PvLmh1OjGXVcrQvrGmO/+s1w= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Julien Grall , Juergen Gross , Stefano Stabellini , Jan Beulich , Wei Liu Subject: [PATCH 4.19 046/191] xen/events: switch user event channels to lateeoi model Date: Tue, 3 Nov 2020 21:35:38 +0100 Message-Id: <20201103203238.650521979@linuxfoundation.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201103203232.656475008@linuxfoundation.org> References: <20201103203232.656475008@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Juergen Gross commit c44b849cee8c3ac587da3b0980e01f77500d158c upstream. Instead of disabling the irq when an event is received and enabling it again when handled by the user process use the lateeoi model. This is part of XSA-332. Cc: stable@vger.kernel.org Reported-by: Julien Grall Signed-off-by: Juergen Gross Tested-by: Stefano Stabellini Reviewed-by: Stefano Stabellini Reviewed-by: Jan Beulich Reviewed-by: Wei Liu Signed-off-by: Greg Kroah-Hartman --- drivers/xen/evtchn.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) --- a/drivers/xen/evtchn.c +++ b/drivers/xen/evtchn.c @@ -166,7 +166,6 @@ static irqreturn_t evtchn_interrupt(int "Interrupt for port %d, but apparently not enabled; per-user %p\n", evtchn->port, u); - disable_irq_nosync(irq); evtchn->enabled = false; spin_lock(&u->ring_prod_lock); @@ -292,7 +291,7 @@ static ssize_t evtchn_write(struct file evtchn = find_evtchn(u, port); if (evtchn && !evtchn->enabled) { evtchn->enabled = true; - enable_irq(irq_from_evtchn(port)); + xen_irq_lateeoi(irq_from_evtchn(port), 0); } } @@ -392,8 +391,8 @@ static int evtchn_bind_to_user(struct pe if (rc < 0) goto err; - rc = bind_evtchn_to_irqhandler(port, evtchn_interrupt, 0, - u->name, evtchn); + rc = bind_evtchn_to_irqhandler_lateeoi(port, evtchn_interrupt, 0, + u->name, evtchn); if (rc < 0) goto err;