All of lore.kernel.org
 help / color / mirror / Atom feed
From: Juergen Gross <jgross@suse.com>
To: Andrew Cooper <andrew.cooper3@citrix.com>,
	minios-devel@lists.xenproject.org,
	xen-devel@lists.xenproject.org
Cc: samuel.thibault@ens-lyon.org, wl@xen.org
Subject: Re: [PATCH 2/3] Mini-OS: don't crash if no shutdown node is available
Date: Thu, 2 Nov 2023 08:14:05 +0100	[thread overview]
Message-ID: <b955031f-435f-4e66-af2e-4d6e591b255b@suse.com> (raw)
In-Reply-To: <b3d8390f-1cd9-461c-9d98-364a01f33bb5@citrix.com>


[-- Attachment #1.1.1: Type: text/plain, Size: 1998 bytes --]

On 01.11.23 17:57, Andrew Cooper wrote:
> On 01/11/2023 4:42 pm, Juergen Gross wrote:
>> On 01.11.23 17:38, Andrew Cooper wrote:
>>> On 01/11/2023 9:00 am, Juergen Gross wrote:
>>>> It might be perfectly fine not to have a control/shutdown Xenstore
>>>> node. If this is the case, don't crash, but just terminate the
>>>> shutdown thread after issuing a message that shutdown isn't available.
>>>>
>>>> In fini_shutdown() clearing the watch can result in an error now, in
>>>> case the early exit above was taken. Just ignore this error now.
>>>>
>>>> Signed-off-by: Juergen Gross <jgross@suse.com>
>>>
>>> Which cases might we not have a control/shutdown node?
>>
>> Xenstore-stubdom. It should _never_ shutdown, and it isn't really under
>> control of Xen tools (other than being created).
>>
>>> I'm all for coping better with its absence, but it's not a piece of the
>>> Xen ABI which is optional.
>>
>> I'd like to differ here. See reasoning above.
> 
> If we're going to permit this configuration, then I think it needs an
> extension to xenstore-paths to make it officially optional.
> 
> And I think it's reasonable to support, but I wouldn't go as far as
> saying "never".  If you've cleaved the global xenstored in
> twain/trine/etc, then individual parts of it can shut down normally.

Xenstore-stubdom is a very special case. I don't think its shutdown node
can be under control of the normal Xen tools, as only the stubdom can know
whether it is able to react in any sensible way to it. It needs to take
specific measures to ensure that even its ABI-compliant reaction to a
shutdown request is visible to Xen tools (remember that this reaction is
a write to the shutdown node causing a watch event in dom0, which won't
work with Xenstore going down).

In the end there is no way the shutdown node can be present when starting
Xenstore-stubdom. There is no Xenstore at the time the node is probed in
today's Mini-OS boot sequence.


Juergen

[-- Attachment #1.1.2: OpenPGP public key --]
[-- Type: application/pgp-keys, Size: 3149 bytes --]

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 495 bytes --]

  reply	other threads:[~2023-11-02  7:14 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-01  9:00 [PATCH 0/3] Mini-OS: preparations for 9pfs in xenstore-stubdom Juergen Gross
2023-11-01  9:00 ` [PATCH 1/3] Mini-OS: make xenstore_buf externally visible Juergen Gross
2023-11-01 13:23   ` Jason Andryuk
2023-11-01  9:00 ` [PATCH 2/3] Mini-OS: don't crash if no shutdown node is available Juergen Gross
2023-11-01 13:23   ` Jason Andryuk
2023-11-01 16:38   ` Andrew Cooper
2023-11-01 16:42     ` Juergen Gross
2023-11-01 16:57       ` Andrew Cooper
2023-11-02  7:14         ` Juergen Gross [this message]
2023-11-01  9:00 ` [PATCH 3/3] Mini-OS: fix 9pfs stat receive format Juergen Gross
2023-11-01 13:25   ` Jason Andryuk

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=b955031f-435f-4e66-af2e-4d6e591b255b@suse.com \
    --to=jgross@suse.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=minios-devel@lists.xenproject.org \
    --cc=samuel.thibault@ens-lyon.org \
    --cc=wl@xen.org \
    --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.