From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6C21EC61D9D for ; Wed, 22 Nov 2023 17:25:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344109AbjKVRZX (ORCPT ); Wed, 22 Nov 2023 12:25:23 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55018 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344121AbjKVRZW (ORCPT ); Wed, 22 Nov 2023 12:25:22 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 84E831B5 for ; Wed, 22 Nov 2023 09:25:18 -0800 (PST) Received: by smtp.kernel.org (Postfix) with ESMTPSA id C5A73C433C8; Wed, 22 Nov 2023 17:25:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1700673918; bh=tBGcAK8143/4Jevwm1ICTFVtgftsFAw/bGbSOGEwuS0=; h=Subject:To:Cc:From:Date:From; b=efuHGb4s2MjJwUBYXfmnCmSCKwj07acl1rQUtD4NQJWc9yRrFFJ4Fws4HvzGzuizO 2R2JlwRYZ4hKqzASUp6ODoV5hJghWS/lEMpIyNLNauQtKTADo2a2vwy6z742ljf6v5 nNZJZZbgUo0J5ZfOBaC0lU8g4ksAaWkesOkCRKEQ= Subject: FAILED: patch "[PATCH] hvc/xen: fix event channel handling for secondary consoles" failed to apply to 4.19-stable tree To: dwmw@amazon.co.uk, gregkh@linuxfoundation.org, jgross@suse.com Cc: From: Date: Wed, 22 Nov 2023 17:25:13 +0000 Message-ID: <2023112213-ladybug-starter-d2c2@gregkh> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org The patch below does not apply to the 4.19-stable tree. If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to . To reproduce the conflict and resubmit, you may use the following commands: git fetch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ linux-4.19.y git checkout FETCH_HEAD git cherry-pick -x ef5dd8ec88ac11e8e353164407d55b73c988b369 # git commit -s git send-email --to '' --in-reply-to '2023112213-ladybug-starter-d2c2@gregkh' --subject-prefix 'PATCH 4.19.y' HEAD^.. Possible dependencies: ef5dd8ec88ac ("hvc/xen: fix event channel handling for secondary consoles") fe415186b43d ("xen/console: harden hvc_xen against event channel storms") 3bd5371a4da6 ("xen/events: Remove unused bind_evtchn_to_irq_lateeoi()") 54c9de89895e ("xen/events: add a new "late EOI" evtchn framework") 0102e4efda76 ("xen: Use evtchn_type_t as a type for event channels") bce5963bcb4f ("xen/events: fix binding user event channels to cpus") 9f51c05dc41a ("pvcalls-front: Avoid get_free_pages(GFP_KERNEL) under spinlock") 975ef94a0284 ("pvcalls-front: fixes incorrect error handling") thanks, greg k-h ------------------ original commit in Linus's tree ------------------ >From ef5dd8ec88ac11e8e353164407d55b73c988b369 Mon Sep 17 00:00:00 2001 From: David Woodhouse Date: Fri, 20 Oct 2023 17:15:27 +0100 Subject: [PATCH] hvc/xen: fix event channel handling for secondary consoles MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The xencons_connect_backend() function allocates a local interdomain event channel with xenbus_alloc_evtchn(), then calls bind_interdomain_evtchn_to_irq_lateeoi() to bind to that port# on the *remote* domain. That doesn't work very well: (qemu) device_add xen-console,id=con1,chardev=pty0 [ 44.323872] xenconsole console-1: 2 xenbus_dev_probe on device/console/1 [ 44.323995] xenconsole: probe of console-1 failed with error -2 Fix it to use bind_evtchn_to_irq_lateeoi(), which does the right thing by just binding that *local* event channel to an irq. The backend will do the interdomain binding. This didn't affect the primary console because the setup for that is special — the toolstack allocates the guest event channel and the guest discovers it with HVMOP_get_param. Fixes: fe415186b43d ("xen/console: harden hvc_xen against event channel storms") Signed-off-by: David Woodhouse Reviewed-by: Juergen Gross Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20231020161529.355083-2-dwmw2@infradead.org Signed-off-by: Greg Kroah-Hartman diff --git a/drivers/tty/hvc/hvc_xen.c b/drivers/tty/hvc/hvc_xen.c index 98764e740c07..f24e285b6441 100644 --- a/drivers/tty/hvc/hvc_xen.c +++ b/drivers/tty/hvc/hvc_xen.c @@ -433,7 +433,7 @@ static int xencons_connect_backend(struct xenbus_device *dev, if (ret) return ret; info->evtchn = evtchn; - irq = bind_interdomain_evtchn_to_irq_lateeoi(dev, evtchn); + irq = bind_evtchn_to_irq_lateeoi(evtchn); if (irq < 0) return irq; info->irq = irq;