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, jandryuk@gmail.com,
	"Stefano Stabellini" <sstabellini@kernel.org>,
	"Julien Grall" <julien@xen.org>,
	"Bertrand Marquis" <bertrand.marquis@arm.com>,
	"Andrew Cooper" <andrew.cooper3@citrix.com>,
	"Roger Pau Monné" <roger.pau@citrix.com>,
	"George Dunlap" <george.dunlap@citrix.com>,
	"Dario Faggioli" <dfaggioli@suse.com>,
	"Daniel De Graaf" <dgdegra@tycho.nsa.gov>,
	xen-devel@lists.xenproject.org,
	"Volodymyr Babchuk" <Volodymyr_Babchuk@epam.com>,
	"Wei Liu" <wl@xen.org>
Subject: Re: [PATCH v2 1/2] xsm: create idle domain privieged and demote after setup
Date: Thu, 21 Apr 2022 11:20:33 +0200	[thread overview]
Message-ID: <256567d3-8d0b-83ea-c3d6-215f0a1483b6@suse.com> (raw)
In-Reply-To: <20220420222834.5478-2-dpsmith@apertussolutions.com>

On 21.04.2022 00:28, Daniel P. Smith wrote:
> There are now instances where internal hypervisor logic needs to make resource
> allocation calls that are protectd by XSM checks. The internal hypervisor logic
> is represented a number of system domains which by designed are represented by
> non-privileged struct domain instances. To enable these logic blocks to
> function correctly but in a controlled manner, this commit changes the idle
> domain to be created as a privileged domain under the default policy, which is
> inherited by the SILO policy, and demoted before transitioning to running. A
> new XSM hook, xsm_transition_running, is introduced to allow each XSM policy
> type to demote the idle domain appropriately for that policy type.
> 
> For flask a stub is added to ensure that flask policy system will function
> correctly with this patch until flask is extended with support for starting the
> idle domain privileged and properly demoting it on the call to
> xsm_transtion_running.
> 
> Signed-off-by: Daniel P. Smith <dpsmith@apertussolutions.com>

Looks okay to me, but I'm not sure in how far agreement was reached on
taking this route. Just one nit:

> --- a/xen/include/xsm/dummy.h
> +++ b/xen/include/xsm/dummy.h
> @@ -101,6 +101,18 @@ static always_inline int xsm_default_action(
>      }
>  }
>  
> +static XSM_INLINE void cf_check xsm_transition_running(void)
> +{
> +    struct domain *d = current->domain;
> +
> +    if ( d->domain_id != DOMID_IDLE )
> +        panic("xsm_transition_running should only be called by idle domain\n");
> +
> +    d->is_privileged = false;
> +
> +    return;
> +}

Please omit such return statements.

Jan



  reply	other threads:[~2022-04-21  9:20 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-20 22:28 [PATCH v2 0/2] Adds starting the idle domain privileged Daniel P. Smith
2022-04-20 22:28 ` [PATCH v2 1/2] xsm: create idle domain privieged and demote after setup Daniel P. Smith
2022-04-21  9:20   ` Jan Beulich [this message]
2022-04-21 13:05     ` Daniel P. Smith
2022-04-21  9:53   ` Roger Pau Monné
2022-04-21 14:14     ` Daniel P. Smith
2022-04-21 14:56       ` Roger Pau Monné
2022-04-20 22:28 ` [PATCH v2 2/2] flask: implement xsm_transtion_running Daniel P. Smith
2022-04-21  9:22   ` Jan Beulich
2022-04-21 14:39     ` Daniel P. Smith

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=256567d3-8d0b-83ea-c3d6-215f0a1483b6@suse.com \
    --to=jbeulich@suse.com \
    --cc=Volodymyr_Babchuk@epam.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=bertrand.marquis@arm.com \
    --cc=dfaggioli@suse.com \
    --cc=dgdegra@tycho.nsa.gov \
    --cc=dpsmith@apertussolutions.com \
    --cc=george.dunlap@citrix.com \
    --cc=jandryuk@gmail.com \
    --cc=julien@xen.org \
    --cc=roger.pau@citrix.com \
    --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.