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 9F1B0C001E0 for ; Sat, 21 Oct 2023 16:33:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231552AbjJUQdA (ORCPT ); Sat, 21 Oct 2023 12:33:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37362 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229633AbjJUQdA (ORCPT ); Sat, 21 Oct 2023 12:33:00 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0ED9B1BF; Sat, 21 Oct 2023 09:32:52 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 261F3C433C8; Sat, 21 Oct 2023 16:32:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1697905971; bh=J0YExM0i9UyGR28fuSNSuiNULcDD5AwOsLxt/rxGPN0=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=PdJE3qT4Sz+2st1qtPL0++FJpfbjfyZ1T9tVqqaXeIN0f0JAM94vs+LtZUvZcsFYQ i2sA8e6eG4g1IMJIFyEOUDUboczRLoUL+oig1nGVB0pQ/8YK4J/umno0Dwj5r5mCBl 3nRqMnHJ18/H25w0WNfnrc01BDLIxlofdfkqGK8k= Date: Sat, 21 Oct 2023 18:32:48 +0200 From: Greg Kroah-Hartman To: David Woodhouse Cc: Juergen Gross , xen-devel@lists.xenproject.org, Jiri Slaby , Roger Pau Monne , Stefano Stabellini , Dawei Li , linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org, Paul Durrant Subject: Re: [PATCH v2 1/3] hvc/xen: fix event channel handling for secondary consoles Message-ID: <2023102129-humongous-grant-4576@gregkh> References: <20231020161529.355083-1-dwmw2@infradead.org> <20231020161529.355083-2-dwmw2@infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20231020161529.355083-2-dwmw2@infradead.org> Precedence: bulk List-ID: X-Mailing-List: linux-serial@vger.kernel.org On Fri, Oct 20, 2023 at 05:15:27PM +0100, David Woodhouse wrote: > From: David Woodhouse > > 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: fe415186b4 ("xen/console: harden hvc_xen against event channel storms") Nit, our tools complain that the sha1 isn't big enough, "fe415186b43d" I'll go fix it up...