[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [RFC PATCH 02/10] control domain: refactor is_control_domain
- To: "Daniel P. Smith" <dpsmith@xxxxxxxxxxxxxxxxxxxx>
- From: Jan Beulich <jbeulich@xxxxxxxx>
- Date: Fri, 18 Jun 2021 16:02:10 +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-SenderADCheck; bh=T0YTZarNfnyQgzC4jCO/JDRvvCRODSqnhxN9u47kB1I=; b=U1GF1ooFfcdrP1gcpm5XhOHmiI9vGXa3FrTJbagYrk/NDbrnUYnWo+h9iT+OUDYNRayUUWv1ukFrj5YNMW7leuMw1+SnHWdpr96Cp6ibflL7iGAIgBfhn0T6Ykg2vWNvX4RrSRT1MNpDNmBKv+7LqFN4El84Tp6dxsYOeY263jJy1WrYEGqBydtdsBGUWH4xk8vT7ka8fV2ZUB3PdL74iGJLYS0Svl8TNjc3nnnsuma+z16jSsiiMdyx0CBVAuEzxB4aTIt61D9/RElJRWfAJoMYqiXNtD3T+tfsSzVObN+zmC8gsUYd4JvAFfr98urxwJHTelNVyEpTC1pgNeWb0g==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=A/PahIRadT4vcalWQV9qQ7Y14FP5eJMaQMxTS9KJgZduHvafXcLdnEaL2by/wijNvaiXP37mMdMWP3cgawp/lryu2mSPh1rtei/54NuZRZIhCTTL96KmQcAmv8G4sV61FAaJaC+XU5kJDO2xz2K2gD6iMKbLua9oPNwj+PwC7IXIC6GtSMunDaQZMe2F1gyKY6q0A9JQcQXgjkBVgcrDKm0oNPb5ae4ZH2MRH+19NuSkmdA8SYygcZlKjEJCLc7t3OgTG/86eqjapDUPflgwZN3ls9i3M6ay9r7MXlOGBpXaBxPZ4a6ujQ0RRcMTZDmlxkRalWj3AGUY1sBkVxDfQg==
- Authentication-results: lists.xenproject.org; dkim=none (message not signed) header.d=none;lists.xenproject.org; dmarc=none action=none header.from=suse.com;
- Cc: sstabellini@xxxxxxxxxx, julien@xxxxxxx, Volodymyr_Babchuk@xxxxxxxx, andrew.cooper3@xxxxxxxxxx, george.dunlap@xxxxxxxxxx, iwj@xxxxxxxxxxxxxx, wl@xxxxxxx, roger.pau@xxxxxxxxxx, tamas@xxxxxxxxxxxxx, tim@xxxxxxx, jgross@xxxxxxxx, aisaila@xxxxxxxxxxxxxxx, ppircalabu@xxxxxxxxxxxxxxx, dfaggioli@xxxxxxxx, paul@xxxxxxx, kevin.tian@xxxxxxxxx, dgdegra@xxxxxxxxxxxxx, adam.schwalm@xxxxxxxxxx, scott.davis@xxxxxxxxxx, xen-devel@xxxxxxxxxxxxxxxxxxxx
- Delivery-date: Fri, 18 Jun 2021 14:02:27 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
On 14.05.2021 22:54, Daniel P. Smith wrote:
> --- a/xen/common/domain.c
> +++ b/xen/common/domain.c
> @@ -556,6 +556,9 @@ struct domain *domain_create(domid_t domid,
> /* Sort out our idea of is_control_domain(). */
> d->is_privileged = is_priv;
With the change to is_control_domain() this is the last use of the
field, so your patch should replace it rather than adding yet
another one. (For layout reasons, "replace" doesn't necessarily
mean "in place").
> + if (is_priv)
Nit: Please add the missing blanks here.
> --- a/xen/include/xen/sched.h
> +++ b/xen/include/xen/sched.h
> @@ -473,6 +473,8 @@ struct domain
> #define XSM_HW_CTRL (1U<<8) /* Hardware Control: domain with physical
> hardware access and its allocation for domain usage */
> #define XSM_HW_SUPER (1U<<9) /* Hardware Supervisor: domain that control
> allocated physical hardware */
> #define XSM_XENSTORE (1U<<31) /* Xenstore: domain that can do privileged
> operations on xenstore */
> +#define CLASSIC_DOM0_PRIVS (XSM_PLAT_CTRL | XSM_DOM_BUILD | XSM_DOM_SUPER | \
> + XSM_DEV_EMUL | XSM_HW_CTRL | XSM_HW_SUPER | XSM_XENSTORE)
The latest at this point I'm inclined to request that these #define-s
don't all live in the middle of struct domain. When you move them
elsewhere, simply have ...
> uint32_t xsm_roles;
... a brief comment next to this point at XSM_* as the values applicable
here.
Jan
|