Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp3848665pxb; Tue, 17 Nov 2020 05:19:37 -0800 (PST) X-Google-Smtp-Source: ABdhPJxP3NOPyhlVB+QNZbrt8KHQFGNpqEsMdFw3SDqu5EIB/WCbFiM/Vkz60HU20fQB3jGjqebA X-Received: by 2002:a17:906:1458:: with SMTP id q24mr20110671ejc.541.1605619176928; Tue, 17 Nov 2020 05:19:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605619176; cv=none; d=google.com; s=arc-20160816; b=hN+2eBkrKQR60M87PxZAP0nm82AAtcTH9GJakNA6LaSV91+sQksbbR7hVVr1HnxLwi 44mdAHw2xb/m9w5qDkzw1Xgb5+vyuiKWVp5ss7Ta5163ECk4zaXMqMdynG7LQD2T4jpj ClmcISPCyW5K+SiN32LkgB3gU0JKqiMVy58oHmz4V8RqaTFqMNmSCz7NTtX+3vvRJKaK MESqbFwDCsH++i4u3+J9NLhey1HJNsJRFbqxveU9YDTI0xbTcGzOhYjxhMSRK0UB4ZK8 C4Jxp0d0hPwnbVrWd/rcoMs2mHL2CNUaJohI2eRk9iZKoUB9x4qmy6nB6Cai3+6mHzcT HaEw== 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=1nKPMHRri8kX0UHf3bkYVvbuFnZphpqsjfrSx9qvOh4=; b=xu6/Aunj1UzikY7aIPRoTwhAIqYpaTfBNxG1yd6BMYqSFupjVwl6Hda4qaIdfzgWsH M6O3jAfWEH6FQSMkc7wHlYN8v1kWv3IVBTLWDkTgbSwfTputVoFiuKXAVSdhQ796we9n DseMLrrNYpOS02XOtuJdPlnKi4JC0R1slS1QFK7x7xCKqncnbpZYLthnzVyUx+eMqukX NoPbEXCspTDU5FqcfokABw/gSkN1mFZJ//gkrVVYGTULSPtMD0l5i8VHlpqgn9HwTlCk /ZgLVBYW3x6Y3RHIsSeyd5hf3fs0mbW5LLaXnqCqMdxvXhI1g7J9YUOIMvmgsjXlYiTm xHIQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=ix6XJ7go; 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 ec4si13722270ejb.549.2020.11.17.05.19.13; Tue, 17 Nov 2020 05:19:36 -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=ix6XJ7go; 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 S1729831AbgKQNRA (ORCPT + 99 others); Tue, 17 Nov 2020 08:17:00 -0500 Received: from mail.kernel.org ([198.145.29.99]:48480 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730333AbgKQNQd (ORCPT ); Tue, 17 Nov 2020 08:16:33 -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 1ABDC2225B; Tue, 17 Nov 2020 13:16:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1605618992; bh=YdczZt46XNRLFbwQ9kNv9BK80yqJ1RdaUT/Jhlitzqg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ix6XJ7gohbxBeL0MZbxdybWU9q5JflwPqFVZ6jVO0Q/cLTqc87sxeXIy8NjIaCz6w 27BeMA019SEARge5FFIGX5lEhM0CKjrZevCjlDyAov+cnCd99eThZ+C9KVxXinRrhw QGqMXQzMWD5SHwxOXhbmUWLwRTGRQI1cpgT+TPYc= 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.14 78/85] xen/events: switch user event channels to lateeoi model Date: Tue, 17 Nov 2020 14:05:47 +0100 Message-Id: <20201117122114.875023006@linuxfoundation.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201117122111.018425544@linuxfoundation.org> References: <20201117122111.018425544@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;