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

Re: [PATCH v2 1/5] xen/arm: Rename assign_static_memory_11() for consistency


  • To: Michal Orzel <michal.orzel@xxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Henry Wang <xin.wang2@xxxxxxx>
  • Date: Fri, 8 Mar 2024 16:22:49 +0800
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=lists.xenproject.org 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=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=Qu6lGHsbzTEZviLMY0r5d8+iU6TwWvIkPVdFXGaqUvI=; b=RzzusNbRhvOV189vopjF0pro/U2Mvs0Ddj/SHqkRIFr2WMqAwQP8lc6LoZofXijm1kjpUl4kZ9v5j865ozoyz8VzD4YDqKaH6nPSZsd7NbdYPDXuOrzGhQdr66vKpBPlkEdisjwqx78LvlU/fjTZr23ipztfhuW/Iqvo+BY3g7GXxTMbpc6UalZ+EYs+3desuYonoKj77UbDyR6UXfGELYZG2mLum7NNyiOvFhQ+EBlamV0ZHW+3vBfuBW8Fpqfj2Bx1EI2/IeExwqhyNuMoWxYtDT8RRYMCwQSyTZmHpqN5t4yT+13tZ+biINDyXYbZVyKX1kKIxyvlx9HjgReYpQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=aK5JKkWX6i6hZH2Qrq/h3ifb8OsNqCBc38YMXSassGTXzqmPHq/IOoTcQI6bdt1ZPLdIPLNc2oaW8fJYMaakfwHVmd72dE+OdGBmvcAmLm0vqN5qgJHPPEOl0XqudeX76mnufKj1vUTwV+z3GBzOAVx/UbdYxZz+PqXsbuTtiB2MC1XPloKlEK6OSnpz2//KT4J5JhfMnYo3/s9mmUS3v60glV3E+EZPKyQaMAxkLJZoLkX3Tc6x2JCu4WObcCWs8AS689fOCu5DCFbmmD8NIFl/BUzJG5+KI3naYkZqGUOr+hvhPzKXi0k9e+zKuHkrWD3yUrTdD7odBresLCGTUQ==
  • Cc: Stefano Stabellini <sstabellini@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Bertrand Marquis <bertrand.marquis@xxxxxxx>, "Volodymyr Babchuk" <Volodymyr_Babchuk@xxxxxxxx>
  • Delivery-date: Fri, 08 Mar 2024 08:23:00 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

Hi Michal,

On 3/8/2024 4:18 PM, Michal Orzel wrote:
Hi Henry,

On 08/03/2024 02:54, Henry Wang wrote:
Currently on Arm there are 4 functions to allocate memory as domain
RAM at boot time for different types of domains:
(1) allocate_memory(): To allocate memory for Dom0less DomUs that
     do not use static memory.
(2) allocate_static_memory(): To allocate memory for Dom0less DomUs
     that use static memory.
(3) allocate_memory_11(): To allocate memory for Dom0.
(4) assign_static_memory_11(): To allocate memory for Dom0less DomUs
     that use static memory and directmapped.

To keep consistency between the names and the in-code comment on top
of the functions, rename assign_static_memory_11() to
allocate_static_memory_11(). No functional change intended.
There was a reason for this naming. The function is called assign_ and not 
allocate_ because
there is no allocation done inside. The function maps specified host regions to 
guest regions.
Refer:
https://lore.kernel.org/xen-devel/20220214031956.3726764-6-penny.zheng@xxxxxxx/

Emmm I indeed had the same idea and thought there should be a reason about the naming, but at the same time still misguided by the in-code comment on top of the function saying "Allocate static memory as RAM for one specific domain d." :/

I guess I will either simply drop this patch or correct the above in-code comment (which I am not sure if it is worthwhile for an independent patch). Anyway, thanks for the info!

Kind regards,
Henry

~Michal




 


Rackspace

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