get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

GET /api/patches/2216680/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 2216680,
    "url": "http://patchwork.ozlabs.org/api/patches/2216680/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/opensbi/patch/20260327043357.3452008-1-peter.lin@sifive.com/",
    "project": {
        "id": 67,
        "url": "http://patchwork.ozlabs.org/api/projects/67/?format=api",
        "name": "OpenSBI development",
        "link_name": "opensbi",
        "list_id": "opensbi.lists.infradead.org",
        "list_email": "opensbi@lists.infradead.org",
        "web_url": "https://github.com/riscv/opensbi",
        "scm_url": "",
        "webscm_url": "",
        "list_archive_url": "",
        "list_archive_url_format": "",
        "commit_url_format": "https://github.com/riscv/opensbi/commit/{}"
    },
    "msgid": "<20260327043357.3452008-1-peter.lin@sifive.com>",
    "list_archive_url": null,
    "date": "2026-03-27T04:33:57",
    "name": "lib: utils: fdt_domain: add support for root domain region inheritance",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "8ca2d10dcffb0f3b3233a038279b3c95b969ec71",
    "submitter": {
        "id": 90061,
        "url": "http://patchwork.ozlabs.org/api/people/90061/?format=api",
        "name": "Yu-Chine Peter Lin",
        "email": "peter.lin@sifive.com"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/opensbi/patch/20260327043357.3452008-1-peter.lin@sifive.com/mbox/",
    "series": [
        {
            "id": 497686,
            "url": "http://patchwork.ozlabs.org/api/series/497686/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/opensbi/list/?series=497686",
            "date": "2026-03-27T04:33:57",
            "name": "lib: utils: fdt_domain: add support for root domain region inheritance",
            "version": 1,
            "mbox": "http://patchwork.ozlabs.org/series/497686/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/2216680/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/2216680/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "\n <opensbi-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org>",
        "X-Original-To": "incoming@patchwork.ozlabs.org",
        "Delivered-To": "patchwork-incoming@legolas.ozlabs.org",
        "Authentication-Results": [
            "legolas.ozlabs.org;\n\tdkim=pass (2048-bit key;\n secure) header.d=lists.infradead.org header.i=@lists.infradead.org\n header.a=rsa-sha256 header.s=bombadil.20210309 header.b=LVUI8HSr;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n unprotected) header.d=sifive.com header.i=@sifive.com header.a=rsa-sha256\n header.s=google header.b=V+0z3mA8;\n\tdkim-atps=neutral",
            "legolas.ozlabs.org;\n spf=none (no SPF record) smtp.mailfrom=lists.infradead.org\n (client-ip=2607:7c80:54:3::133; helo=bombadil.infradead.org;\n envelope-from=opensbi-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org;\n receiver=patchwork.ozlabs.org)"
        ],
        "Received": [
            "from bombadil.infradead.org (bombadil.infradead.org\n [IPv6:2607:7c80:54:3::133])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519 server-signature ECDSA (secp384r1) server-digest SHA384)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4fhnq01Bz3z1y1j\n\tfor <incoming@patchwork.ozlabs.org>; Fri, 27 Mar 2026 15:34:20 +1100 (AEDT)",
            "from localhost ([::1] helo=bombadil.infradead.org)\n\tby bombadil.infradead.org with esmtp (Exim 4.98.2 #2 (Red Hat Linux))\n\tid 1w5yte-00000006f8x-14rU;\n\tFri, 27 Mar 2026 04:34:10 +0000",
            "from mail-pl1-x629.google.com ([2607:f8b0:4864:20::629])\n\tby bombadil.infradead.org with esmtps (Exim 4.98.2 #2 (Red Hat Linux))\n\tid 1w5ytb-00000006f8c-0gx8\n\tfor opensbi@lists.infradead.org;\n\tFri, 27 Mar 2026 04:34:08 +0000",
            "by mail-pl1-x629.google.com with SMTP id\n d9443c01a7336-2b04d051664so14243685ad.0\n        for <opensbi@lists.infradead.org>;\n Thu, 26 Mar 2026 21:34:06 -0700 (PDT)",
            "from hsinchu16.internal.sifive.com ([210.176.154.34])\n        by smtp.gmail.com with ESMTPSA id\n d9443c01a7336-2b0bc916152sm43279665ad.81.2026.03.26.21.34.02\n        (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n        Thu, 26 Mar 2026 21:34:04 -0700 (PDT)"
        ],
        "DKIM-Signature": [
            "v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;\n\td=lists.infradead.org; s=bombadil.20210309; h=Sender:\n\tContent-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post:\n\tList-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-ID:Date:Subject:Cc\n\t:To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:\n\tResent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:\n\tList-Owner; bh=34KlsOb0eo7fv6C0JZYHKIruZ9PPnTquTGAO5Vulrbw=; b=LVUI8HSrVPAdQv\n\tgZi+wp0EQ1W6IlhuPKfFRCu6El/mMuCHR2HMxI9V1PnHfA7amD8XOw4cxMknHTTeld65lgEBzwL8r\n\tsURhOWj5+1n8U9qF5AeoC+T2VV0KhfyCh/SlzZO8nU7FDAw3zbYAI0wh+07XfftvsfzMcysZoD3c6\n\tR9wBSFEDcdNx88uCIxw2alHj+A56MLe6gv6L3podZoisHxmwN3aE850WNCp6tRY0Gf+WPNZbgb9XX\n\t/J3rgS7m1gG/pDiaubmcfSLvdPRDFSwyXd0BYCniFYwgUbpnX3+qnS/2+Ya9brN6dSDXOBNJF3zX8\n\tlqQVqmcHiJFTRGoc6q9w==;",
            "v=1; a=rsa-sha256; c=relaxed/relaxed;\n        d=sifive.com; s=google; t=1774586045; x=1775190845;\n darn=lists.infradead.org;\n        h=content-transfer-encoding:mime-version:message-id:date:subject:cc\n         :to:from:from:to:cc:subject:date:message-id:reply-to;\n        bh=J5hnCkkE1eBZCdbfuDFjeUOLJc4q+SsRVLGypo10bKA=;\n        b=V+0z3mA81IVYdz6HSry+cgXNTOSyKMUmRoJeKwJh0zT0b14CUqri9OJjpUq600GgZV\n         qrSYN5ckGwpHjxCqXAECs17zOM77X57Q0zZbulCz9lu3X1PH6i7h5Xoo3i0Q/ZpGT4kb\n         NUcQNw5xELg2IbEG+NA5CCfyItxSwZOYfFxkrSMsE3BuTbosFD2Vb+pTiGzSRTp1l5eS\n         WDYdV+Y/EvITfQWI5/MYDgsV+2aZfF/QPiqahUf7mzOIOh57uQ7hQTbR2DkuJjEbvrYN\n         mBQpSskJrQlQenON2RSMW8CBRo0U5Dmyskv3urbdJEVKiCrqcbDCoAvT04D6sQA+OWlA\n         Mvog=="
        ],
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n        d=1e100.net; s=20251104; t=1774586045; x=1775190845;\n        h=content-transfer-encoding:mime-version:message-id:date:subject:cc\n         :to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date\n         :message-id:reply-to;\n        bh=J5hnCkkE1eBZCdbfuDFjeUOLJc4q+SsRVLGypo10bKA=;\n        b=URE73uemzF69HKCRlqJanSqeith9dLK4kwyQTNdnVs8uIGfCJUN0pBL6RUtjYhoa1N\n         j0rM/WONQGprMJUkdT1Kk/XQgqizvjTPzR7NlzEJJ6Pgn6ix61TbXJPiGNbpdsc8zEik\n         30M9oiTxcUybZDTIyOyASp6Y1KVjzuVmfHSGA57LScRt8vlMfS3dHnFl9Nzy7ArReKcG\n         GyKYH1boBjiZkNLqGpFFg84AIEpPgCjOBO6d351d598sdqyhPcm6G6750ZLmq5fKa1Ul\n         UGOjqaKp+90Ybg+/f99ITqYuDhtyl8mFP2OT7UbJ6JKn6Fuo1M9fKpXGgcNeQohwJayn\n         voug==",
        "X-Gm-Message-State": "AOJu0Yzu6CC2bnUB/3lOA9jOwUjf1fweDgstlyxt3xNOeBP899HyUIP+\n\t2nrlI5oYDEekvv+dIhZ8xhCOFgC946sTyL/v4ycfSbaTjAq6BJIdYWGjg9cqd/Q9UVEqGgUk7mF\n\t/iW8J9yxKcqx6lPPAQED+RjwQzg8m8K+vSvARKtsRXat5mc3MMM3h+jJMi7lCu6an0hm315FiE1\n\tuq7MPaICVIuDW0VH9HJ3YlIrgQ6P2cjOIIcuOyaq92fdo3rIPw",
        "X-Gm-Gg": "ATEYQzzaIB1EydXYwF6PIZlkdfSF6L7KtyGVTnh+pK3bRdokFN4rmVg9U9XSlq5vW+v\n\t5LJlGSqrC+TU1yhYXBELKb6TRBGez3zLtBCdSRlY1Qzm+2hR/MiGDEhuihVHHeSt4a+QJ1MT8El\n\tiu6r59gKsVUlQVNY9EOiTcci/pvbLIVYwV1iFrZvsxIkps1JJgeMNBN71EkIwkA34LqmQ68TmDi\n\taYYLKMwQI9w7AIkZwCMJ2SSwepvO/zOSznGB0Pj1G0LYGpCQUhkyjV/UyRtjYfQ8bFb0V2onqkn\n\toD34EXIJ0P9FB5+xulJFLEUHy19td71neBPNcMc5K7BFpDonsRNABsxAJQkee+70Og4dKFPBgZE\n\t7fOm091p8wZyXLu7UwNGUv1+HHGF2E4F+FSBzrZrksOYxvqINUe5mVfU/wmbxGujknfE9VYs618\n\t5QdSPv2Vy/MJybHDlQUOaXarXDUhilu+pAARzlYxzGvMHZx6Q=",
        "X-Received": "by 2002:a17:903:240b:b0:2b0:c403:5554 with SMTP id\n d9443c01a7336-2b0cd9ebc73mr12883665ad.0.1774586045083;\n        Thu, 26 Mar 2026 21:34:05 -0700 (PDT)",
        "From": "Yu-Chien Peter Lin <peter.lin@sifive.com>",
        "To": "opensbi@lists.infradead.org",
        "Cc": "zong.li@sifive.com,\n\tgreentime.hu@sifive.com,\n\tYu-Chien Peter Lin <peter.lin@sifive.com>",
        "Subject": "[PATCH] lib: utils: fdt_domain: add support for root domain region\n inheritance",
        "Date": "Fri, 27 Mar 2026 12:33:57 +0800",
        "Message-ID": "<20260327043357.3452008-1-peter.lin@sifive.com>",
        "X-Mailer": "git-send-email 2.48.0",
        "MIME-Version": "1.0",
        "X-CRM114-Version": "20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 ",
        "X-CRM114-CacheID": "sfid-20260326_213407_219273_AC0DFE44 ",
        "X-CRM114-Status": "GOOD (  13.80  )",
        "X-Spam-Score": "-2.1 (--)",
        "X-Spam-Report": "Spam detection software,\n running on the system \"bombadil.infradead.org\",\n has NOT identified this incoming email as spam.  The original\n message has been attached to this so you can view it or label\n similar future email.  If you have any questions, see\n the administrator of that system for details.\n Content preview:  Add the \"root-regions\" property in domain device-tree nodes\n    to allow domains to inherit all regions from the root domain. This\n simplifies\n    configuration for domains that need access to most root domain [...]\n Content analysis details:   (-2.1 points, 5.0 required)\n  pts rule name              description\n ---- ----------------------\n --------------------------------------------------\n -0.0 RCVD_IN_DNSWL_NONE     RBL: Sender listed at https://www.dnswl.org/, no\n                             trust\n                             [2607:f8b0:4864:20:0:0:0:629 listed in]\n                             [list.dnswl.org]\n  0.0 SPF_HELO_NONE          SPF: HELO does not publish an SPF Record\n -0.0 SPF_PASS               SPF: sender matches SPF record\n -0.1 DKIM_VALID_AU          Message has a valid DKIM or DK signature from\n author's\n                             domain\n -0.1 DKIM_VALID             Message has at least one valid DKIM or DK\n signature\n -0.1 DKIM_VALID_EF          Message has a valid DKIM or DK signature from\n                             envelope-from domain\n  0.1 DKIM_SIGNED            Message has a DKIM or DK signature,\n not necessarily valid\n -1.9 BAYES_00               BODY: Bayes spam probability is 0 to 1%\n                             [score: 0.0000]",
        "X-BeenThere": "opensbi@lists.infradead.org",
        "X-Mailman-Version": "2.1.34",
        "Precedence": "list",
        "List-Id": "<opensbi.lists.infradead.org>",
        "List-Unsubscribe": "<http://lists.infradead.org/mailman/options/opensbi>,\n <mailto:opensbi-request@lists.infradead.org?subject=unsubscribe>",
        "List-Archive": "<http://lists.infradead.org/pipermail/opensbi/>",
        "List-Post": "<mailto:opensbi@lists.infradead.org>",
        "List-Help": "<mailto:opensbi-request@lists.infradead.org?subject=help>",
        "List-Subscribe": "<http://lists.infradead.org/mailman/listinfo/opensbi>,\n <mailto:opensbi-request@lists.infradead.org?subject=subscribe>",
        "Content-Type": "text/plain; charset=\"us-ascii\"",
        "Content-Transfer-Encoding": "7bit",
        "Sender": "\"opensbi\" <opensbi-bounces@lists.infradead.org>",
        "Errors-To": "opensbi-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org"
    },
    "content": "Add the \"root-regions\" property in domain device-tree nodes to\nallow domains to inherit all regions from the root domain. This\nsimplifies configuration for domains that need access to most\nroot domain regions with only minor exclusions or additions.\n\nSigned-off-by: Yu-Chien Peter Lin <peter.lin@sifive.com>\n---\n docs/domain_support.md     |  4 ++++\n lib/utils/fdt/fdt_domain.c | 46 +++++++++++++++++++++++---------------\n 2 files changed, 32 insertions(+), 18 deletions(-)",
    "diff": "diff --git a/docs/domain_support.md b/docs/domain_support.md\nindex 93186c4a..a88f1cfb 100644\n--- a/docs/domain_support.md\n+++ b/docs/domain_support.md\n@@ -159,6 +159,10 @@ The DT properties of a domain instance DT node are as follows:\n * **possible-harts** (Optional) - The list of CPU DT node phandles for the\n   the domain instance. This list represents the possible HARTs of the\n   domain instance.\n+* **root-regions** (Optional) - A boolean flag indicating whether this domain\n+  inherits ALL memory regions from the root domain. If this property is present,\n+  the domain will include with all root domain regions and then overlay with\n+  regions specified in the **regions** property for additional restrictions.\n * **regions** (Optional) - The list of domain memory region DT node phandle\n   and access permissions for the domain instance. Each list entry is a pair\n   of DT node phandle and access permissions. The access permissions are\ndiff --git a/lib/utils/fdt/fdt_domain.c b/lib/utils/fdt/fdt_domain.c\nindex b2fa8633..45407c22 100644\n--- a/lib/utils/fdt/fdt_domain.c\n+++ b/lib/utils/fdt/fdt_domain.c\n@@ -373,25 +373,35 @@ static int __fdt_parse_domain(const void *fdt, int domain_offset, void *opaque)\n \tif (err)\n \t\tgoto fail_free_all;\n \n-\t/*\n-\t * Copy over root domain memregions which don't allow\n-\t * read, write and execute from lower privilege modes.\n-\t *\n-\t * These root domain memregions without read, write,\n-\t * and execute permissions include:\n-\t * 1) firmware region protecting the firmware memory\n-\t * 2) mmio regions protecting M-mode only mmio devices\n-\t */\n-\tsbi_domain_for_each_memregion(&root, reg) {\n-\t\tif ((reg->flags & SBI_DOMAIN_MEMREGION_SU_READABLE) ||\n-\t\t    (reg->flags & SBI_DOMAIN_MEMREGION_SU_WRITABLE) ||\n-\t\t    (reg->flags & SBI_DOMAIN_MEMREGION_SU_EXECUTABLE))\n-\t\t\tcontinue;\n-\t\tif (preg.max_regions <= preg.region_count) {\n-\t\t\terr = SBI_EINVAL;\n-\t\t\tgoto fail_free_all;\n+\tif (fdt_get_property(fdt, domain_offset, \"root-regions\", NULL)) {\n+\t\tsbi_domain_for_each_memregion(&root, reg) {\n+\t\t\tif (preg.max_regions <= preg.region_count) {\n+\t\t\t\terr = SBI_EINVAL;\n+\t\t\t\tgoto fail_free_all;\n+\t\t\t}\n+\t\t\tmemcpy(&dom->regions[preg.region_count++], reg, sizeof(*reg));\n+\t\t}\n+\t} else {\n+\t\t/*\n+\t\t * Copy over root domain memregions which don't allow\n+\t\t * read, write and execute from lower privilege modes.\n+\t\t *\n+\t\t * These root domain memregions without read, write,\n+\t\t * and execute permissions include:\n+\t\t * 1) firmware region protecting the firmware memory\n+\t\t * 2) mmio regions protecting M-mode only mmio devices\n+\t\t */\n+\t\tsbi_domain_for_each_memregion(&root, reg) {\n+\t\t\tif ((reg->flags & SBI_DOMAIN_MEMREGION_SU_READABLE) ||\n+\t\t\t    (reg->flags & SBI_DOMAIN_MEMREGION_SU_WRITABLE) ||\n+\t\t\t    (reg->flags & SBI_DOMAIN_MEMREGION_SU_EXECUTABLE))\n+\t\t\t\tcontinue;\n+\t\t\tif (preg.max_regions <= preg.region_count) {\n+\t\t\t\terr = SBI_EINVAL;\n+\t\t\t\tgoto fail_free_all;\n+\t\t\t}\n+\t\t\tmemcpy(&dom->regions[preg.region_count++], reg, sizeof(*reg));\n \t\t}\n-\t\tmemcpy(&dom->regions[preg.region_count++], reg, sizeof(*reg));\n \t}\n \tdom->fw_region_inited = root.fw_region_inited;\n \n",
    "prefixes": []
}