[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] ns16550c: avoid crash in ns16550_endboot in PV shim mode


  • To: Roger Pau Monné <roger.pau@xxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Mon, 23 Oct 2023 10:05:48 +0200
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=Cpf8La5f0uGPMBm7cP4UzqaSU5u5Bisl0Ahw1r97afU=; b=U5H0BkwdUpTTvID+zXtCIcsEYBrRrFV8cD9CqVfWJtTt/4viQ18/t/CqAj7YtbmMbf5VSshfCcPldmpVzqVXj1r1SIECTUBgWj24Q46Az6YE9QAR0+cixCN3wK/x4XEsBnWBFvo2k1+qGUgc48fzT3fCLQ2h0JHpWizrj+AY2rFt6Vgy1jpklQ5rFzNB/6yT0R78K3HkG1TrJ6NhDyncnH78MVr7T4vxF0Yf+v9n/wSJ0Z5soJfq+C8AtUX8p9FJ1aqMRuQxlKAtqwV/Cpp+JiF2LKPXEK/yg1ZJ2T1ouBUGa6xH6CXOp+5Qp8yrHzZ5y8H57VvTO1BamIAEjx2y8A==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=g1iCZMuX+QQPmn3wIq7s9xNKHsWbCDdp7fdN+R6uba2VojLIiMwYKMVfBbc1nk/dQtJ/8pdXs3LVF9LcvR/k9WxDEF5yII9XMpH8Bv7bx5N1pKPAnV74o0NhTCL+hSu+ZWOIgW/q3kr1929wg7heaa3u/l1A94eWCACVx+oQMkAZxOLdXiWM1Chr++l6UYRfl+EGhOr7Vb5iK8gNNmrxarXOmVtIIn6tOWv/50X0aL0CjR1gEwzXFM6qsWcd8naGtuamOjIDe6o46OHOZRJvKSI6/rUEbHA9t766ISeOEBBXr0SOE12vzM1PwR/6b8ZNoWrXGEGJnyrTz2xDhe0DlA==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: xen-devel@xxxxxxxxxxxxxxxxxxxx, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
  • Delivery-date: Mon, 23 Oct 2023 08:05:56 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 23.10.2023 09:52, Roger Pau Monné wrote:
> On Fri, Oct 20, 2023 at 04:16:16PM +0100, Andrew Cooper wrote:
>> On 20/10/2023 3:50 pm, Durrant, Paul wrote:
>>> On 20/10/2023 14:37, David Woodhouse wrote:
>>> [snip]
>>>>>
>>>>> [0]
>>>>> https://elixir.bootlin.com/linux/latest/source/drivers/tty/hvc/hvc_xen.c#L258
>>>>
>>>> I'm not convinced I believe what the comment says there about evtchn 0
>>>> being theoretically valid. I don't believe zero is a valid evtchn#, is
>>>> it?
>>>
>>> gfn 0 might be valid, but I'm also pretty sure evtchn 0 is not valid.
>>
>> GFN 0 very much is valid.
>>
>> evtchn 0 OTOH is explicitly not valid.  From evtchn_init():
>>
>>     evtchn_from_port(d, 0)->state = ECS_RESERVED;
>>
>>
>> However, the fields being 0 doesn't mean not available.  That's the
>> signal to saying "not connected yet", because that's what dom0 gets
>> before xenconsoled starts up.
> 
> Someone asked me the same a while back, and IIRC we don't state
> anywhere in the public headers that event channel 0 is reserved,
> however that has always? been part of the implementation.
> 
> If we intend this to be reliable, we should add a define to the public
> headers in order to signal that 0 will always be reserved.

I agree a comment should have been there; it's not clear to me what
useful #define we could add.

Jan



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.