Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp3882974pxb; Tue, 17 Nov 2020 06:08:52 -0800 (PST) X-Google-Smtp-Source: ABdhPJzp5lrkQePrHocUJxJ3+H5yNbrdvNLH/mzc4oTAJl8xilgtNUKq7FJ9aVLjqxreUfUUe3Wz X-Received: by 2002:a50:c40d:: with SMTP id v13mr21267109edf.1.1605622132224; Tue, 17 Nov 2020 06:08:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605622132; cv=none; d=google.com; s=arc-20160816; b=c1Z34ZvqLZDrjjvi5FKOI8dt3r1ivbgtSin1RYp5AXrP2Nslp+42LGRw+pQpPEgvei MNoNi/fG1XLKVCsRr1KKGFCB2lFEwk8F7Tkmzj+Fjh9WJVaepQwoIV7kGOeLCGqUpFZH ADaDk65E3v93lPf+ediAVOC29mXtpvwkGYJBxpmk2NzNkm/u1unLkfIIlSAnNe48zVcN FgVt8hch1g7fy8B3YukE2hT1tZECKjG3akUKVCz8Wq5AjuUBPz+R5gCAXWXAOYc29RZy ZfATFwmuzW9epRiyeOuYi6Du37UJN519MbQywuY7kbXdwtPqKMja3DT7bDtMr6ewhquZ OvKQ== 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=NDKKUnjv2uhBFAGbYUIHQl5zWPirsIgD7YW4BUKCJrU=; b=Di89jyiDY3Z80Nopg/nJ6fQqsQBJpksECKa+MQWSquLPsAxs/84CNt9hsU3nmrB86b uqc3nyVKaA/ySiQHhbP+D02GJr3FwZh0bTSkDkEgWfT1DivEMckvQIQ+6hOECa1pjwu9 zGRiTvfGsKcKaC7KIo/asIfb8nPyebLXOp1Ydm+akYU7wqZd35aD9kZ2dKGmZFgiWBSh v/oRQKmL/zqV66fpugoowBWRxU2ZxxOBpE2z1/P7daaeYiBOLfO9hqbEGxR6mRhQ51tH wox8zlp8lCSmOE2C8/bpqaCF0O+7HlZIKYeV1rIcCRGnQcE0BeQ4mVieAZSrnhfiqm7M UvcA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=mTntM17W; 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 ec19si13915006ejb.669.2020.11.17.06.08.28; Tue, 17 Nov 2020 06:08:52 -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=mTntM17W; 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 S1729895AbgKQOGN (ORCPT + 99 others); Tue, 17 Nov 2020 09:06:13 -0500 Received: from mail.kernel.org ([198.145.29.99]:37028 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729277AbgKQNI3 (ORCPT ); Tue, 17 Nov 2020 08:08:29 -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 90D8E221EB; Tue, 17 Nov 2020 13:08:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1605618508; bh=WsR2k/rF0cm3YmDATP6Q/YMvfTfqpOq85JxJy+u30oo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=mTntM17WqdkMXBjFI/Nulm1YilrerekfAfCCxz1eUjSuQu/wvBsjqFinwtHyG6e4G JlgpDSBtOOCl6iK+1oF8R4aWomzpC5dj+wAAluZ2lyC67nVV0UphR4nenmcrQyJ4r1 NcqFRYwU9+U00QssWXlBnH5TaBqX5TmkNkl1196k= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Greg Kroah-Hartman , Julien Grall , Juergen Gross , Stefano Stabellini , Jan Beulich , Wei Liu Subject: [PATCH 4.4 56/64] xen/events: switch user event channels to lateeoi model Date: Tue, 17 Nov 2020 14:05:19 +0100 Message-Id: <20201117122108.942172526@linuxfoundation.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201117122106.144800239@linuxfoundation.org> References: <20201117122106.144800239@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 @@ -173,7 +173,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); @@ -299,7 +298,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); } } @@ -399,8 +398,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;