[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: Jan Beulich <jbeulich@xxxxxxxx>
  • From: Vikram Garhwal <vikram.garhwal@xxxxxxx>
  • Date: Wed, 1 Feb 2023 09:21:21 -0800
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=amd.com; dmarc=pass action=none header.from=amd.com; dkim=pass header.d=amd.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=mD1OrwwWiDuw+YEwSJ75bfvbEzk3Wgg4euOqwnrY2M8=; b=Nqx8gakPXw3biSamjKI18tcd/4dfdojsFKtiS3RNJV8KAysjHhgGMG6lqlp7z9q5xkdsb4vWOg8JpgHmM9cEzIZdLrHjUMA7dDumWEJKuB0ntjfkFrVvDZI3DSPk+gcxa8J6aZOUG79lvbu4NxZ4PcOWkpKl0UwinFvPz7FzvX7bZoyau3/SGekC4j+zvofGYiVqmaPPrdJH97Rsfii/8AGimh4AXADvU8aV1UFj27xmxwcu2wELhXYWhK6tklvvFdE8qv92FOYwjQeguY+jSiNKqTMa7NaGhW+NR7xTRinH7JOb3y6k2I7PqBEVF/BXsG665PedTL4KwT1ZAvfAgg==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=S2cGSR5B30bsixMo38uqQPPdVZvna43o6TopMT4vIaRaUR+BsuV+VwFy76E3yrkWNEpgJofq6S/dPhc/xjGGIq/ZOnUZI5MH6VMX2MwoJ04RNE2T4Tgw6r9yClrnfJXgZxyOOOBZARH7hADd0yGFc1fbTu6XbIgKnjkynv+sNv2qJLcnMl+Y6AiQXTWsEEI129auzK387l0QLeMNQx+H+/Jg6r5mW3iWwaOZxCeBThgWTa9tQD0EUASKtnfpz0q8dZlIZi6K0FuJjuQsADtrqHBP9/LelGYXjoBP5NYeXzsR7ZU/YtDSFFK7EahdN6/AiSiXaMYEItulAPoG1USGmg==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=amd.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, 01 Feb 2023 17:21:37 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

Hi Jan,

On 12/7/22 12:41 AM, Jan Beulich wrote:
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.
In v2 there was a comment regarding "No CONFIG_* dependencies in public headers". So, i remove the ifdef.
Will add "if defined(__arm__) || defined (__aarch64__)"

Jan



 


Rackspace

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