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

Re: [PATCH v3 33/52] xen/mpu: initialize frametable in MPU system


  • To: Julien Grall <julien@xxxxxxx>, Ayan Kumar Halder <ayankuma@xxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Penny Zheng <penny.zheng@xxxxxxx>
  • Date: Thu, 13 Jul 2023 15:16:09 +0800
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 40.67.248.234) smtp.rcpttodomain=xen.org smtp.mailfrom=arm.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=arm.com; dkim=none (message not signed); arc=none
  • 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=oymRyCwfeCV/d39Of32f4qMPRSzv2CrD7IDJ53f++YA=; b=lPP5dqd+WFuA98d61ELGSbQiesHLBswzX3KotRYFg2NOAIeL5ohbrlhU6bPLq03YiZMy2zpiqxRKLQ/4VfxxHVMTBoTIKIp6el5uY8BrUeZBrGvX86iYSvLrbZsKhJpJ1h/XROBDoMOKHlkKpw+phb4KhcEt2D87L9uvjx1w8xzVJ6pt9WFgO3aNTgcdcXArmx8rWKFZk62ph+ta/Ia+y+HDxLTc5l5xO7PiIACwIR9iJwLx1VnZa0XwI9joDZDOyHtZnoJfDm7HogNe7jbnPK6TCPIZuQ6u3g9Kq/fPViYHP6Ecr9CMdymC4ZJOZ6qrB3wHXTpOG20TgzhxXjqwIQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=jxP6mrVm3d4NQfzBTpNu7bUsgL3e37bPDOCfoau6TIiWGV4ebsfIwwtFz+N68pkwyz74ZXJvDLC/WIkv22kK0UF1P6ua4NgFKl4RFVvT5ORw0VaGC+xCae6fGtPL66AhGHUrKlu5NfXc7l4/EHc50CpN6VjAnwjEo5tUWkCgPrcCU4NuDT3FzU9vgVxTYa9YvO9N0XcTNiH94qxMdXpwxnq+NGoU51YQShJp3lxv5eL51s/V7PBfsmZ1124DTp8FQrR1tvVE8vRzfwil0/LEsaRdRxUZFAyT+ipKzWkX6V1ocjFh2njIOgJrbkJbCLMgs1KHBt3fMgKIYsYgloYs8w==
  • Cc: Stefano Stabellini <sstabellini@xxxxxxxxxx>, Bertrand Marquis <bertrand.marquis@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>, Wei Chen <wei.chen@xxxxxxx>
  • Delivery-date: Thu, 13 Jul 2023 07:17:07 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Nodisclaimer: true

Hi,

On 2023/7/5 21:52, Julien Grall wrote:
Hi,

On 05/07/2023 10:53, Penny Zheng wrote:
Since if not and when anyone wants to update map_pages_to_xen(), destroy_xen_mappings() and modify_xen_mappings() in the future, it is possible for them to leave changes in only one file.

The helpers are just wrappers. I doubt they will change in the future. So I think it would be OK to duplicate.

The alternative would to have a common prototype for xen_pt_update() and xen_mpumap_update() and avoid any #ifdery. That said, this is not my preference at least if they are not static inline.


Correct me if I'm wrong, you are suggesting something like this:
A more-generic wrapper like xen_mm_update, and we introduce static inline implementation in mmu/mm.h with xen_pt_update(), and static
inline implementation in mpu/mm.h with xen_mpumap_update().

Yes as an alternative proposal. But my preference here is to duplicate the helpers in mm-mmu.c and mm-mpu.c.


Understood, I'll do the duplication.

Cheers,




 


Rackspace

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