[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [XEN][PATCH] xen/dom0less: arm: fix hwdom 1:1 low memory allocation
- To: Grygorii Strashko <grygorii_strashko@xxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
- From: Jason Andryuk <jason.andryuk@xxxxxxx>
- Date: Tue, 5 Aug 2025 13:21:50 -0400
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=epam.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=AtiIpBwFbTUaDMGzbHbXFv65uwFcj+S2UhPgeI3K+7A=; b=Gl9ylc2fXr8IecqjBxeJO1+9ViUvthzZn/BcZkXC7iESEiZRN3dbgPKQek/MMAQKHDV3Bjhq2mwJCW1EknQtgWKd456/zvnJ3K4p2Tt3y0SPT6UC7Ldm/W+MM0HBgoksACugfngysYg1FJs/QhSOX9k0yALDqWYP4I+zdUPdzliotPk9Jz13gnSqIkuN5hvsAWaws3wyiTdi0RuaZxEbdi2YHxOvUpmNpQ+cVD7Z2CXsFpq4BilLRsYWxUN/8HfNk606bolhqZvq8Etnf1Rw7L6UmcI5UJM6dQKhWK7rNGCn4VRxp7DaFZvhcJOdkki2jgdoiFJeznfXQxKCPYe6Xw==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=A8mKRkE6CRnS7/hX3Q33KRAwx+nOYrRmzu5PD1C+5LlqIxCMQ6VVF5MkCjQiqxWP1e261XO1qP6ojni04+nMzL8Ut2LhWlJGB5VOqKGPxrFOENWa1+TdQKa0Rwwdsptott05dflpNe1E20KmrCrhO+zi5lwA35j6wddvN/ftYgpl/Tewi4m7a76crPO6FHsq91Pgx+LVzZLbp8JmAj1a7sEOMAw2HmLrDvqLAo7qvuUkqCpZWAxhClUU23IZ+ofTrLtuRYjE1+J3/Rshg+bwkObZ2akJ2m5JxzfQMiJ0Gt04sA6uyrILOrA0Ys1foQzz0ko4TzLEG67CJnzP82an3w==
- Cc: Oleksii Kurochko <oleksii.kurochko@xxxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Bertrand Marquis <bertrand.marquis@xxxxxxx>, Michal Orzel <michal.orzel@xxxxxxx>, "Volodymyr Babchuk" <Volodymyr_Babchuk@xxxxxxxx>
- Delivery-date: Tue, 05 Aug 2025 17:22:13 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
On 2025-08-01 11:54, Grygorii Strashko wrote:
From: Grygorii Strashko <grygorii_strashko@xxxxxxxx>
Call stack for dom0less hwdom case (1:1) memory:
create_domUs
|-construct_domU
|-construct_hwdom()
|-allocate_memory_11()
And allocate_memory_11() uses "dom0_mem" as:
min_low_order =
get_order_from_bytes(min_t(paddr_t, dom0_mem, MB(128)));
In case of dom0less boot the "dom0_mem" is not used and defaulted to 0,
which causes min_low_order to get high value > order and so no allocations
happens from low memory.
Fix it, by using kinfo->unassigned_mem instead of "dom0_mem" has correct
memory size in both cases: regular dom0 boot and dom0less boot.
Fixes: 43afe6f030244 ("xen/common: dom0less: introduce common dom0less-build.c")
I think I introduced this bug with the dom0less hwdom support, and the
correct fixes is:
Fixes: 52cb53f1816a ("xen/arm: dom0less hwdom construction")
Signed-off-by: Grygorii Strashko <grygorii_strashko@xxxxxxxx>
dom0_mem is also mentioned in the comment on line 252. With that
changed as well:
Reviewed-by: Jason Andryuk <jason.andryuk@xxxxxxx>
Thanks,
Jason
|