From: "Roger Pau Monné" <roger.pau@citrix.com>
To: Jan Beulich <jbeulich@suse.com>
Cc: xen-devel@lists.xenproject.org,
Andrew Cooper <andrew.cooper3@citrix.com>
Subject: Re: [PATCH] ns16550c: avoid crash in ns16550_endboot in PV shim mode
Date: Mon, 23 Oct 2023 10:17:15 +0200 [thread overview]
Message-ID: <ZTYsC8dVcuADOSH1@macbook> (raw)
In-Reply-To: <d45ae14b-b6e4-478b-a94d-954b80375d9a@suse.com>
On Mon, Oct 23, 2023 at 10:05:48AM +0200, Jan Beulich wrote:
> 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.
`EVTCHN_PORT_INVALID 0` or some such, but a comment would also be
fine, the point is to be part of the public interface.
Thanks, Roger.
prev parent reply other threads:[~2023-10-23 8:17 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-19 16:21 [PATCH] ns16550c: avoid crash in ns16550_endboot in PV shim mode David Woodhouse
2023-10-20 6:17 ` Jan Beulich
2023-10-20 10:14 ` Andrew Cooper
2023-10-20 10:29 ` David Woodhouse
2023-10-20 13:25 ` Andrew Cooper
2023-10-20 13:29 ` Roger Pau Monné
2023-10-20 13:37 ` David Woodhouse
2023-10-20 14:50 ` Durrant, Paul
2023-10-20 15:16 ` Andrew Cooper
2023-10-23 7:52 ` Roger Pau Monné
2023-10-23 8:05 ` Jan Beulich
2023-10-23 8:17 ` Roger Pau Monné [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ZTYsC8dVcuADOSH1@macbook \
--to=roger.pau@citrix.com \
--cc=andrew.cooper3@citrix.com \
--cc=jbeulich@suse.com \
--cc=xen-devel@lists.xenproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.