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

RE: [PATCH 1/2] docs, xen/arm: Introduce reserved heap memory


  • To: Michal Orzel <michal.orzel@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>
  • From: Henry Wang <Henry.Wang@xxxxxxx>
  • Date: Tue, 30 Aug 2022 07:21:51 +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=lNP6QTHI8SWLwulHpMP8dT2bA+gEKV1LB+/9qIpcgPI=; b=Md6aZbS6+NcnHkjJ1MbmXg8bEBzM1z7Ii+YY64BEflGr0xRQ+//0HvSI42a53Pw4Y6ZYWZZ4f1EmVKfWl9/0TVdokD8iM9biapcdb7Dqo/SblvqhkeQMpS2juNV7LjIL+seEFiAXS87ais1xUPikkerPfKJkRk42CW+RuQOMn8xrf5xi5bWe5Gi8+mu4LGEZZ5WapGIMT2DX33QQa7YKiOFInnHR6GDNOh/e5C3u0tLUW+zfBOCiXuocF3XmDhQxja6T+H7uMZjivlC3O9d6tkAsh8kOtRSuz9Kd3S1eNmicSUoiPbARQB0DxPI/6/XtdWqOasAK/iNqyP3so92nkw==
  • 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=lNP6QTHI8SWLwulHpMP8dT2bA+gEKV1LB+/9qIpcgPI=; b=n2on0P3A61HIRQJbPZXdoGeYdCEPrTzj2BAGZ3WIKceenJp+sjNY2ndEOt45v+bIwhrP9+qwN1r7nTplgRsARGGkSO1U3pYxyafxFc30tlgMj61NLWXHsqPfn24CfOpt7pMSCkYynS24CtZwyfEifcaYrgCg5LCSYELoJRuUBwjwPndf/3zErUTwuQ7MPpOBEUHABvEd2h/rzyYydFzRR3QLm31kxZ0V1d6D7L4hpRhfJw0qNqJJpGTFzdu8BYaM2kaFwBKyMrrJrMEX2FulbIRGZhG/d0ziibv1i1NIJDp1Nu38yRykRrfb018g5IW25ox27dUEL0aAgvajyOwmHA==
  • Arc-seal: i=2; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=pass; b=Kay72jjnYjmXcITWQAate6tMiBezKUF9BEKoDxyvxOTR2Kf9KKxoXf8n6RjLIBW+g0/haQYoMxUiHpMVUyIQsJWWhNNaW0KidfNktA2H2YfjZIqvbsQf/Yld6OHbIIeHgDrt2OApZ6R05FI5owu6tKkdbEK3q7k02lc7j3aD5xGat+/aLLwe7ivRlK3l34sbjO0Lq3ejiSTT1Fx8LJI9n9IvHuO/JtL9rGy0vhMmVoR/Cu7Pov0AHeJ4skhnaXqqtXcN3MBVgM3nmk60DD0dAhuYJkk6w5La5o4bEA9gUL/T7tdb1GQOJ36xsE5bN3+zdo3wI18Ir846+HoQkfO8Ow==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=VkdxNRzvXDVHQwF7SD0iT97njGNUOrIMqH/jLybWEsb8QnNDeGi8iPBT8Ao8I59WeYlNSOd7MznBnyjt/Yc8MavAToWrP0tsqS06PlA1EdQ09kFsXKBCj2sh5J9Sx0qbdnqj89lH0bRScPVya1ufRZ6YVVmOy2itH/eJdV03MUl1NdOJCes7cUC+W2NcpkNeRhqYNuUYxqAL2sxmh1gsud7sZ3gKahIk3xxuTZEVXaGQfLyRiTm3XFqImg4OhwXgxLAlaa13mfx8q+n0bfiGrUjvP83LEKMsMlZ2U+CEyX/CFqHnVsQ/YRI+NZsYAW3YX/sHEXXID20EqZFJWgaBTA==
  • 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>, Julien Grall <julien@xxxxxxx>, Bertrand Marquis <Bertrand.Marquis@xxxxxxx>, Wei Chen <Wei.Chen@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>, Penny Zheng <Penny.Zheng@xxxxxxx>
  • Delivery-date: Tue, 30 Aug 2022 07:22:15 +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: AQHYt4ueuuTQX+2f5E69518db+C55q2+ENkAgAC6AOCAB9oWAIAAAi5wgABddICAAAuRgIAAAO4A
  • Thread-topic: [PATCH 1/2] docs, xen/arm: Introduce reserved heap memory

Hi Michal,

> -----Original Message-----
> From: Michal Orzel <michal.orzel@xxxxxxx>
> >>>>>> +        printk("Checking for reserved heap in /chosen\n");
> >>>>>> +        if ( address_cells < 1 || size_cells < 1 )
> >>>>> address_cells and size_cells cannot be negative so you could just check
> if
> >>>>> there are 0.
> >>>>
> >>>> In bootfdt.c function device_tree_get_meminfo(), the address and size
> cells
> >>>> are checked using <1 instead of =0. I agree they cannot be negative, but
> I
> >>> am
> >>>> not very sure if there were other reasons to do the "<1" check in
> >>>> device_tree_get_meminfo(). Are you fine with we don't keep the
> >>> consistency
> >>>> here?
> >>>
> >>> I would keep the < 1 check but it doesn't make much difference either
> >>> way
> >>
> >> I also would prefer to keep these two places consistent and I agree Michal
> is
> >> making a good point.
> > I'm ok with that so let's keep the consistency.
> Actually, why do we want to duplicate exactly the same check in
> process_chosen_node that is already
> present in device_tree_get_meminfo? There is no need for that so just
> remove it from process_chosen_node.

Well, yes and no IMHO, because we are using "#xen,static-heap-address-cells"
and "#xen,static-heap-size-cells" instead of normal "#address-cells" and
"#size-cells". These properties are dependent on user's input so I would say
adding a check and proper printk to inform user with the related information
would be a good idea. Also I think catching the incorrect
"#xen,static-heap-address-cells" and "#xen,static-heap-size-cells" and return
early would also be a good idea.

Kind regards,
Henry


 


Rackspace

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