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

RE: [PATCH 2/2] xen/arm: Handle reserved heap pages in boot and heap allocator


  • To: Julien Grall <julien@xxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Henry Wang <Henry.Wang@xxxxxxx>
  • Date: Fri, 2 Sep 2022 03:30:49 +0000
  • Accept-language: zh-CN, 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=armh.onmicrosoft.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=arcselector9901; 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=4O4lBE22ExQUpguYwGqqakeE8idW8+2YaNU1ScgeKhc=; b=IlA4GWd+V/FfDXb5N4zUExA/gncv0RB/YxHVjwV8OwlnRFtb2/Cu9bA5qYK82YiE48JR3KoJ4xHYRtB+ieO/ooyH8iM308lBNlEoE3ubADS3Mx4msw59MGbxUmJnkPN6JYgkWB3Bmp5w6GPNEp+TX2kTXioPeHCk+CJ2Pd7zVsC9FvaZZlJz6VcHKTibGr/Wr+RLAaUUT3X+ykZUNiDXLdcXuHenkN1+LPCLkhF/kwXYlfPIvpjV3k3m9fopI/pDPaSkzQGQWGUHib+mMaKFlWdCPt9XT58fUXI3uET5Sv6A4h+a4QiSx7mL+NeEe6eVhzDE13qABNIlWie1Z8VJzg==
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; 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=4O4lBE22ExQUpguYwGqqakeE8idW8+2YaNU1ScgeKhc=; b=EAdw2iNQbnCX898b9tFEaEDFcr68JBdUNfOZvW71+0pc+0NmnxJnXBr5Rpim8TohoAhkgpa9UwbcTZjYfNF2vE4GRazjln34wBorHfu+1ODDC0ydflSt/r6QmhWXi2rjvEw1I2v7cwxMUYszAGPTHM8Ur0I+WrRFdy/VXwhMOad08DT5VSB99+WqeiVB84VlQlHinJCh38NuR1LzUQOz4f2T75NWTkFJIlqP+FKKcBdkF4+G74bRUJww9xVtp+TFKFqVE+Un1aX/SiJy4gFv2oLXuNCvJSpi0QNMaoWJ4M+LWqW/cmMblgQB27ljxp9lqFfTap7NMlcUR+hXjvc+fQ==
  • Arc-seal: i=2; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=pass; b=KRrPGdWwvsXkw4rR0sRHmum9S+12slB/aQGLAXoukxZRbBdcOtQSX2NcAwU0xS0J/KhymJvAt4r7ZsK9p4xBNqoT0vvYJ6DPJHAHGLuKcqQcoQ4sSsUezXGifu0QL52/Gg3sCdny8RQZkwXSjnNANtgMX9ZWQWqVoYEjlLRsVUGWO0ORe/h894ZLGew3sLEJhy89RUeU4OmZXhVO37eX+D/9whLotFe1gE3Vg4bnVKFbr/pJLzunEq6uXOdGmBIf29xp2Ll/gsS7iqBWqKzFFljnYOAEyBRZL/IYNfmZ7aMHWCleW0P+auxRX+WDafFjOMeDmuGL92LtJmQsgs4YDw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=l6HUVaNhfwe5KjVY/uV/sWdX8sA8UlfKBXUEI2Xs6rcmL7yJKzH1+pY/SnmrdxePt+w6VbiCmlkeUktz2UJGn9yEcKGE/3ewxxp9ZTSyXbzhhBsyiWf7QVUIN6SHUEmsQ7qQbVe6mm3Dlh4BPCJx7gQP04eKpUURAsc9dhhj2ljvfG8GwnisWM1ZPu89t9O6xVl7z3K5ZS6NvTaZP2HTJ3BXsLR6MujmqatnF/wmAZwkIzTwghEoGk+KXEit1SaU/2RYrBFVBpdqLuHdqYu4PVHDyQ5NgXeE6nniZZHG00Fq/Y7NMhDTN+t9yjIW6N6u4MyxjCZevSdsR9aNG4KOgw==
  • Authentication-results-original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com;
  • Cc: Bertrand Marquis <Bertrand.Marquis@xxxxxxx>, Wei Chen <Wei.Chen@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>
  • Delivery-date: Fri, 02 Sep 2022 03:31:09 +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: AQHYt4ugTfbCAM/WyEil7pMplK0r3q3KwCgAgAAG+VCAABfUgIAApokQ
  • Thread-topic: [PATCH 2/2] xen/arm: Handle reserved heap pages in boot and heap allocator

Hi Julien,

> -----Original Message-----
> From: Julien Grall <julien@xxxxxxx>
> >> This code is now becoming quite confusing to understanding. This loop is
> >> meant to map the xenheap. If I follow your documentation, it would
> mean
> >> that only the reserved region should be mapped.
> >
> > Yes I think this is the same question that I raised in the scissors line of 
> > the
> > commit message of this patch.
> 
> Sorry I didn't notice the comment after the scissors line. This is the
> same question :)
> 
> > What I intend to do is still mapping the whole
> > RAM because of the xenheap_* variables that you mentioned in...
> >
> >>
> >> More confusingly, xenheap_* variables will cover the full RAM.
> >
> > ...here. But only adding the reserved region to the boot allocator so the
> > reserved region can become the heap later on. I am wondering if we
> > have a more clear way to do that, any suggestions?
> 
> I think your code is correct. It only needs some renaming of the
> existing variable (maybe to directmap_*?) to make clear the area is used
> to access the RAM easily.

Thanks for the clarification. I checked the code and found the xenheap_*
variables are:
xenheap_virt_start, xenheap_virt_end, xenheap_mfn_start,
xenheap_mfn_end, xenheap_base_pdx.

For clarification, do we need to change all of them to directmap_*?

A pure renaming should be easy (and I guess also safe), but maybe I am
overthinking because arm32 also uses xenheap_virt_end, xenheap_mfn_start
and xenheap_mfn_end. These variables refer to the real xenheap, I am not
sure renaming these would reduce the readability for arm32.

Kind regards,
Henry

> 
> Cheers,
> 
> --
> Julien Grall

 


Rackspace

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