[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v1 3/4] xen: arm: Move the functions of domain_page to MMU specific
- To: Julien Grall <julien@xxxxxxx>, Ayan Kumar Halder <ayan.kumar.halder@xxxxxxx>, sstabellini@xxxxxxxxxx, bertrand.marquis@xxxxxxx, michal.orzel@xxxxxxx, Volodymyr_Babchuk@xxxxxxxx
- From: Ayan Kumar Halder <ayankuma@xxxxxxx>
- Date: Mon, 5 Aug 2024 12:31:07 +0100
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=amd.com; dmarc=pass action=none header.from=amd.com; dkim=pass header.d=amd.com; arc=none
- 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=6B5PZ2cRTgSOdnor8+eA0UOSNdKeHF5CTrgg5bm8jbw=; b=cqoo8Conky28Z49f9lZVKHXKnJ9B5alctNq8jQIRgmRL3qM2CXzD25jl5enyw0oLRg3YAbcLzGJMTYiq0TC4cb7YkXlQ7/MTbkxLJR5hnstQBBg75h0ARR9QJyRdwLPdcyg6KrBdsc4ON6CJI/jdY8QnVEbs2QNPV6zXJU+liCBXW7Jp3rb4PX3J4fcapbX4QAgh+V90CLAn7E3zXNor+aJm+ADwe8MFXR2JKjlIJltTFkRoZYQPVEToyQ0CvzxO8CQnUChEu481yfa1qkQ8A590KEGYdUe8GNzc6o32cxKHCpTNYjKIFDq7Snff4UJq/iCBAgx3mrVoOKFCKH8JrQ==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=N5tkki6hrPX0/lymnq8se9V5BXsrV6JtBDsF/lI8h1d9XZab79uvlUWEwDm8yqBw1XBN3Ua4KNsiaR7ZIZSfGB8bJ9OwJA2gXeu/gJEokc4AiaqP8+3hFzfa1nEDrfR9Dy4i0NQjgBauNeXjNJrzA8NxXjcTOM5xnPdvW0FhXa3+jIXXvYmhoSP2uj+Dr6rT1PYiqvFdXKUHLt/iu9vUJMfDgMctUAjPqmTc9rrEDntgrTpIwXozIKhTsUYlug9FPJDxf4QMbbzns9l57LERK8OMFsSMzzS+9Yh8N+BNNrItME+oYnul+Nh+e4NlXGISnLiIOFdQ7OA7ShszcN2QJA==
- Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=amd.com;
- Cc: xen-devel@xxxxxxxxxxxxxxxxxxxx
- Delivery-date: Mon, 05 Aug 2024 11:31:26 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
On 02/08/2024 14:33, Julien Grall wrote:
Hi,
Hi Julien,
On 02/08/2024 13:14, Ayan Kumar Halder wrote:
Moved init_domheap_mappings(), map_domain_page_global(),
unmap_domain_page_global(), map_domain_page(), unmap_domain_page(),
domain_page_map_to_mfn() to MMU specific folder.
On the top level, we have added stubs which will invoke the
MMU specific equivalent of these functions.
Signed-off-by: Ayan Kumar Halder <ayan.kumar.halder@xxxxxxx>
---
xen/arch/arm/domain_page.c | 161 +----------------------
Looking at what's left in domain_page.c, we seem to have just a series
of stubs:
bool init_domheap_mappings(unsigned int cpu)
{
return init_domheap_mappings_mm(cpu);
}
void *map_domain_page_global(mfn_t mfn)
{
return map_domain_page_global_mm(mfn);
}
void unmap_domain_page_global(const void *ptr)
{
return unmap_domain_page_global_mm(ptr);
}
/* Map a page of domheap memory */
void *map_domain_page(mfn_t mfn)
{
return map_domain_page_mm(mfn);
}
/* Release a mapping taken with map_domain_page() */
void unmap_domain_page(const void *ptr)
{
return unmap_domain_page_mm(ptr);
}
mfn_t domain_page_map_to_mfn(const void *ptr)
{
return domain_page_map_to_mfn_mm(ptr);
}
The indirection seems unnecessary to me. What about renaming
arch/arm/domain_page.c to arch/arm/mmu/domain_page.c? Then, for the
MMU you can implement unmap_domain_page() & co rather than suffixed
_mm ones.
Makes sense. I will do this way.
- Ayan
Cheers,
|