All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jan Beulich <jbeulich@suse.com>
To: "Daniel P. Smith" <dpsmith@apertussolutions.com>
Cc: scott.davis@starlab.io, Andrew Cooper <andrew.cooper3@citrix.com>,
	George Dunlap <george.dunlap@citrix.com>,
	Julien Grall <julien@xen.org>,
	Stefano Stabellini <sstabellini@kernel.org>, Wei Liu <wl@xen.org>,
	Daniel De Graaf <dgdegra@tycho.nsa.gov>,
	xen-devel@lists.xenproject.org
Subject: Re: [RFC PATCH 1/1] xsm: allows system domains to allocate evtchn
Date: Tue, 29 Mar 2022 08:43:18 +0200	[thread overview]
Message-ID: <7935e60e-34b1-76be-e5de-56e60f173438@suse.com> (raw)
In-Reply-To: <20220328203622.30961-2-dpsmith@apertussolutions.com>

On 28.03.2022 22:36, Daniel P. Smith wrote:
> During domain construction under dom0less and hyperlaunch it is necessary to
> allocate at least the event channel for xenstore and potentially the event
> channel for the core console. When dom0less and hyperlaunch are doing their
> construction logic they are executing under the idle domain context. The idle
> domain is not a privileged domain, it is not the target domain, and as a result
> under the current default XSM policy is not allowed to allocate the event
> channel.

I appreciate the change is only needed there right now, but it feels
inconsistent. _If_ it is to remain that way, at least a comment needs
to be put in xsm_evtchn_unbound() making clear why this is a special
case, and hence clarifying to people what the approximate conditions
are to have such also put elsewhere. But imo it would be better to
make the adjustment right in xsm_default_action(), without touching
event_channel.c at all. Iirc altering xsm_default_action() was
discussed before, but I don't recall particular reasons speaking
against that approach.

> This patch only addresses the event channel situation by adjust the default XSM
> policy for xsm_evtchn_unbound to explicitly allow system domains to be able to
> make the allocation call.

Indeed I'm having trouble seeing how your change would work for SILO
mode, albeit Stefano having tested this would make me assume he did
so in SILO mode, as that's the default on Arm iirc. Afaict
silo_mode_dom_check() should return false in the described situation.

Similarly I don't see how things would work transparently with a
Flask policy in place. Regardless of you mentioning the restriction,
I think this wants resolving before the patch can go in.

Jan



  parent reply	other threads:[~2022-03-29  6:43 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-28 20:36 [RFC PATCH 0/1] allow system domains to allocate event channels Daniel P. Smith
2022-03-28 20:36 ` [RFC PATCH 1/1] xsm: allows system domains to allocate evtchn Daniel P. Smith
2022-03-28 23:21   ` Stefano Stabellini
2022-03-29  6:43   ` Jan Beulich [this message]
2022-03-29 18:57     ` Daniel P. Smith
2022-03-29 21:57       ` Julien Grall
2022-03-30 13:05         ` Daniel P. Smith
2022-03-30  6:30       ` Jan Beulich
2022-03-30 12:30         ` Jason Andryuk
2022-03-30 14:04           ` Daniel P. Smith
2022-03-30 15:15             ` Jason Andryuk
2022-03-30 16:23               ` Daniel P. Smith
2022-03-30 19:53                 ` Jason Andryuk
2022-03-30 16:28               ` Daniel P. Smith
2022-03-30 13:52         ` Daniel P. Smith
2022-03-29  7:29   ` Roger Pau Monné
2022-03-29 23:12     ` Daniel P. Smith
2022-03-30  9:40       ` Roger Pau Monné
2022-03-30 13:42         ` Daniel P. Smith
2022-03-30 15:00           ` Roger Pau Monné

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=7935e60e-34b1-76be-e5de-56e60f173438@suse.com \
    --to=jbeulich@suse.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=dgdegra@tycho.nsa.gov \
    --cc=dpsmith@apertussolutions.com \
    --cc=george.dunlap@citrix.com \
    --cc=julien@xen.org \
    --cc=scott.davis@starlab.io \
    --cc=sstabellini@kernel.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.