[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [XEN][RFC PATCH v4 12/16] xen/arm: Implement device tree node removal functionalities


  • To: Vikram Garhwal <vikram.garhwal@xxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Wed, 7 Dec 2022 09:41:10 +0100
  • 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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=+Scj/x4Nf690HEGqPvfqmvtwry33pCAMvh6lg30CODo=; b=cyrwDKyrsKNgfGtpet5YAQZ/CCIV4rE34pUlRRCE7sm0/J3KL0KQA0i0bpgDozHhlaEp6KtNGfJRsP7AxS/T2exYW8PjCkFaTc5ZWdMkq817f45j8RoRosx+IsQolyXCli+EUEgihF1HB+8wIVHDKaPME/yvkW2p3SJaJ1eBBomrunAYj5HcB0lnBPylBQbSPLjE3AftXRAJIep92H/Xr0X8ZfDz1K44gkODDt5Wp9BuM8/JPfQ4tCBYTsUQu1WMX2NftzDZLv65zUyHYtowRIhc9gvBQUkPnyfCDpEgopvbeAdAHOgTb+ehB9xXBSK77fMwuudHBMQJ4HV1WpA2BA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=e+gsPTs/7a+8F/H1e8hA4muwmypd24zekouiGWKnHeWups5lFQ3nSA1pORb5jxV66hWcktb6Bd6n2mWxpbctPi0SIOwU/o+spFcE3xoXjAacfgrME3m8/IloARK8F0MNwbJcPIsYu6cK+wuztCsuEqkcrJV9U5iTlWPJBLcdp5EVJTYiCvo+dGgD0JBOveuR8gJSihecZA6hJu5/12Q4RKvDGj98zHYf3uOSb1Sk8vaxPfb9UiwBUQFG/G/t4MOM88NXH1Fg+0QCjUcd9EqeOMUI5BVkVHlARzZVVZw2rJvJIkheE/Bnsz9J7p2keJCYrowQ4FRU2gOC+guDp6IXJw==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: sstabellini@xxxxxxxxxx, julien@xxxxxxx, Luca.Fancellu@xxxxxxx, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
  • Delivery-date: Wed, 07 Dec 2022 08:41:18 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 07.12.2022 07:18, Vikram Garhwal wrote:
> --- a/xen/include/public/sysctl.h
> +++ b/xen/include/public/sysctl.h
> @@ -1079,6 +1079,23 @@ typedef struct xen_sysctl_cpu_policy 
> xen_sysctl_cpu_policy_t;
>  DEFINE_XEN_GUEST_HANDLE(xen_sysctl_cpu_policy_t);
>  #endif
>  
> +#define XEN_SYSCTL_DT_OVERLAY_ADD                   1
> +#define XEN_SYSCTL_DT_OVERLAY_REMOVE                2
> +
> +/*
> + * XEN_SYSCTL_dt_overlay
> + * Performs addition/removal of device tree nodes under parent node using 
> dtbo.
> + * This does in three steps:
> + *  - Adds/Removes the nodes from dt_host.
> + *  - Adds/Removes IRQ permission for the nodes.
> + *  - Adds/Removes MMIO accesses.
> + */
> +struct xen_sysctl_dt_overlay {
> +    XEN_GUEST_HANDLE_64(void) overlay_fdt;
> +    uint32_t overlay_fdt_size;  /* Overlay dtb size. */
> +    uint8_t overlay_op; /* Add or remove. */
> +};
> +
>  struct xen_sysctl {
>      uint32_t cmd;
>  #define XEN_SYSCTL_readconsole                    1
> @@ -1109,6 +1126,7 @@ struct xen_sysctl {
>  #define XEN_SYSCTL_livepatch_op                  27
>  /* #define XEN_SYSCTL_set_parameter              28 */
>  #define XEN_SYSCTL_get_cpu_policy                29
> +#define XEN_SYSCTL_dt_overlay                    30
>      uint32_t interface_version; /* XEN_SYSCTL_INTERFACE_VERSION */
>      union {
>          struct xen_sysctl_readconsole       readconsole;
> @@ -1139,6 +1157,7 @@ struct xen_sysctl {
>  #if defined(__i386__) || defined(__x86_64__)
>          struct xen_sysctl_cpu_policy        cpu_policy;
>  #endif
> +        struct xen_sysctl_dt_overlay        dt_overlay;

For now your additions are Arm-only, aren't they? You want to use
#ifdef-ary similar to what you see in context in this last hunk then,
to avoid undue exposure.

Jan



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.