[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v3] xen/arm: Don't use copy_from_paddr for DTB relocation
- To: Luca Fancellu <luca.fancellu@xxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
- From: "Orzel, Michal" <michal.orzel@xxxxxxx>
- Date: Tue, 4 Mar 2025 09:17:31 +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=SsAWZfdnJqXz0aa5cY6heaifmfkbOH7pvqDehqhz9ug=; b=ePlY6N3ASF3WsgHdn9VmNCQToZJeD5wDcJpqJUpCk7V3DESKRiFh3sPF4eXfNY8hgpe6Uo28V5Pu25cP34E3yWRNgSLuOUr0Xzqf063T6RnUdCO5c6JYuKX8XGGgXRcZvKZhAI63Mvx9PUp3HPq/6Ce8zSAfeJ5EfcIXwf6VS8Q2o/uBqRwOaO1sHBPdec87CSBrKulbVUvjufOR0f4xStGHxlgWCC41RjZsR42Amdi8BAL/IDUo3G1q2htsyQRRsSsTbhid/p2iFkBzRxhd9Tc++cN0kPwWOks4MxNjceGyGAA39sP6iBjtnqlJR3xxdaLQUFX01ijupPQA/XjWrw==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=pXQAMk/EEav/DPgDxpLDovb8ywfzt8jGYAMjYAqCEYOPSBkCO/vgKaAhwJ23yGC+1MNE2fTbQlQdrbOJ7U+1N+jglZvaOtaGcKerZ6HdGHdJ4ZXfSc5boqY9MzYblfz4U4EMtHDUzuApiPgB9xzQr2oQyKWOBMt0GCqt78ADkLPKWhuBxxGC4X6AoXV7JH+4ZFia0/jK/7IdSF0opz4Bb9xxC7znf3IRrF2yHFX2LSbSDZochRFY+OvcPbOb5P4Iwc30+LzkZ2zy4mWZpvnaeKoDG7tEzfXWIPhpyiHay6Im5WHwhjOGNOgCLuFn1XIJ+R3oZEzQ/k60rJPiH8RCJg==
- Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=amd.com;
- Cc: Stefano Stabellini <sstabellini@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Bertrand Marquis <bertrand.marquis@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>
- Delivery-date: Tue, 04 Mar 2025 08:18:05 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
On 26/02/2025 22:52, Luca Fancellu wrote:
>
>
> Currently the early stage of the Arm boot maps the DTB using
> early_fdt_map() using PAGE_HYPERVISOR_RO which is cacheable
> read-only memory, later during DTB relocation the function
> copy_from_paddr() is used to map pages in the same range on
> the fixmap but using PAGE_HYPERVISOR_WC which is non-cacheable
> read-write memory.
>
> The Arm specifications, ARM DDI0487L.a, section B2.11 "Mismatched
> memory attributes" discourage using mismatched attributes for
> aliases of the same location.
>
> Given that there is nothing preventing the relocation since the region
> is already mapped, fix that by open-coding copy_from_paddr inside
> relocate_fdt, without mapping on the fixmap.
>
> Signed-off-by: Luca Fancellu <luca.fancellu@xxxxxxx>
Reviewed-by: Michal Orzel <michal.orzel@xxxxxxx>
~Michal
|