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

Re: [PATCH for-4.22 v2 0/2] xen/arm: validate hwdom first bank boot placement


  • To: Oleksii Kurochko <oleksii.kurochko@xxxxxxxxx>, Mykola Kvach <xakep.amatop@xxxxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: "Orzel, Michal" <michal.orzel@xxxxxxx>
  • Date: Fri, 5 Jun 2026 10:03:37 +0200
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=gmail.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=crIk/1Ug3tHz/diqOfhC37MRtOb+gvk7Qt5G5LamFD0=; b=y98feWvCJ92s+JRVAw0h5kBdGyjxOTmRxDf0Y26nSqYuAPZPOboxeuYKvC5I4x4/9YrbNa6i8pr5sHulvUNnzG/bAf8smeR7c4xnSTyEuZrPuopmmBN07iFw2CfqIvoGUjogJC5Bpy5t1TKdBlnez7lfZ3sJOihDPYYcbwWj4nOFbyUaQ+XuQbfydi/o59etJNljFKsGquG878sZbX9WgFTLFYHQwHK78gCT65T262WU753GqbFrM0JweRZFqnEg/K0D15Up19AyUjC4A18lUJn3JDMuNd/I2f+J8F+owfuyo2yOhV2lrVLuPTI0UD3Mw+lf+eFt0JaTSNSuPBW25g==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=ig19ez+LbOANdHb8o3llFONJizPls2lRucvPAwMlcC9s4o/c7rD64PoLFhq3PSjsHP5yzuyLJCYkZDp/82jQaSU8Ng+0hB0gRRag872CAH2J00YDbr1wYuYCnMgK6n2qFFqX48QzjYrSyTptnDE6kzG3TXYA5br/4OBOMCltEZnQj9ppfekXeFe5LZk+u4lIn7Tg+6CqF0tzDrZA8ss1poKBL9HlqF/IhbnPp3Ljz+9uWSspr8wWWYEtwSJ4uqgnnplOSiQd26awzlcWU3SnXLvouyR+5xrpRCYLSNtUObqzNWl1Qyni73Qd3qVItSgeIhs7wy3D5+duRSZIzX8hNg==
  • 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: Mykola Kvach <mykola_kvach@xxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Bertrand Marquis <bertrand.marquis@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Anthony PERARD <anthony.perard@xxxxxxxxxx>, Jan Beulich <jbeulich@xxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>
  • Delivery-date: Fri, 05 Jun 2026 08:03:49 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>


On 05-Jun-26 10:00, Oleksii Kurochko wrote:
> Hello Mykola,
> 
> On 6/5/26 7:19 AM, Mykola Kvach wrote:
>> From: Mykola Kvach <mykola_kvach@xxxxxxxx>
> 
> Just out of curiosity, is it okay that the email address listed here 
> differs from the one you're using to send patches? (By the way, nice 
> email address ;))
> 
>>
>> With LLC coloring enabled, the hardware domain memory is allocated by
>> allocate_hwdom_memory() instead of relying on the fixed direct-map
>> layout. Since de99f3263555 ("device-tree: Improve hwdom memory
>> allocation for DMA"), the allocator prefers lower host regions, but the
>> first-bank filter still only enforces the old 128MB heuristic.
>>
>> A low candidate bank can satisfy that heuristic while still being
>> unsuitable for the Arm kernel/DTB/initrd placement rules. Split the Arm
>> placement logic into reusable helpers first, then validate the candidate
>> hardware-domain bank 0 against those helpers before allocating it.
>>
>> Changes in v2:
>> - Split the previous single patch into a behavior-preserving Arm
>>    placement refactoring and a separate hardware-domain first-bank fix.
>> - Rename find_module_placement() and place_modules() to use DTB/initrd
>>    terminology.
>> - Pass ramend to find_dtb_initrd_placement().
>> - Update the stale tools/libs/guest/xg_dom_arm.c reference.
>>
>> Link to v1:
>>    
>> https://patchew.org/Xen/4f862bb2dc323914b8120b0f16af7516140cf42b.1780065103.git.mykola._5Fkvach@xxxxxxxx/
>>
> 
> I would like to clarify whether my understanding is correct.
> 
> With LLC coloring enabled on ARM, the allocator could assign the 
> hardware domain a bank 0 that passes the size check but is unsuitable 
> for kernel/DTB/initrd placement. As a result, the hardware domain may 
> fail to boot or could silently corrupt memory if the images are placed 
> in an incorrect location.
> 
> Is my understanding correct?
Yes, Xen would fail to boot such domain. On Arm we carry a lot of placement
logic we need to deal with...

~Michal




 


Rackspace

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