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

Re: [PATCH] xen/device-tree: Allow exact match for overlapping regions


  • To: Michal Orzel <michal.orzel@xxxxxxx>
  • From: Luca Fancellu <Luca.Fancellu@xxxxxxx>
  • Date: Wed, 6 Nov 2024 15:16:03 +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=L/pjgpsfRcPJYNsV8CBJvA2QeU9Wg8xy+5+rH2Ywsec=; b=F2OoOvzjaXFke4MwH5B0Uwf2nsFSkWkC0rKTNrP1J++7og2n3sB4JTbXR65eoBoW+HM4fywbHASyTGYzoHVnVfw4t1BBk8IiGlV0TJIBX1GExpN8jR1lt55YzQ2+h3l/mjvEjlgaMOOeo8cBOMYNVf604vJHKat8Xslj7+uSVeaasSFOmAQwzwoRxtwETnSfrY1eExFihfNxjrkQWNhoqgaCbZnnpdBO7sFUx+HEGgRP+YtIoos3m80XKxvE0DkebYQ8VKYiowT34dnNyAR/b6X03/4XT2DcjiacsbvTlIxK0C918CQ6vUBWIwaiT67r7ZTG9J2kqq8dg/Q9Viwg1w==
  • 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=L/pjgpsfRcPJYNsV8CBJvA2QeU9Wg8xy+5+rH2Ywsec=; b=EAC0WTdk/lk7HlPmNESqOHk5HgVTEKuVTLM2CIt+yCQoBGLoVncMtk78UYXVku0oswQL8A/yrBlyDz7YX6LZ/9RJTWr0v3uVEFbLcB7rpXOEUzPXaYLWqJCf3IDnYyShXKkurcGkvDTYBLwJzvA9sKmJxQbDXxP4fYhTEGHEe5HZQ5a9hUzIHD3HQ2cXciU2mAKK1gCiLhInkRwu35nKyEaNRABOjb5Bp5vq/iuqOlTyNRC/t+QQZQVBE7FeG8oTQRsC8pNe81fFAn8rf0z5VpTWjluW4oCQaMv/7VVO4z9hoTsf8BaJWB73HK6h7JGl/G6CgKdJRh6X740M+qDDqA==
  • Arc-seal: i=2; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=pass; b=bXhDzUyh9YKXoFg91T0zOFDFjmdpdtK3RXDGsTqdUEBqZc6wgG8QPPvihQjKt59DKzSa5G9oymmt9cK5YwUTXlB4LvM0a4tQNWvhaIA9MZW5mfwxRQGHr3/xePyU+Dlc6suorkkE2uJ+s3ZdPrqwe9bLfAJsWp1xa0DhjMp2iTTdOvHVykZBEKREx6DtUWZob2T6w/+Ad3J+1hNvqn+ztES0BUBGc7kZ+RTDLM9vMt0XQdOkLfnhaB1iq6CAVofrS8q9FUHTxW8tEaLmwbqxA1mbQHhvEi/Y46MvWCifGQ3iH39JyHys23B5D4Huwnz6dm+up6oLzG6prH1Ky0gaZg==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=jZ+ovt54Q+xzt1EkSuMIoxdcmO8DxWatAOh1FS7lFekFV7mwxXXGLvy6L07c9RsCHLG02YKAEk6J8KaDNMVn+sbmLKom4c4NNeDSRsGiHej3OJFvL/aOaoFOUuaIrSs8Drs731jubqkkbavcUEH9LBc9KWjpmvqr/nDbZHHOLjZYSE2ssLOWsH/7zs4UAWga/KduLHcaS7eWkNbbmZk3YnqUMPKmJAQxTea3R0Xcm5gYV4/qgu6CIxkXYE8Uf4pN339rv40TeRUjRC+bs+HWtqqqOWQ4PxRDAe/57F1nEsszSHlcdA1LmAV8I4jRxUyM36C8+yvB0AFpTGl2ry/S/A==
  • 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>, Shawn Anastasio <sanastasio@xxxxxxxxxxxxxxxxxxxxx>, Grygorii Strashko <grygorii_strashko@xxxxxxxx>
  • Delivery-date: Wed, 06 Nov 2024 15:16:26 +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: AQHbMFGwb2V2aTQ740yGxnKF6IdbXLKqWowAgAACWoA=
  • Thread-topic: [PATCH] xen/device-tree: Allow exact match for overlapping regions

Hi Michal,

> So we have 2 separate issues. I don't particularly like the concept of 
> introducing MEMBANK_NONE
> and the changes below look a bit too much for me, given that for boot modules 
> we can only have
> /memreserve/ matching initrd.
> 
> Shawn patch fixes the first issue. AFAICT the second issue can be fixed by 
> below simple patch:
> diff --git a/xen/common/device-tree/bootfdt.c 
> b/xen/common/device-tree/bootfdt.c
> index 927f59c64b0d..d8bd8c44bd35 100644
> --- a/xen/common/device-tree/bootfdt.c
> +++ b/xen/common/device-tree/bootfdt.c
> @@ -586,6 +586,10 @@ size_t __init boot_fdt_info(const void *fdt, paddr_t 
> paddr)
> 
>     add_boot_module(BOOTMOD_FDT, paddr, fdt_totalsize(fdt), false);
> 
> +    ret = device_tree_for_each_node(fdt, 0, early_scan_node, NULL);
> +    if ( ret )
> +        panic("Early FDT parsing failed (%d)\n", ret);
> +
>     nr_rsvd = fdt_num_mem_rsv(fdt);
>     if ( nr_rsvd < 0 )
>         panic("Parsing FDT memory reserve map failed (%d)\n", nr_rsvd);
> @@ -594,10 +598,14 @@ size_t __init boot_fdt_info(const void *fdt, paddr_t 
> paddr)
>     {
>         struct membank *bank;
>         paddr_t s, sz;
> +        const struct bootmodule *mod = 
> boot_module_find_by_kind(BOOTMOD_RAMDISK);
> 
>         if ( fdt_get_mem_rsv_paddr(device_tree_flattened, i, &s, &sz) < 0 )
>             continue;
> 
> +        if ( mod && (mod->start == s) && (mod->size == sz) )
> +            continue;

Ok I see, we skip the /memreserve/ entry if it matches the ramdisk, fair 
enough, I don’t have
a strong opinion on how we do that, the important thing is just to unblock the 
users experiencing
this issue.

Cheers,
Luca

 


Rackspace

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