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

Re: [XEN][PATCH v12 16/20] xen/arm: Implement device tree node removal functionalities


  • To: Vikram Garhwal <vikram.garhwal@xxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Wed, 6 Sep 2023 08:37:54 +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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=uIhasFUZms2bFJw4LIJ8tQhTJ7afVzol7nBkEOLIXuI=; b=WZqw3bGVQ7gfiBahBiO9OnwV/fCE8WnS2tZu/FZ2mThFm2506wcV4BF/XVQriIJTTa2j010Idympc5VXQRNtdd+OmDx06zxiI1wUE4ir81PzixaFP07155gBFhWVaLNshioLsmXL0v/tk4dcjb1C+XII81+b8jC9XbRWvvqhlMYybIemgxAQYE6vXq8v3a4ynvwMFE2H816X4QTbxg1iNLhhm/DVqXdcE/TQGISctFqwnvkbUh1DfrmUbO+2CtCr7CPvFQVpA07GpmqpXw9E5rQAVSoN7uiuGG+Gd4V7eue0FlgZS+zdPmoLUi8YWSzg0ZOtii0T97wKc+ajWhzDhg==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Y1CacfBx0rm/PsOSapGz7b/f2np0jV8yQUojq3eqjHxcKb9ztIAnEdQ3Y97CLnmpo7eAmxnlxg6gdBNDSGKxo7hPN146J2ijHWgdF5rWK87f5MNvdw3ta94MD2wsuKZr26f6B0Vay77MXZi8za9Fsyn4vKiZ6x4JDaEB0n1sUUe5sGiHQAP4EyLqy08fYM9P9Bjp99LIfD+96Roqe5SkAQ3S3aaqlDS+ChkpSe5B+0EN3aX4RTKrXY3qEnM/zJVntOruGtBj3zxu0Qzem1egRh4l7eACQ2nXdtx3IC6iUI2XQX7xo3Lh9Mj3Pj4Pr4YGlo2G3nvjgk+QhWdcwdADxg==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: julien@xxxxxxx, michal.orzel@xxxxxxx, sstabellini@xxxxxxxxxx, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Bertrand Marquis <bertrand.marquis@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
  • Delivery-date: Wed, 06 Sep 2023 06:38:32 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 06.09.2023 03:16, Vikram Garhwal wrote:
> --- a/xen/include/public/sysctl.h
> +++ b/xen/include/public/sysctl.h
> @@ -1185,6 +1185,25 @@ typedef struct xen_sysctl_cpu_policy 
> xen_sysctl_cpu_policy_t;
>  DEFINE_XEN_GUEST_HANDLE(xen_sysctl_cpu_policy_t);
>  #endif
>  
> +#if defined(__arm__) || defined (__aarch64__)

Nit (style): Please be consistent with defined().

> +/*
> + * 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(const_void) overlay_fdt;  /* IN: overlay fdt. */
> +    uint32_t overlay_fdt_size;              /* IN: Overlay dtb size. */
> +#define XEN_SYSCTL_DT_OVERLAY_ADD                   1
> +#define XEN_SYSCTL_DT_OVERLAY_REMOVE                2
> +    uint8_t overlay_op;                     /* IN: Add or remove. */
> +    uint8_t pad[3];                         /* IN: Must be zero. */
> +};
> +#endif
> +
>  struct xen_sysctl {
>      uint32_t cmd;
>  #define XEN_SYSCTL_readconsole                    1
> @@ -1215,6 +1234,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;
> @@ -1245,6 +1265,10 @@ struct xen_sysctl {
>  #if defined(__i386__) || defined(__x86_64__)
>          struct xen_sysctl_cpu_policy        cpu_policy;
>  #endif
> +
> +#if defined(__arm__) || defined (__aarch64__)

Same here then.

While not to be done right here, ultimately I expect we want to
have some other way of specifying whether an arch wants DT-
specific sub-ops (here or elsewhere). As per the hyperlaunch
plans aiui even x86 may gain such support ...

Jan

> +        struct xen_sysctl_dt_overlay        dt_overlay;
> +#endif
>          uint8_t                             pad[128];
>      } u;
>  };




 


Rackspace

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