Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp3881379pxb; Tue, 17 Nov 2020 06:07:07 -0800 (PST) X-Google-Smtp-Source: ABdhPJwWHGZhdjBCGH894IzdJKWI04ck5b4MSeJhWb8LDHp/wYEWlhZAIFUOEkITMzO0Hn+qZb6n X-Received: by 2002:a50:da08:: with SMTP id z8mr20130762edj.170.1605622027690; Tue, 17 Nov 2020 06:07:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605622027; cv=none; d=google.com; s=arc-20160816; b=TqGeQMUZCroFIX5dq1ldhd2OgF/po4ixNiNBvN3rsk4sO7nsThtkads3xYeSguLBUF 1OaMDVPgE7FFhCl+AaukPP5ifuHz4qiwjigRYVV2Jv1x48d9yiO0gCsgAwslP5dRrV31 s3c3dFp0U6VJzQkhWzeKWsTV5PvH/Urs8yK9gcsRFyRluA2AvIAjJ6hvKpfv5vFxycEl rqo+HFrz2faF+Kpc5VnUK78bdcQec6vxYupZBtWOsxsTugOUqcqaxarm2O/PQIYjSUin aXPPTjEqx9C5MvUU2FUah/6Zd5rVxMTLz9j+ysZx0gUx0jdG9WFi7ksvW8KZPQtXYdZr ibpQ== 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=mK6EYaEnD9WHG6qE+HTdfEJrQSo4IBebPcYcluMPz0M=; b=ctDLSuyWwf/rk3U98mhvRHu/hbYH9PKEulJZ6w3gkhF++On/Pg3853QrbmbTDT3Dwp N95ssR15wEfgj81Cf3qeE+7goKQiVFCsOy5zAWdd4mNAupgtQ6oX63yBko2X5Xrz76Rv GGPm6N0j1MQw39Clc5qDCfZoBXSQRTv6jfMp1LEhG73gbFWjhuQba8s8eGLW6Tb3A589 wOnQCGS0/iPGX21eYskUGdEQf6OJdlD8y1sykzGaMuEIzakOHozwIy/qAlOEJcNlCUTT loXjxzFZo+gpdlV0ne+WFhfwYciqP1xn1kVrMcCx/lXceUK2ZPaM+RBNi1DenugtcSh/ hDvg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=ZDZOI+oN; 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 s15si14197961edj.165.2020.11.17.06.06.44; Tue, 17 Nov 2020 06:07:07 -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=ZDZOI+oN; 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 S1728700AbgKQNM4 (ORCPT + 99 others); Tue, 17 Nov 2020 08:12:56 -0500 Received: from mail.kernel.org ([198.145.29.99]:42984 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729893AbgKQNMw (ORCPT ); Tue, 17 Nov 2020 08:12:52 -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 72D4F246BE; Tue, 17 Nov 2020 13:12:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1605618772; bh=FcZ5WGGba1bHQqyMiNMd30HZyzt/7UtXhMCQoxXH+pQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ZDZOI+oNBrREs0LFzejpz3nQlexUR1pWrn3yLzzORFVqUinzn7y2ZjCO7bzy3U6me 6keTfJl3200sypCqISeIuBxYNdjeEaxKSL6EXKOX4ogsBKDbIRz/s4NIzf8h/BychB //4wxNmOm7zmwtUFJpRM4rKYHf+S8ADBobMmIAwk= 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.9 70/78] xen/events: switch user event channels to lateeoi model Date: Tue, 17 Nov 2020 14:05:36 +0100 Message-Id: <20201117122112.526948785@linuxfoundation.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201117122109.116890262@linuxfoundation.org> References: <20201117122109.116890262@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 @@ -178,7 +178,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); @@ -304,7 +303,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); } } @@ -404,8 +403,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;