[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] arm/domain_build: Make find_unallocated_memory() more generic
- To: Michal Orzel <michal.orzel@xxxxxxx>
- From: Luca Fancellu <Luca.Fancellu@xxxxxxx>
- Date: Tue, 10 Dec 2024 15:23:23 +0000
- Accept-language: en-GB, en-US
- Arc-authentication-results: i=2; mx.microsoft.com 1; spf=pass (sender ip is 63.35.35.123) smtp.rcpttodomain=lists.xenproject.org smtp.mailfrom=arm.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=arm.com; dkim=pass (signature was verified) header.d=arm.com; arc=pass (0 oda=1 ltdi=1 spf=[1,1,smtp.mailfrom=arm.com] dkim=[1,1,header.d=arm.com] dmarc=[1,1,header.from=arm.com])
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none
- Arc-message-signature: i=2; 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=FqDKqoHswHoUumjOcdGZj78TBiNQbQgoGNZSJzRwtxs=; b=YYT6WUXEoipXzVL2PrAKxMxTH926+8lIldlbEH0bp1llOt8TiNgUZpP1DdG35A/cx6EEHM69X5vXhST+t7+xHquuNI8NfA7SU7L3g1N9uKYQa5jaLJBUh9FZcqTmVrU2w1KOOER0b6qeO8ni2MrspD3rWrVwGY2TKFtPfOVYe8lOTU+rUeNVItG8TRwIDGGXghH2RZkSCNkkzq47auUQg5lBMK/BtxfH2td6vwMJ+6nISDIWE0p22mKJHCkff3+Z0gKhlT2ne/KM/WEujJDs3Uo1XKVfehzCvbPcF6u2Nh3rgzb16qzng6De+HD/hfmD+32RZvhQCboTTyJsHRidjw==
- 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=FqDKqoHswHoUumjOcdGZj78TBiNQbQgoGNZSJzRwtxs=; b=AAvA9E+3qIih33wmW90ExZGPKu5PYEWpqQr1Cmc5AYUnJKjGOwGDyIdIKK/cbAFhuFW+8AwX0nFGxC8BWT+xjWWSE7Pc5pB8myGd67JRvi4sSiqsZIUCW7PNQSm/uKtojXCkZ+8srszCKijKeLdqKn36Gh5m/aC4JUrphh0y70MxhmXj51gVeCHtfqWwkctlAc0Fr3+71ii5C0w6Cy5ae6WKM80yJRSDQ5C+x7xTinl6U+iLkkK1whSbCJE8WO7UTxzhr8wwrt5jMWJLsVu3sVJfDVfIC5bYKJfmxhUaFyBxFmSViG++rasA6VP/h5iHl34cvsN34Y3CTINMS2jyNg==
- Arc-seal: i=2; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=pass; b=I8TKGExsqMS7kEyH1HGB2iABCpsjFtABavcEKKWXms8cPaT3blY6WoI8CvBkKWCv98LVL4Z/deJqDWvkNqS5QdmhIea38K+v1g/6G/sUKTCIL0QkrvGkLVyKc9fqEfLUi5QgRpUkR1vZCaGGAK1KbP9Q35h8xQ4qNTYaSHVO1Pijdnu7Lzl4nRXfKCtGmZpa9mmRIg69/rFVjCUvGJ7E/vtqWDjrJHGLLQaClGSj9ZUXNArbFAbo8Zefg+5xYt87StkqpEoCv6BoSBMaeSOcM6fXZxUP79jCsA56OIqQ+Ji3JnguQo9X9S8vhvsyLRNZRBoMVKk9CxuHASqQL1+Svg==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=hwB8hVME3oQDKdNkomX/BTcQ5VaB8YMllzSnydL0a4WtHi/QBcbMwiH58SxcwDZhZQKmGTaR58AmWYpujfpPZviPUK21tzsoVMHSb6pBkgU4Npw7reTiEOY7No7A9fg4JL3BpfvhflgZyworORZaHf3GXjSsUKqziPjHqDtst85hM0MGfOEWHkn4iVfw01kymWd5zJ5IyaG75B3wMDiXqoVNOqLRpNijtiiVpPNl0smqd7vW3zjFRBZyRs0OLjd3ddFycGmeNZ1u1QVIkg25HW3PC8B7vtYY0gpXUMDOtk370zEuLi543Ko/UOpCfGB1Nbg/DVkiYKjzDKadYVBlBg==
- Authentication-results-original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com;
- Cc: "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Bertrand Marquis <Bertrand.Marquis@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>
- Delivery-date: Tue, 10 Dec 2024 15:23:42 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
- Nodisclaimer: true
- Original-authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com;
- Thread-index: AQHbSuu+5rMu+POVOUWRmNRoDUJ5vLLfmOuA
- Thread-topic: [PATCH] arm/domain_build: Make find_unallocated_memory() more generic
> On 10 Dec 2024, at 10:10, Michal Orzel <michal.orzel@xxxxxxx> wrote:
>
> At the moment, find_unallocated_memory() is only used to retrieve free
> memory ranges for direct mapped domains in order to find extended
> regions. It is not generic as it makes assumptions as for the place at
> which it's being called (domain memory already allocated, gnttab region
> already found) and hardcodes the memory banks to be excluded.
>
> Make the function more generic, so that it can be used for other
> purposes whenever there is a need to find free host memory regions (e.g.
> upcoming LLC coloring series). Allow passing array with memory banks as a
> parameter together with a callback to populate free regions structure,
> as the logic may differ depending on the needs.
>
> Add find_host_extended_regions() to be called from make_hypervisor_node()
> to contain the logic to find extended regions for domains using host
> memory layout that are not permitted to use IOMMU.
>
> Signed-off-by: Michal Orzel <michal.orzel@xxxxxxx>
> ---
> This is a prerequisite patch for LLC coloring series patch 3.
> For dom0 LLC coloring, we just need to pass resmem and gnttab in mem_banks.
> ---
Hi Michal,
it looks good to me, I’ve also tested in our CI and no issues!
Reviewed-by: Luca Fancellu <luca.fancellu@xxxxxxx>
Tested-by: Luca Fancellu <luca.fancellu@xxxxxxx>
|