[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v2] xen/dt-overlay: support phandle-based targeting in overlay_get_nodes_info
- To: Luca Fancellu <Luca.Fancellu@xxxxxxx>
- From: "Orzel, Michal" <michal.orzel@xxxxxxx>
- Date: Tue, 28 Apr 2026 10:10:14 +0200
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=arm.com smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none (0)
- Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=2QwKHubh0Rs8eIN0CJH6ipVEHeIXxlKEFaCurDRB/m4=; b=wkrnm+Zds/JKbq9hdXrb82itsKXWa6tLhjy8y271gS0zFaMC4R/7VsOTsKItPVF2bKDFgny7eCBb/PFoVXc2FmSMxPxNyq7uBPfxrIAlfxgGzW8VSzx9Au/fVTRwAmrHqx7AmkwoOV3MGBBQwc97m0nEJz/6tJmOCx1AbYPw0MLQrc6tXv/rOZrjzidGJ3TVxB9ejhFyjiGqnD4MT/kdmKF3eBeteEt5nQxuGSPvHSvI6ZoBHESF87jOBik2YiYDIuVQJMXhes7IUDvlqQcaDEeRJrBiU/uYJupPDeqfvxPVx7iwDGizuY+LyzWoPb5++/gmTuPSq7IbBJmwuyjm7g==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=gLw9BaVecvht71CfDT/oYNqqPmHcMDIlDHm+hhxcGFGuPPgNANkHFhW5mrPrMd/uyOTDrItJWslUc6l+fD6+YpFPcU/Ufhj4wJ7nOGEM1j0UVN1h3I56h8QiqlYvO4D/xDkwUj+paXsp7hhvdvLHLOsP3HOVZnh4mUKpyPtiq61hE3iFOii9fuI4S0EcO2FYpg8uWJO5iYSE2L+D+i9oxXeSwu++tsmeP+5h2MFkd3g+svihZ4DaP1jw4hvGHWpL59KCNlHv+/o+BLZHCh/oSu17RBm4sTQTqs3UoGEqtLeYT0ucOydFbagjoGPvuqbQizcJUkKndl4NEno1GdI4FA==
- Authentication-results: eu.smtp.expurgate.cloud; dkim=pass header.s=selector1 header.d=amd.com header.i="@amd.com" header.h="From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck"
- Cc: "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Nicola Vetrini <nicola.vetrini@xxxxxxxxxxx>, Doug Goldstein <cardoe@xxxxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Bertrand Marquis <Bertrand.Marquis@xxxxxxx>
- Delivery-date: Tue, 28 Apr 2026 08:10:29 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
On 28-Apr-26 10:05, Luca Fancellu wrote:
>
>
>> On 28 Apr 2026, at 09:02, Michal Orzel <michal.orzel@xxxxxxx> wrote:
>>
>> overlay_get_nodes_info() is called before fdt_overlay_apply() to extract
>> target paths from the overlay. This fails for overlays using phandle-based
>> targeting (target = <&label>) because DTC compiles these as unresolved
>> fixups (target = <0xffffffff>), causing fdt_overlay_target_offset() to
>> return -FDT_ERR_BADPHANDLE. Prior to this change users were forced to
>> manually modify the dtbo (even for hwdom) to switch from target to
>> target-phandle by manually inspecting also the host DTB.
>>
>> Introduce overlay_get_target_path() which directly handles the two
>> targeting cases that occur before fixup resolution:
>> - target-path: the string property is returned directly.
>> - target = <&label>: the label is found in the overlay's __fixups__
>> node, then resolved to a path via the base DTB's __symbols__ node.
>>
>> Libfdt fdt_for_each_property_offset() violates MISRA R20.7. Despite
>> libfdt being excluded from the analysis, this causes ECLAIR scan to
>> report a regression because the violation introduced by a macro is
>> reported at the call site. Deviate R20.7 for libfdt.h.
>>
>> Reviewed-by: Luca Fancellu <luca.fancellu@xxxxxxx>
>> Acked-by: Stefano Stabellini <sstabellini@xxxxxxxxxx>
>> Signed-off-by: Michal Orzel <michal.orzel@xxxxxxx>
>
> NIT: shouldn’t these be in chronological order?
Yes, they should. It's b4 that messes things up. Anyway, to be done on commit.
~Michal
|